Skip to content

Commit

Permalink
Merge pull request #36 from mithro/master
Browse files Browse the repository at this point in the history
Fixing makefiles.
  • Loading branch information
mithro committed Feb 14, 2018
2 parents 443a1bf + 14bccbf commit cf8424b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/make/sim.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ $(NETLISTSVG_STAMP): $(NETLISTSVG)/.git
%.json: %.v Makefile $(SELF_DIR)/sim.mk
$(YOSYS) -p "prep -top $(NAME); $(YOSYS_EXTRA); write_json $@" $<

.PRECIOUS: %.json

%.aig.json: %.v Makefile $(SELF_DIR)/sim.mk
$(YOSYS) -p "prep -top $(NAME) -flatten; aigmap; $(YOSYS_EXTRA); write_json $@" $<

Expand All @@ -39,6 +41,8 @@ $(NETLISTSVG_STAMP): $(NETLISTSVG)/.git
%.svg: %.json $(NETLISTSVG_SKIN) $(NETLISTSVG_STAMP)
$(NODE) $(NETLISTSVG)/bin/netlistsvg $< -o $@ --skin $(NETLISTSVG_SKIN)

.PRECIOUS: %.svg

%.yosys.svg: %.v
$(YOSYS) -p "prep -top $(NAME); $(YOSYS_EXTRA); show -format svg -prefix $(basename $@)" $<

Expand All @@ -48,6 +52,8 @@ $(NETLISTSVG_STAMP): $(NETLISTSVG)/.git
%.png: %.svg
$(INKSCAPE) --export-png $@ --export-dpi $(NETLISTSVG_DPI) $<

.PRECIOUS: %.png

%.yosys.ps: %.v
echo $(NAME)
$(YOSYS) -p "proc; hierarchy -top $(NAME) -purge_lib; show -format ps -prefix sim" $<
Expand Down
4 changes: 4 additions & 0 deletions common/make/w.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ SIM_V := $(foreach N,$(NAMES),sim.$(N).v)
pb_type.%.xml: pb_type.xml $(WPY)
$(WPY) $$(echo $@ | sed -e's/^.*$(NAME_PREFIX)\(.\)$(NAME_SUFFIX).*$$/\1/') $@

.PRECIOUS: pb_type.%.xml

sim.%.v: sim.v $(WPY)
$(WPY) $$(echo $@ | sed -e's/^.*$(NAME_PREFIX)\(.\)$(NAME_SUFFIX).*$$/\1/') $@

.PRECIOUS: sim.%.v

clean:
rm -f pb_type.*.xml
rm -f sim.*.v
Expand Down

0 comments on commit cf8424b

Please sign in to comment.