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 |
218 |
arniml |
# Copyright (c) 2004-2006 Arnim Laeuger (arniml@opencores.org)
|
9 |
11 |
arniml |
#
|
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 |
232 |
arniml |
rm -f tb_*_c0 *.gcno *.gcda *.gcov *.hex UNUSED
|
26 |
9 |
arniml |
|
27 |
93 |
arniml |
ANALYZE = ghdl -a --std=87 --workdir=$(LIB_WORK) $(GCOV)
|
28 |
9 |
arniml |
|
29 |
218 |
arniml |
ELABORATE = ghdl -e -Wl,-s --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 |
259 |
arniml |
tb_t8243_behav_c0 = $(LIB_WORK)/tb_t8243-c.o
|
38 |
|
|
tb_t8243 = $(LIB_WORK)/tb_t8243.o
|
39 |
|
|
tb_t8048_t8243_behav_c0 = $(LIB_WORK)/tb_t8048_t8243-c.o
|
40 |
|
|
tb_t8048_t8243 = $(LIB_WORK)/tb_t8048_t8243.o
|
41 |
|
|
t8243_struct_c0 = $(LIB_WORK)/t8243-c.o
|
42 |
|
|
t8243 = $(LIB_WORK)/t8243.o
|
43 |
|
|
t8243_async_notri_struct_c0 = $(LIB_WORK)/t8243_async_notri-c.o
|
44 |
|
|
t8243_async_notri = $(LIB_WORK)/t8243_async_notri.o
|
45 |
|
|
t8243_sync_notri_struct_c0 = $(LIB_WORK)/t8243_sync_notri-c.o
|
46 |
|
|
t8243_sync_notri = $(LIB_WORK)/t8243_sync_notri.o
|
47 |
|
|
t8243_core_rtl_c0 = $(LIB_WORK)/t8243_core-c.o
|
48 |
|
|
t8243_core = $(LIB_WORK)/t8243_core.o
|
49 |
|
|
t8243_comp_pack = $(LIB_WORK)/t8243_comp_pack-p.o
|
50 |
71 |
arniml |
tb_t8039_behav_c0 = $(LIB_WORK)/tb_t8039-c.o
|
51 |
|
|
tb_t8039 = $(LIB_WORK)/tb_t8039.o
|
52 |
11 |
arniml |
tb_t8048_behav_c0 = $(LIB_WORK)/tb_t8048-c.o
|
53 |
|
|
tb_t8048 = $(LIB_WORK)/tb_t8048.o
|
54 |
|
|
tb_behav_c0 = $(LIB_WORK)/tb-c.o
|
55 |
|
|
tb = $(LIB_WORK)/tb.o
|
56 |
79 |
arniml |
if_timing_behav_c0 = $(LIB_WORK)/if_timing-c.o
|
57 |
|
|
if_timing = $(LIB_WORK)/if_timing.o
|
58 |
11 |
arniml |
t8048_struct_c0 = $(LIB_WORK)/t8048-c.o
|
59 |
|
|
t8048 = $(LIB_WORK)/t8048.o
|
60 |
71 |
arniml |
t8039_struct_c0 = $(LIB_WORK)/t8039-c.o
|
61 |
|
|
t8039 = $(LIB_WORK)/t8039.o
|
62 |
151 |
arniml |
t48_system_comp_pack = $(LIB_WORK)/t48_system_comp_pack-p.o
|
63 |
154 |
arniml |
t8039_notri_struct_c0 = $(LIB_WORK)/t8039_notri-c.o
|
64 |
|
|
t8039_notri = $(LIB_WORK)/t8039_notri.o
|
65 |
151 |
arniml |
t8048_notri_struct_c0 = $(LIB_WORK)/t8048_notri-c.o
|
66 |
|
|
t8048_notri = $(LIB_WORK)/t8048_notri.o
|
67 |
9 |
arniml |
t48_tb_pack = $(LIB_WORK)/t48_tb_pack-p.o
|
68 |
|
|
t48_pack = $(LIB_WORK)/t48_pack-p.o
|
69 |
|
|
t48_core_struct_c0 = $(LIB_WORK)/t48_core-c.o
|
70 |
|
|
t48_core = $(LIB_WORK)/t48_core.o
|
71 |
|
|
t48_core_comp_pack = $(LIB_WORK)/t48_core_comp_pack-p.o
|
72 |
|
|
t48_comp_pack = $(LIB_WORK)/t48_comp_pack-p.o
|
73 |
|
|
lpm_rom = $(LIB_WORK)/lpm_rom.o
|
74 |
232 |
arniml |
t48_rom = $(LIB_WORK)/t48_rom-e.o
|
75 |
|
|
t48_rom_lpm_a = $(LIB_WORK)/t48_rom-lpm-a.o
|
76 |
|
|
t48_rom_lpm_c0 = $(LIB_WORK)/t48_rom-lpm-c.o
|
77 |
|
|
t49_rom = $(LIB_WORK)/t49_rom-e.o
|
78 |
|
|
t49_rom_lpm_a = $(LIB_WORK)/t49_rom-lpm-a.o
|
79 |
|
|
t49_rom_lpm_c0 = $(LIB_WORK)/t49_rom-lpm-c.o
|
80 |
|
|
generic_ram_ena = $(LIB_WORK)/generic_ram_ena.o
|
81 |
|
|
generic_ram_ena_rtl_c0 = $(LIB_WORK)/generic_ram_ena-c.o
|
82 |
9 |
arniml |
lpm_ram_dq = $(LIB_WORK)/lpm_ram_dq.o
|
83 |
|
|
psw_rtl_c0 = $(LIB_WORK)/psw-c.o
|
84 |
|
|
psw = $(LIB_WORK)/psw.o
|
85 |
|
|
pmem_ctrl_rtl_c0 = $(LIB_WORK)/pmem_ctrl-c.o
|
86 |
|
|
pmem_ctrl_pack = $(LIB_WORK)/pmem_ctrl_pack-p.o
|
87 |
|
|
pmem_ctrl = $(LIB_WORK)/pmem_ctrl.o
|
88 |
|
|
p2_rtl_c0 = $(LIB_WORK)/p2-c.o
|
89 |
|
|
p2 = $(LIB_WORK)/p2.o
|
90 |
|
|
p1_rtl_c0 = $(LIB_WORK)/p1-c.o
|
91 |
|
|
p1 = $(LIB_WORK)/p1.o
|
92 |
|
|
timer_rtl_c0 = $(LIB_WORK)/timer-c.o
|
93 |
|
|
timer = $(LIB_WORK)/timer.o
|
94 |
|
|
opc_table_rtl_c0 = $(LIB_WORK)/opc_table-c.o
|
95 |
|
|
opc_table = $(LIB_WORK)/opc_table.o
|
96 |
|
|
opc_decoder_rtl_c0 = $(LIB_WORK)/opc_decoder-c.o
|
97 |
|
|
opc_decoder = $(LIB_WORK)/opc_decoder.o
|
98 |
|
|
int_rtl_c0 = $(LIB_WORK)/int-c.o
|
99 |
|
|
int = $(LIB_WORK)/int.o
|
100 |
|
|
dmem_ctrl_rtl_c0 = $(LIB_WORK)/dmem_ctrl-c.o
|
101 |
|
|
dmem_ctrl_pack = $(LIB_WORK)/dmem_ctrl_pack-p.o
|
102 |
|
|
dmem_ctrl = $(LIB_WORK)/dmem_ctrl.o
|
103 |
|
|
decoder_rtl_c0 = $(LIB_WORK)/decoder-c.o
|
104 |
|
|
decoder_pack = $(LIB_WORK)/decoder_pack-p.o
|
105 |
|
|
decoder = $(LIB_WORK)/decoder.o
|
106 |
|
|
db_bus_rtl_c0 = $(LIB_WORK)/db_bus-c.o
|
107 |
|
|
db_bus = $(LIB_WORK)/db_bus.o
|
108 |
|
|
cond_branch_rtl_c0 = $(LIB_WORK)/cond_branch-c.o
|
109 |
|
|
cond_branch_pack = $(LIB_WORK)/cond_branch_pack-p.o
|
110 |
|
|
cond_branch = $(LIB_WORK)/cond_branch.o
|
111 |
|
|
clock_ctrl_rtl_c0 = $(LIB_WORK)/clock_ctrl-c.o
|
112 |
|
|
clock_ctrl = $(LIB_WORK)/clock_ctrl.o
|
113 |
|
|
bus_mux_rtl_c0 = $(LIB_WORK)/bus_mux-c.o
|
114 |
|
|
bus_mux = $(LIB_WORK)/bus_mux.o
|
115 |
|
|
alu_rtl_c0 = $(LIB_WORK)/alu-c.o
|
116 |
|
|
alu_pack = $(LIB_WORK)/alu_pack-p.o
|
117 |
|
|
alu = $(LIB_WORK)/alu.o
|
118 |
11 |
arniml |
#
|
119 |
|
|
##############################################################################
|
120 |
9 |
arniml |
|
121 |
|
|
|
122 |
11 |
arniml |
##############################################################################
|
123 |
75 |
arniml |
# The default target for elaboration
|
124 |
|
|
#
|
125 |
|
|
.PHONY: all
|
126 |
|
|
all: elaborate
|
127 |
|
|
#
|
128 |
|
|
##############################################################################
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
##############################################################################
|
132 |
11 |
arniml |
# The elaboration targets
|
133 |
|
|
#
|
134 |
259 |
arniml |
tb_elab = tb_behav_c0
|
135 |
|
|
tb_t8048_elab = tb_t8048_behav_c0
|
136 |
|
|
tb_t8039_elab = tb_t8039_behav_c0
|
137 |
|
|
tb_t8048_t8243_elab = tb_t8048_t8243_behav_c0
|
138 |
|
|
tb_t8243_elab = tb_t8243_behav_c0
|
139 |
11 |
arniml |
#
|
140 |
|
|
##############################################################################
|
141 |
|
|
|
142 |
|
|
|
143 |
|
|
##############################################################################
|
144 |
|
|
# Tool-specific elaboration rules
|
145 |
|
|
#
|
146 |
9 |
arniml |
$(tb_elab) : $(tb_behav_c0)
|
147 |
218 |
arniml |
$(ELABORATE) tb_behav_c0
|
148 |
9 |
arniml |
|
149 |
|
|
$(tb_t8048_elab) : $(tb_t8048_behav_c0)
|
150 |
218 |
arniml |
$(ELABORATE) tb_t8048_behav_c0
|
151 |
9 |
arniml |
|
152 |
71 |
arniml |
$(tb_t8039_elab) : $(tb_t8039_behav_c0)
|
153 |
218 |
arniml |
$(ELABORATE) tb_t8039_behav_c0
|
154 |
71 |
arniml |
|
155 |
259 |
arniml |
$(tb_t8048_t8243_elab) : $(tb_t8048_t8243_behav_c0)
|
156 |
|
|
$(ELABORATE) tb_t8048_t8243_behav_c0
|
157 |
|
|
|
158 |
|
|
$(tb_t8243_elab) : $(tb_t8243_behav_c0)
|
159 |
|
|
$(ELABORATE) tb_t8243_behav_c0
|
160 |
|
|
|
161 |
9 |
arniml |
.PHONY: elaborate
|
162 |
259 |
arniml |
elaborate: $(LIB_WORK) $(tb_elab) $(tb_t8048_elab) $(tb_t8039_elab) \
|
163 |
|
|
$(tb_t8048_t8243_elab) $(tb_t8243_elab)
|
164 |
11 |
arniml |
#
|
165 |
|
|
##############################################################################
|
166 |
9 |
arniml |
|
167 |
11 |
arniml |
|
168 |
9 |
arniml |
include Makefile.hier
|