mirror of https://github.com/YosysHQ/yosys.git
Docs: updating makefiles
This commit is contained in:
parent
62d2f89c74
commit
6e38848b92
11
Makefile
11
Makefile
|
@ -971,9 +971,12 @@ docs/source/cmd/abc.rst: $(TARGETS) $(EXTRA_TARGETS)
|
|||
mkdir -p docs/source/cmd
|
||||
./$(PROGRAM_PREFIX)yosys -p 'help -write-rst-command-reference-manual'
|
||||
|
||||
PHONY: docs/gen_images docs/guidelines docs/usage
|
||||
PHONY: docs/gen_examples docs/gen_images docs/guidelines docs/usage
|
||||
docs/gen_examples:
|
||||
$(Q) $(MAKE) -C docs examples
|
||||
|
||||
docs/gen_images:
|
||||
$(Q) $(MAKE) -C docs/source/_images all
|
||||
$(Q) $(MAKE) -C docs images
|
||||
|
||||
DOCS_GUIDELINE_FILES := GettingStarted CodingStyle
|
||||
docs/guidelines:
|
||||
|
@ -988,7 +991,7 @@ docs/source/temp/%: docs/guidelines
|
|||
-$(Q) ./$(PROGRAM_PREFIX)$* --help > $@ 2>&1
|
||||
|
||||
DOC_TARGET ?= html
|
||||
docs: docs/source/cmd/abc.rst docs/gen_images docs/guidelines docs/usage
|
||||
docs: docs/source/cmd/abc.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage
|
||||
$(Q) $(MAKE) -C docs $(DOC_TARGET)
|
||||
|
||||
clean:
|
||||
|
@ -1007,8 +1010,6 @@ clean:
|
|||
rm -f tests/svinterfaces/*.log_stdout tests/svinterfaces/*.log_stderr tests/svinterfaces/dut_result.txt tests/svinterfaces/reference_result.txt tests/svinterfaces/a.out tests/svinterfaces/*_syn.v tests/svinterfaces/*.diff
|
||||
rm -f tests/tools/cmp_tbdata
|
||||
$(MAKE) -C docs clean
|
||||
$(MAKE) -C docs/source/_images clean
|
||||
rm -rf docs/source/cmd docs/util/__pycache__
|
||||
|
||||
clean-abc:
|
||||
$(MAKE) -C abc DEP= clean
|
||||
|
|
|
@ -45,8 +45,10 @@ help:
|
|||
@echo " dummy to check syntax errors of document sources"
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
clean: clean-examples
|
||||
rm -rf $(BUILDDIR)/*
|
||||
rm -rf source/cmd util/__pycache__
|
||||
$(MAKE) -C source/_images clean
|
||||
|
||||
.PHONY: html
|
||||
html:
|
||||
|
@ -227,15 +229,24 @@ dummy:
|
|||
|
||||
PYTHON ?= python3
|
||||
|
||||
.PHONY: test test-examples test-macros
|
||||
.PHONY: test test-examples test-macros examples
|
||||
test: test-examples test-macros
|
||||
|
||||
FORCE:
|
||||
../%/Makefile: FORCE
|
||||
+$(MAKE) -C $(@D)
|
||||
Makefile-%: FORCE
|
||||
$(MAKE) -C $(@D) $(*F)
|
||||
|
||||
CODE_EXAMPLES := source/code_examples/*/Makefile
|
||||
test-examples: $(CODE_EXAMPLES)
|
||||
CODE_EXAMPLES := $(wildcard source/code_examples/*/Makefile)
|
||||
TEST_EXAMPLES := $(addsuffix -all,$(CODE_EXAMPLES))
|
||||
CLEAN_EXAMPLES := $(addsuffix -clean,$(CODE_EXAMPLES))
|
||||
test-examples: $(TEST_EXAMPLES)
|
||||
clean-examples: $(CLEAN_EXAMPLES)
|
||||
examples: $(TEST_EXAMPLES)
|
||||
|
||||
test-macros:
|
||||
$(PYTHON) tests/macro_commands.py
|
||||
|
||||
.PHONY: images
|
||||
images:
|
||||
$(MAKE) -C source/_images
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@ PROGRAM_PREFIX :=
|
|||
|
||||
YOSYS ?= ../../../../$(PROGRAM_PREFIX)yosys
|
||||
|
||||
all: test0.log test1.log test2.log
|
||||
|
||||
.PHONY: all dots
|
||||
all: dots test0.log test1.log test2.log
|
||||
dots: test1.dot
|
||||
|
||||
CXXFLAGS=$(shell $(YOSYS)-config --cxxflags)
|
||||
DATDIR=$(shell $(YOSYS)-config --datdir)
|
||||
|
||||
my_cmd.so: my_cmd.cc
|
||||
$(YOSYS)-config --exec --cxx $(subst $(DATDIR),../../share,$(CXXFLAGS)) --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs
|
||||
$(YOSYS)-config --exec --cxx $(subst $(DATDIR),../../../../share,$(CXXFLAGS)) --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs
|
||||
|
||||
test0.log: my_cmd.so
|
||||
$(YOSYS) -Ql test0.log_new -m ./my_cmd.so -p 'my_cmd foo bar' absval_ref.v
|
||||
|
@ -20,10 +20,13 @@ test1.log: my_cmd.so
|
|||
$(YOSYS) -Ql test1.log_new -m ./my_cmd.so -p 'clean; test1; dump' absval_ref.v
|
||||
mv test1.log_new test1.log
|
||||
|
||||
test1.dot:
|
||||
test1.dot: my_cmd.so
|
||||
$(YOSYS) -m ./my_cmd.so -p 'test1; show -format dot -prefix test1'
|
||||
|
||||
test2.log: my_cmd.so
|
||||
$(YOSYS) -Ql test2.log_new -m ./my_cmd.so -p 'hierarchy -top test; test2' sigmap_test.v
|
||||
mv test2.log_new test2.log
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f *.d *.so *.dot
|
||||
|
|
|
@ -10,12 +10,13 @@ MAPDOT_NAMES += rdata_map_ffs rdata_map_luts rdata_map_cells
|
|||
DOTS := $(addsuffix .dot,$(DOT_NAMES))
|
||||
MAPDOTS := $(addsuffix .dot,$(MAPDOT_NAMES))
|
||||
|
||||
dots: $(DOTS) $(MAPDOTS) fifo.out
|
||||
all: dots fifo.out fifo.stat
|
||||
dots: $(DOTS) $(MAPDOTS)
|
||||
|
||||
$(DOTS) fifo.out: fifo.v fifo.ys
|
||||
$(YOSYS) fifo.ys -l fifo.out -Q -T
|
||||
|
||||
$(MAPDOTS): fifo.v fifo_map.ys
|
||||
$(MAPDOTS) fifo.stat: fifo.v fifo_map.ys
|
||||
$(YOSYS) fifo_map.ys
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -4,6 +4,7 @@ YOSYS ?= ../../../../$(PROGRAM_PREFIX)yosys
|
|||
|
||||
DOTS = counter_00.dot counter_01.dot counter_02.dot counter_03.dot
|
||||
|
||||
all: dots
|
||||
dots: $(DOTS)
|
||||
|
||||
$(DOTS): counter.v counter.ys mycells.lib
|
||||
|
|
|
@ -4,6 +4,7 @@ YOSYS ?= ../../../../$(PROGRAM_PREFIX)yosys
|
|||
|
||||
DOTS = macc_simple_xmap.dot macc_xilinx_xmap.dot
|
||||
|
||||
all: dots
|
||||
dots: $(DOTS)
|
||||
|
||||
macc_simple_xmap.dot: macc_simple_*.v macc_simple_test.ys
|
||||
|
|
|
@ -6,6 +6,7 @@ DOT_NAMES = opt_share opt_muxtree opt_merge opt_expr
|
|||
|
||||
DOTS := $(addsuffix .dot,$(DOT_NAMES))
|
||||
|
||||
all: dots
|
||||
dots: $(DOTS)
|
||||
|
||||
%_full.dot: %.ys
|
||||
|
|
|
@ -2,6 +2,8 @@ PROGRAM_PREFIX :=
|
|||
|
||||
YOSYS ?= ../../../../$(PROGRAM_PREFIX)yosys
|
||||
|
||||
.PHONY: all dots
|
||||
all: dots
|
||||
dots: scrambler_p01.dot scrambler_p02.dot
|
||||
|
||||
scrambler_p01.dot scrambler_p02.dot: scrambler.ys scrambler.v
|
||||
|
|
|
@ -11,6 +11,8 @@ MEMDEMO_DOTS := $(addsuffix .dot,$(MEMDEMO))
|
|||
SUBMOD = submod_00 submod_01 submod_02 submod_03
|
||||
SUBMOD_DOTS := $(addsuffix .dot,$(SUBMOD))
|
||||
|
||||
.PHONY: all dots
|
||||
all: dots
|
||||
dots: select.dot $(SUMPROD_DOTS) $(MEMDEMO_DOTS) $(SUBMOD_DOTS)
|
||||
|
||||
select.dot: select.v select.ys
|
||||
|
|
|
@ -8,7 +8,9 @@ EXAMPLE_DOTS := $(addsuffix .dot,$(EXAMPLE))
|
|||
CMOS = cmos_00 cmos_01
|
||||
CMOS_DOTS := $(addsuffix .dot,$(CMOS))
|
||||
|
||||
dots: splice.dot $(EXAMPLE_DOTS) $(CMOS_DOTS) example.out
|
||||
.PHONY: all dots
|
||||
all: dots example.out
|
||||
dots: splice.dot $(EXAMPLE_DOTS) $(CMOS_DOTS)
|
||||
|
||||
splice.dot: splice.v
|
||||
$(YOSYS) -p 'prep -top splice_demo; show -format dot -prefix splice' splice.v
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
.PHONY: all dots
|
||||
all: dots
|
||||
dots:
|
||||
|
||||
.PHONY: test
|
||||
test: stubnets.so
|
||||
yosys -ql test1.log -m ./stubnets.so test.v -p "stubnets"
|
||||
yosys -ql test2.log -m ./stubnets.so test.v -p "opt; stubnets"
|
||||
|
@ -9,6 +12,7 @@ test: stubnets.so
|
|||
stubnets.so: stubnets.cc
|
||||
yosys-config --exec --cxx --cxxflags --ldflags -o $@ -shared $^ --ldlibs
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f test1.log test2.log test3.log
|
||||
rm -f stubnets.so stubnets.d
|
||||
|
|
|
@ -9,6 +9,8 @@ YOSYS ?= ../../../../$(PROGRAM_PREFIX)yosys
|
|||
|
||||
DOTS = $(addsuffix .dot,$(TARGETS))
|
||||
|
||||
.PHONY: all dots
|
||||
all: dots
|
||||
dots: $(DOTS)
|
||||
|
||||
%.dot: %.v %.ys
|
||||
|
|
|
@ -2,6 +2,8 @@ PROGRAM_PREFIX :=
|
|||
|
||||
YOSYS ?= ../../../../$(PROGRAM_PREFIX)yosys
|
||||
|
||||
.PHONY: all dots
|
||||
all: dots
|
||||
dots: red_or3x1.dot sym_mul.dot mymul.dot mulshift.dot addshift.dot
|
||||
|
||||
red_or3x1.dot: red_or3x1_*
|
||||
|
|
|
@ -6,6 +6,8 @@ Writing extensions
|
|||
|
||||
.. todo:: check text is coherent
|
||||
|
||||
.. todo:: update to use ``/code_examples/extensions/test*.log``
|
||||
|
||||
This chapter contains some bits and pieces of information about programming
|
||||
yosys extensions. Don't be afraid to ask questions on the YosysHQ Slack.
|
||||
|
||||
|
|
Loading…
Reference in New Issue