Skip to content

Commit

Permalink
flit: Allow generation from outside
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti committed Nov 15, 2023
1 parent 03fffdb commit 41a8df0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,18 @@ FLIT_CFG ?= $(shell find util -name "*.hjson")
FLIT_SRC ?= $(patsubst util/%_cfg.hjson,src/floo_%_pkg.sv,$(FLIT_CFG))
FLIT_GEN ?= util/flit_gen.py
FLIT_TPL ?= util/floo_flit_pkg.sv.mako
FLIT_OUT_DIR ?= src
FLIT_CFG_DIR ?= util

.PHONY: sources clean-sources

sources: $(FLIT_SRC)
src/floo_%_pkg.sv: util/%_cfg.hjson $(FLIT_GEN) $(FLIT_TPL)
./util/flit_gen.py -c $< > $@
$(FLIT_OUT_DIR)/floo_%_pkg.sv: $(FLIT_CFG_DIR)/%_cfg.hjson $(FLIT_GEN) $(FLIT_TPL)
$(FLIT_GEN) -c $< > $@
$(VERIBLE_FMT) --inplace --try_wrap_long_lines $@

clean-sources:
rm -f src/floo_*_pkg.sv
rm $(FLIT_SRC)

######################
# Traffic Generation #
Expand Down

0 comments on commit 41a8df0

Please sign in to comment.