Skip to content

Commit

Permalink
Merge pull request #283 from arturum1/if_gen
Browse files Browse the repository at this point in the history
feat(setup): Use new setup process: Call `iob_cache.py` directly.
  • Loading branch information
jjts committed Sep 29, 2023
2 parents 85eeb82 + 16a928c commit 50551f6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
CORE := iob_cache
DISABLE_LINT:=1
include submodules/LIB/setup.mk

BE_IF ?= "AXI4"
SETUP_ARGS += BE_IF=$(BE_IF)
BE_DATA_W ?= "32"
SETUP_ARGS += BE_DATA_W=$(BE_DATA_W)

sim-build: clean
clean:
rm -rf ../$(CORE)_V*
make setup BE_IF=$(BE_IF) BE_DATA_W=$(BE_DATA_W) && make -C ../$(CORE)_V*/ sim-build

sim-run: clean
rm -rf ../$(CORE)_V*
make setup BE_IF=$(BE_IF) BE_DATA_W=$(BE_DATA_W) && make -C ../$(CORE)_V*/ sim-run
setup:
python3 -B ./$(CORE).py BE_IF=$(BE_IF) BE_DATA_W=$(BE_DATA_W)

sim-build: clean setup
make -C ../$(CORE)_V*/ sim-build

sim-run: clean setup
make -C ../$(CORE)_V*/ sim-run

sim-waves:
make -C ../$(CORE)_V*/ sim-waves

sim-test: clean
rm -rf ../$(CORE)_V*
make setup BE_IF=$(BE_IF) BE_DATA_W=$(BE_DATA_W) && make -C ../$(CORE)_V*/ sim-test
sim-test: clean setup
make -C ../$(CORE)_V*/ sim-test


9 changes: 9 additions & 0 deletions iob_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import os
import sys

# Find python modules
if __name__ == "__main__":
sys.path.append("./submodules/LIB/scripts")
from iob_module import iob_module
if __name__ == "__main__":
iob_module.find_modules()

# Submodules
from iob_utils import iob_utils
Expand Down Expand Up @@ -573,3 +578,7 @@ def _setup_regs(cls):
@classmethod
def _setup_block_groups(cls):
cls.block_groups += []


if __name__ == "__main__":
iob_cache.setup_as_top_module()
2 changes: 1 addition & 1 deletion submodules/LIB

0 comments on commit 50551f6

Please sign in to comment.