]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-dad.git/blob - hw/tb/Makefile
Update DAD hardware testbed.
[fpga/lx-cpu1/lx-dad.git] / hw / tb / Makefile
1 GHDL=ghdl
2 tumbl_SRC=mbl_pkg.vhd mem.vhd fetch.vhd exeq.vhd decode.vhd core_ctrl.vhd
3 tumbl_DIR=../tumbl
4 lx_util_SRC=util_pkg.vhd lx_dad_pkg.vhd xilinx_dualport_bram.vhd
5 lx_util_DIR=..
6 lx_dad_SRC=dff3.vhd dff2.vhd cnt_div.vhd measurement_register.vhd \
7         lx_crosdom_ser_fifo.vhd \
8         bus_example.vhd lx_example_mem.vhd bus_measurement.vhd lx_dad_top.vhd \
9         clockgen.vhd bus_sensor.vhd sensor_mem.vhd lx_adc_if.vhd
10 lx_dad_DIR=..
11
12 MODULES=lx_util lx_dad
13
14 SRC=$(foreach m, $(MODULES), $($(m)_SRC:%=$($(m)_DIR)/%))
15
16 $(warning SRC=$(SRC))
17
18 SRC+=lx_dad_top_tb.vhd
19
20 CFLAGS += -Wall
21
22 GHDLFLAGS+=
23 ANALYZEFLAGS+=--std=93c -fexplicit -ggdb
24
25 #SIM_FLAGS=--stop-time=1000ns #--ieee-asserts=disable
26
27 all:    test-lx-dad
28
29 #convert_bin2bits : convert_bin2bits.o
30
31 #imem.bits : imem.bin convert_bin2bits
32 #       ./convert_bin2bits $< >$@
33
34 test-lx-dad: analyze-all #imem.bits
35         $(GHDL) $(GHDLFLAGS) -m $(ANALYZEFLAGS) lx_dad_top_tb
36         $(GHDL) $(GHDLFLAGS) -r lx_dad_top_tb --stop-time=1000000ns --vcd=$@.vcd --wave=$@.ghw
37
38 analyze-all: $(SRC)
39         $(GHDL) $(GHDLFLAGS) -a $(ANALYZEFLAGS) $(SRC)
40
41
42 clean:
43         rm -f convert_bin2bits
44         rm -f *.o
45         $(GHDL) --clean
46         $(RM) work-obj93.cf