+++ /dev/null
-import subprocess
-
-
-def get_id():
- output = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii")
- return int(output[:8], 16)
+import subprocess
+
from migen.fhdl.std import *
from migen.bank.description import *
-from misoclib.cpu import git
+def get_id():
+ output = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii")
+ return int(output[:8], 16)
class Identifier(Module, AutoCSR):
###
if revision is None:
- revision = git.get_id()
+ revision = get_id()
self.comb += [
self._sysid.status.eq(sysid),
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(TARGET_PREFIX)objcopy
RANLIB_quiet = @echo " RANLIB " $@ && $(TARGET_PREFIX)ranlib
-MSC_GIT_ID := $(shell cd $(MSCDIR) && python3 -c "from misoclib.cpu.git import get_id; print(hex(get_id()), end='')")
+MSC_GIT_ID := $(shell cd $(MSCDIR) && python3 -c "from misoclib.cpu.identifier import get_id; print(hex(get_id()), end='')")
ifeq ($(V),1)
CC = $(CC_normal)