1 |
16 |
arniml |
##############################################################################
|
2 |
11 |
arniml |
#
|
3 |
|
|
# Tool-specific Makefile for the GHDL compiler.
|
4 |
|
|
#
|
5 |
16 |
arniml |
# It sets all variables needed for VHDL code compilation with Makefile.hier.
|
6 |
11 |
arniml |
#
|
7 |
|
|
#
|
8 |
|
|
# Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
|
9 |
|
|
#
|
10 |
|
|
# All rights reserved
|
11 |
|
|
#
|
12 |
|
|
##############################################################################
|
13 |
|
|
|
14 |
93 |
arniml |
# Generate diagnosis files for line coverage
|
15 |
|
|
#GCOV = -Wc,-ftest-coverage -Wc,-fprofile-arcs
|
16 |
|
|
GCOV =
|
17 |
11 |
arniml |
|
18 |
116 |
arniml |
# In case elaborating/linking throws error messages about undefined references
|
19 |
|
|
#GCOV_LINK = -Wl,-lgcov
|
20 |
|
|
GCOV_LINK =
|
21 |
93 |
arniml |
|
22 |
9 |
arniml |
LIB_WORK = ghdl-work
|
23 |
|
|
|
24 |
116 |
arniml |
CLEAN = ghdl --clean --std=87 --workdir=$(LIB_WORK); \
|
25 |
|
|
rm -f tb_*_c0 *.gcno *.gcda *.gcov UNUSED
|
26 |
9 |
arniml |
|
27 |
93 |
arniml |
ANALYZE = ghdl -a --std=87 --workdir=$(LIB_WORK) $(GCOV)
|
28 |
9 |
arniml |
|
29 |
116 |
arniml |
ELABORATE = ghdl -e --std=87 --workdir=$(LIB_WORK) $(GCOV_LINK)
|
30 |
9 |
arniml |
|
31 |
|
|
MAKE_LIB = mkdir -p $(LIB_WORK)
|
32 |
|
|
|
33 |
11 |
arniml |
|
34 |
|
|
##############################################################################
|
35 |
|
|
# The analyze targets
|
36 |
|
|
#
|
37 |
71 |
arniml |
tb_t8039_behav_c0 = $(LIB_WORK)/tb_t8039-c.o
|
38 |
|
|
tb_t8039 = $(LIB_WORK)/tb_t8039.o
|
39 |
11 |
arniml |
tb_t8048_behav_c0 = $(LIB_WORK)/tb_t8048-c.o
|
40 |
|
|
tb_t8048 = $(LIB_WORK)/tb_t8048.o
|
41 |
|
|
tb_behav_c0 = $(LIB_WORK)/tb-c.o
|
42 |
|
|
tb = $(LIB_WORK)/tb.o
|
43 |
79 |
arniml |
if_timing_behav_c0 = $(LIB_WORK)/if_timing-c.o
|
44 |
|
|
if_timing = $(LIB_WORK)/if_timing.o
|
45 |
11 |
arniml |
t8048_struct_c0 = $(LIB_WORK)/t8048-c.o
|
46 |
|
|
t8048 = $(LIB_WORK)/t8048.o
|
47 |
71 |
arniml |
t8039_struct_c0 = $(LIB_WORK)/t8039-c.o
|
48 |
|
|
t8039 = $(LIB_WORK)/t8039.o
|
49 |
151 |
arniml |
t48_system_comp_pack = $(LIB_WORK)/t48_system_comp_pack-p.o
|
50 |
154 |
arniml |
t8039_notri_struct_c0 = $(LIB_WORK)/t8039_notri-c.o
|
51 |
|
|
t8039_notri = $(LIB_WORK)/t8039_notri.o
|
52 |
151 |
arniml |
t8048_notri_struct_c0 = $(LIB_WORK)/t8048_notri-c.o
|
53 |
|
|
t8048_notri = $(LIB_WORK)/t8048_notri.o
|
54 |
9 |
arniml |
t48_tb_pack = $(LIB_WORK)/t48_tb_pack-p.o
|
55 |
|
|
t48_pack = $(LIB_WORK)/t48_pack-p.o
|
56 |
|
|
t48_core_struct_c0 = $(LIB_WORK)/t48_core-c.o
|
57 |
|
|
t48_core = $(LIB_WORK)/t48_core.o
|
58 |
|
|
t48_core_comp_pack = $(LIB_WORK)/t48_core_comp_pack-p.o
|
59 |
|
|
t48_comp_pack = $(LIB_WORK)/t48_comp_pack-p.o
|
60 |
|
|
syn_rom = $(LIB_WORK)/syn_rom-e.o
|
61 |
|
|
syn_rom-lpm-a = $(LIB_WORK)/syn_rom-lpm-a.o
|
62 |
|
|
syn_rom_lpm_c0 = $(LIB_WORK)/syn_rom-lpm-c.o
|
63 |
|
|
lpm_rom = $(LIB_WORK)/lpm_rom.o
|
64 |
|
|
syn_ram = $(LIB_WORK)/syn_ram-e.o
|
65 |
|
|
syn_ram-lpm-a = $(LIB_WORK)/syn_ram-lpm-a.o
|
66 |
|
|
syn_ram_lpm_c0 = $(LIB_WORK)/syn_ram-lpm-c.o
|
67 |
|
|
lpm_ram_dq = $(LIB_WORK)/lpm_ram_dq.o
|
68 |
|
|
psw_rtl_c0 = $(LIB_WORK)/psw-c.o
|
69 |
|
|
psw = $(LIB_WORK)/psw.o
|
70 |
|
|
pmem_ctrl_rtl_c0 = $(LIB_WORK)/pmem_ctrl-c.o
|
71 |
|
|
pmem_ctrl_pack = $(LIB_WORK)/pmem_ctrl_pack-p.o
|
72 |
|
|
pmem_ctrl = $(LIB_WORK)/pmem_ctrl.o
|
73 |
|
|
p2_rtl_c0 = $(LIB_WORK)/p2-c.o
|
74 |
|
|
p2 = $(LIB_WORK)/p2.o
|
75 |
|
|
p1_rtl_c0 = $(LIB_WORK)/p1-c.o
|
76 |
|
|
p1 = $(LIB_WORK)/p1.o
|
77 |
|
|
timer_rtl_c0 = $(LIB_WORK)/timer-c.o
|
78 |
|
|
timer = $(LIB_WORK)/timer.o
|
79 |
|
|
opc_table_rtl_c0 = $(LIB_WORK)/opc_table-c.o
|
80 |
|
|
opc_table = $(LIB_WORK)/opc_table.o
|
81 |
|
|
opc_decoder_rtl_c0 = $(LIB_WORK)/opc_decoder-c.o
|
82 |
|
|
opc_decoder = $(LIB_WORK)/opc_decoder.o
|
83 |
|
|
int_rtl_c0 = $(LIB_WORK)/int-c.o
|
84 |
|
|
int = $(LIB_WORK)/int.o
|
85 |
|
|
dmem_ctrl_rtl_c0 = $(LIB_WORK)/dmem_ctrl-c.o
|
86 |
|
|
dmem_ctrl_pack = $(LIB_WORK)/dmem_ctrl_pack-p.o
|
87 |
|
|
dmem_ctrl = $(LIB_WORK)/dmem_ctrl.o
|
88 |
|
|
decoder_rtl_c0 = $(LIB_WORK)/decoder-c.o
|
89 |
|
|
decoder_pack = $(LIB_WORK)/decoder_pack-p.o
|
90 |
|
|
decoder = $(LIB_WORK)/decoder.o
|
91 |
|
|
db_bus_rtl_c0 = $(LIB_WORK)/db_bus-c.o
|
92 |
|
|
db_bus = $(LIB_WORK)/db_bus.o
|
93 |
|
|
cond_branch_rtl_c0 = $(LIB_WORK)/cond_branch-c.o
|
94 |
|
|
cond_branch_pack = $(LIB_WORK)/cond_branch_pack-p.o
|
95 |
|
|
cond_branch = $(LIB_WORK)/cond_branch.o
|
96 |
|
|
clock_ctrl_rtl_c0 = $(LIB_WORK)/clock_ctrl-c.o
|
97 |
|
|
clock_ctrl = $(LIB_WORK)/clock_ctrl.o
|
98 |
|
|
bus_mux_rtl_c0 = $(LIB_WORK)/bus_mux-c.o
|
99 |
|
|
bus_mux = $(LIB_WORK)/bus_mux.o
|
100 |
|
|
alu_rtl_c0 = $(LIB_WORK)/alu-c.o
|
101 |
|
|
alu_pack = $(LIB_WORK)/alu_pack-p.o
|
102 |
|
|
alu = $(LIB_WORK)/alu.o
|
103 |
11 |
arniml |
#
|
104 |
|
|
##############################################################################
|
105 |
9 |
arniml |
|
106 |
|
|
|
107 |
11 |
arniml |
##############################################################################
|
108 |
75 |
arniml |
# The default target for elaboration
|
109 |
|
|
#
|
110 |
|
|
.PHONY: all
|
111 |
|
|
all: elaborate
|
112 |
|
|
#
|
113 |
|
|
##############################################################################
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
##############################################################################
|
117 |
11 |
arniml |
# The elaboration targets
|
118 |
|
|
#
|
119 |
71 |
arniml |
tb_elab = tb_behav_c0
|
120 |
|
|
tb_t8048_elab = tb_t8048_behav_c0
|
121 |
|
|
tb_t8039_elab = tb_t8039_behav_c0
|
122 |
11 |
arniml |
#
|
123 |
|
|
##############################################################################
|
124 |
|
|
|
125 |
|
|
|
126 |
|
|
##############################################################################
|
127 |
|
|
# Tool-specific elaboration rules
|
128 |
|
|
#
|
129 |
9 |
arniml |
$(tb_elab) : $(tb_behav_c0)
|
130 |
|
|
$(ELABORATE) tb_behav_c0; \
|
131 |
|
|
strip tb_behav_c0
|
132 |
|
|
|
133 |
|
|
$(tb_t8048_elab) : $(tb_t8048_behav_c0)
|
134 |
|
|
$(ELABORATE) tb_t8048_behav_c0; \
|
135 |
|
|
strip tb_t8048_behav_c0
|
136 |
|
|
|
137 |
71 |
arniml |
$(tb_t8039_elab) : $(tb_t8039_behav_c0)
|
138 |
|
|
$(ELABORATE) tb_t8039_behav_c0; \
|
139 |
|
|
strip tb_t8039_behav_c0
|
140 |
|
|
|
141 |
9 |
arniml |
.PHONY: elaborate
|
142 |
71 |
arniml |
elaborate: $(LIB_WORK) $(tb_elab) $(tb_t8048_elab) $(tb_t8039_elab)
|
143 |
11 |
arniml |
#
|
144 |
|
|
##############################################################################
|
145 |
9 |
arniml |
|
146 |
11 |
arniml |
|
147 |
9 |
arniml |
include Makefile.hier
|