1 |
40 |
unneback |
VERILOG_FILES = defines.v
|
2 |
|
|
VERILOG_FILES += clk_and_reset.v
|
3 |
3 |
unneback |
VERILOG_FILES += registers.v
|
4 |
18 |
unneback |
VERILOG_FILES += logic.v
|
5 |
44 |
unneback |
VERILOG_FILES += io.v
|
6 |
3 |
unneback |
|
7 |
22 |
unneback |
VERILOG_FILES_CNT = vl_cnt_bin.v
|
8 |
|
|
VERILOG_FILES_CNT += vl_cnt_bin_clear.v
|
9 |
|
|
VERILOG_FILES_CNT += vl_cnt_bin_ce.v
|
10 |
18 |
unneback |
VERILOG_FILES_CNT += vl_cnt_bin_ce_clear.v
|
11 |
29 |
unneback |
VERILOG_FILES_CNT += vl_cnt_bin_ce_clear_l1_l2.v
|
12 |
18 |
unneback |
VERILOG_FILES_CNT += vl_cnt_bin_ce_clear_set_rew.v
|
13 |
|
|
VERILOG_FILES_CNT += vl_cnt_bin_ce_rew_l1.v
|
14 |
25 |
unneback |
VERILOG_FILES_CNT += vl_cnt_bin_ce_rew_zq_l1.v
|
15 |
|
|
VERILOG_FILES_CNT += vl_cnt_bin_ce_rew_q_zq_l1.v
|
16 |
18 |
unneback |
VERILOG_FILES_CNT += vl_cnt_lfsr_zq.v
|
17 |
75 |
unneback |
VERILOG_FILES_CNT += vl_cnt_lfsr_ce.v
|
18 |
18 |
unneback |
VERILOG_FILES_CNT += vl_cnt_lfsr_ce_zq.v
|
19 |
26 |
unneback |
VERILOG_FILES_CNT += vl_cnt_lfsr_ce_q.v
|
20 |
|
|
VERILOG_FILES_CNT += vl_cnt_lfsr_ce_clear_q.v
|
21 |
22 |
unneback |
VERILOG_FILES_CNT += vl_cnt_lfsr_ce_q_zq.v
|
22 |
18 |
unneback |
VERILOG_FILES_CNT += vl_cnt_lfsr_ce_rew_l1.v
|
23 |
|
|
VERILOG_FILES_CNT += vl_cnt_gray.v
|
24 |
|
|
VERILOG_FILES_CNT += vl_cnt_gray_ce.v
|
25 |
|
|
VERILOG_FILES_CNT += vl_cnt_gray_ce_bin.v
|
26 |
3 |
unneback |
|
27 |
|
|
VERILOG_FILES += $(VERILOG_FILES_CNT)
|
28 |
|
|
VERILOG_FILES += counters.v
|
29 |
5 |
unneback |
VERILOG_FILES += memories.v
|
30 |
12 |
unneback |
VERILOG_FILES += wb.v
|
31 |
18 |
unneback |
VERILOG_FILES += arith.v
|
32 |
3 |
unneback |
|
33 |
|
|
VERSATILE_LIBRARIES = versatile_library.v
|
34 |
|
|
VERSATILE_LIBRARIES += versatile_library_actel.v
|
35 |
|
|
VERSATILE_LIBRARIES += versatile_library_altera.v
|
36 |
40 |
unneback |
OUT_FILE ?= custom.v
|
37 |
|
|
VERSATILE_LIBRARIES += $(OUT_FILE)
|
38 |
3 |
unneback |
|
39 |
|
|
#.PHONY: $(VERILOG_FILES_CNT)
|
40 |
|
|
$(VERILOG_FILES_CNT):
|
41 |
22 |
unneback |
./versatile_counter_generator.php cnt_bin.csv > vl_cnt_bin.v
|
42 |
|
|
./versatile_counter_generator.php cnt_bin_clear.csv > vl_cnt_bin_clear.v
|
43 |
18 |
unneback |
./versatile_counter_generator.php cnt_bin_ce.csv > vl_cnt_bin_ce.v
|
44 |
|
|
./versatile_counter_generator.php cnt_bin_ce_clear.csv > vl_cnt_bin_ce_clear.v
|
45 |
29 |
unneback |
./versatile_counter_generator.php cnt_bin_ce_clear_l1_l2.csv > vl_cnt_bin_ce_clear_l1_l2.v
|
46 |
18 |
unneback |
./versatile_counter_generator.php cnt_bin_ce_clear_set_rew.csv > vl_cnt_bin_ce_clear_set_rew.v
|
47 |
|
|
./versatile_counter_generator.php cnt_bin_ce_rew_l1.csv > vl_cnt_bin_ce_rew_l1.v
|
48 |
25 |
unneback |
./versatile_counter_generator.php cnt_bin_ce_rew_zq_l1.csv > vl_cnt_bin_ce_rew_zq_l1.v
|
49 |
|
|
./versatile_counter_generator.php cnt_bin_ce_rew_q_zq_l1.csv > vl_cnt_bin_ce_rew_q_zq_l1.v
|
50 |
18 |
unneback |
./versatile_counter_generator.php cnt_lfsr_zq.csv > vl_cnt_lfsr_zq.v
|
51 |
75 |
unneback |
./versatile_counter_generator.php cnt_lfsr_ce.csv > vl_cnt_lfsr_ce.v
|
52 |
18 |
unneback |
./versatile_counter_generator.php cnt_lfsr_ce_zq.csv > vl_cnt_lfsr_ce_zq.v
|
53 |
26 |
unneback |
./versatile_counter_generator.php cnt_lfsr_ce_q.csv > vl_cnt_lfsr_ce_q.v
|
54 |
|
|
./versatile_counter_generator.php cnt_lfsr_ce_clear_q.csv > vl_cnt_lfsr_ce_clear_q.v
|
55 |
22 |
unneback |
./versatile_counter_generator.php cnt_lfsr_ce_q_zq.csv > vl_cnt_lfsr_ce_q_zq.v
|
56 |
18 |
unneback |
./versatile_counter_generator.php cnt_lfsr_ce_rew_l1.csv > vl_cnt_lfsr_ce_rew_l1.v
|
57 |
|
|
./versatile_counter_generator.php cnt_gray.csv > vl_cnt_gray.v
|
58 |
|
|
./versatile_counter_generator.php cnt_gray_ce.csv > vl_cnt_gray_ce.v
|
59 |
|
|
./versatile_counter_generator.php cnt_gray_ce_bin.csv > vl_cnt_gray_ce_bin.v
|
60 |
3 |
unneback |
|
61 |
|
|
versatile_library.v: $(VERILOG_FILES)
|
62 |
|
|
cat $(VERILOG_FILES) | sed -r -e 's/\/\/E2_([a-z]+)/`\1/' > versatile_library.v
|
63 |
|
|
|
64 |
|
|
versatile_library_actel.v: $(VERILOG_FILES)
|
65 |
40 |
unneback |
vppreproc --noline --noblank +define+ACTEL +define+ALL $(VERILOG_FILES) | sed -r -e 's/\/\/E2_([a-z]+)/`\1/' > versatile_library_actel.v
|
66 |
3 |
unneback |
|
67 |
|
|
versatile_library_altera.v: $(VERILOG_FILES)
|
68 |
40 |
unneback |
vppreproc --noline --noblank +define+ALTERA +define+ALL $(VERILOG_FILES) | sed -r -e 's/\/\/E2_([a-z]+)/`\1/' > versatile_library_altera.v
|
69 |
|
|
|
70 |
|
|
$(OUT_FILE): $(VERILOG_FILES)
|
71 |
|
|
vppreproc --noline --noblank $(DEFINE_FILE) $(VERILOG_FILES) | sed -r -e 's/\/\/E2_([a-z]+)/`\1/' > $(OUT_FILE)
|
72 |
3 |
unneback |
|
73 |
40 |
unneback |
|
74 |
3 |
unneback |
all: $(VERSATILE_LIBRARIES)
|
75 |
|
|
|
76 |
60 |
unneback |
test: all
|
77 |
|
|
iverilog -DALL -tnull -svl_shift_unit_32 versatile_library.v
|
78 |
|
|
iverilog -tnull -svl_shift_unit_32 versatile_library_actel.v
|
79 |
|
|
iverilog -tnull -svl_shift_unit_32 versatile_library_altera.v
|
80 |
3 |
unneback |
clean:
|
81 |
|
|
rm $(VERSATILE_LIBRARIES)
|
82 |
|
|
rm $(VERILOG_FILES_CNT)
|