|
32 | 32 | XRUN ?= $(XCELIUM_HOME)/tools/bin/xrun
|
33 | 33 |
|
34 | 34 | TOPLEVEL := {toplevel}
|
35 |
| -VPI_MODULES := {modules} |
36 | 35 | PARAMETERS ?= {parameters}
|
37 | 36 | PLUSARGS ?= {plusargs}
|
38 | 37 | XMSIM_OPTIONS ?= {xmsim_options}
|
39 | 38 | XRUN_OPTIONS ?= {xrun_options}
|
40 | 39 | EXTRA_OPTIONS ?= $(XRUN_OPTIONS) $(if $(XMSIM_OPTIONS),-xmsimargs '$(XMSIM_OPTIONS)',) $(addprefix -defparam ,$(PARAMETERS)) $(addprefix +,$(PLUSARGS))
|
41 | 40 |
|
42 |
| -XRUN_CALL = $(XRUN) -q -f edalize_main.f $(addprefix -pli ,$(VPI_MODULES)) $(EXTRA_OPTIONS) -top $(TOPLEVEL) |
| 41 | +XRUN_CALL = $(XRUN) -q -f edalize_main.f $(EXTRA_OPTIONS) -top $(TOPLEVEL) |
43 | 42 |
|
44 |
| -all: $(VPI_MODULES) |
| 43 | +all: |
45 | 44 |
|
46 |
| -run: $(VPI_MODULES) |
| 45 | +run: |
47 | 46 | $(XRUN_CALL)
|
48 | 47 |
|
49 |
| -run-gui: $(VPI_MODULES) |
| 48 | +run-gui: |
50 | 49 | $(XRUN_CALL) -gui -access rwc
|
51 |
| -
|
52 |
| -clean: {clean_targets} |
53 |
| -""" |
54 |
| - |
55 |
| -VPI_MAKE_SECTION = """ |
56 |
| -{name}_OBJS := {objs} |
57 |
| -{name}_LIBS := {libs} |
58 |
| -{name}_INCS := $(INCS) {incs} |
59 |
| -
|
60 |
| -$({name}_OBJS): %.o : %.c |
61 |
| - $(CC) $(CFLAGS) $({name}_INCS) -o $@ $< |
62 |
| -
|
63 |
| -{name}: $({name}_OBJS) |
64 |
| - $(LD) $(LDFLAGS) -o $@ $? $({name}_LIBS) |
65 |
| -
|
66 |
| -clean_{name}: |
67 |
| - $(RM) $({name}_OBJS) {name} |
| 50 | +clean: |
68 | 51 | """
|
69 | 52 |
|
70 | 53 |
|
@@ -167,32 +150,15 @@ def _write_makefile(self):
|
167 | 150 | _xmsim_options = self.tool_options.get("xmsim_options", [])
|
168 | 151 | _xrun_options = self.tool_options.get("xrun_options", [])
|
169 | 152 |
|
170 |
| - _modules = [m["name"] for m in self.vpi_modules] |
171 |
| - _clean_targets = " ".join(["clean_" + m for m in _modules]) |
172 | 153 | _s = MAKE_HEADER.format(
|
173 | 154 | toplevel=self.toplevel,
|
174 | 155 | parameters=" ".join(_parameters),
|
175 | 156 | plusargs=" ".join(_plusargs),
|
176 | 157 | xmsim_options=" ".join(_xmsim_options),
|
177 | 158 | xrun_options=" ".join(_xrun_options),
|
178 |
| - modules=" ".join(_modules), |
179 |
| - clean_targets=_clean_targets, |
180 | 159 | )
|
181 | 160 | vpi_make.write(_s)
|
182 | 161 |
|
183 |
| - for vpi_module in self.vpi_modules: |
184 |
| - _name = vpi_module["name"] |
185 |
| - _objs = [os.path.splitext(s)[0] + ".o" for s in vpi_module["src_files"]] |
186 |
| - _libs = ["-l" + l for l in vpi_module["libs"]] |
187 |
| - _incs = ["-I" + d for d in vpi_module["include_dirs"]] |
188 |
| - _s = VPI_MAKE_SECTION.format( |
189 |
| - name=_name, |
190 |
| - objs=" ".join(_objs), |
191 |
| - libs=" ".join(_libs), |
192 |
| - incs=" ".join(_incs), |
193 |
| - ) |
194 |
| - vpi_make.write(_s) |
195 |
| - |
196 | 162 | vpi_make.close()
|
197 | 163 |
|
198 | 164 | def configure_main(self):
|
|
0 commit comments