Basic nmigen generator bench for TAP top cell.
[c4m-jtag.git] / test / nmigen / gen / controller / Makefile
1 CURDIR = $(realpath .)
2 TOPDIR = $(realpath ../../../..)
3
4 NMIGENDIR := $(TOPDIR)/c4m/nmigen/jtag
5
6 ifeq ($(PYTHONPATH),)
7 PYTHONPATH := $(TOPDIR)
8 else
9 PYTHONPATH := $(TOPDIR):$(PYTHONPATH)
10 endif
11 export PYTHONPATH
12
13 OUTPUTS := top.v
14 INPUTS := $(addprefix $(NMIGENDIR)/,bus.py tap.py)
15 SCRIPT := ./generate.py
16
17 .PHONY: all
18 all: $(OUTPUTS)
19
20 # We just test if top verilog file can be generated
21 top.v: $(SCRIPT) $(INPUTS)
22 @echo "Regenerating"
23 @$(SCRIPT)
24
25 .PHONY: clean
26 clean:
27 @rm -f $(OUTPUTS)