CHIPDIR=$(TOPDIR)/chip_corona
NSXLIBDIR=$(TOPDIR)/nsxlib
NIOLIBDIR=$(TOPDIR)/niolib
+# $(CHIPDIR)/chip_r.vhd
+# $(CHIPDIR)/corona_cts_r.vhd
VHDL_SOURCES = \
- $(CHIPDIR)/chip_r.vhd \
- $(CHIPDIR)/corona_cts_r.vhd \
$(wildcard $(VSTDIR)/*.vst) \
$(wildcard $(NSXLIBDIR)/*.vhd) \
$(wildcard $(NIOLIBDIR)/*.vhd)
-TOPLEVEL=chip_r
+TOPLEVEL=chip
TOPLEVEL_LANG=vhdl
MODULE=test
SIM=ghdl
txt = txt.replace("sys_rst : gpio",
"p_sys_rst: gpio")
+ # corona instance needs renaming too
+ txt = txt.replace("corona : corona", "instance_corona : corona")
+
# temporary hack to rename niolib to avoid name-clashes
for cell in ['gpio', 'vss', 'vdd', 'iovss', 'iovdd']:
txt = txt.replace(": %s" % cell, ": cmpt_%s" % cell)
res.append(line)
# re-join lines
txt = '\n'.join(res)
+ # easier to just post-process-correct the iovdd std_logic
+ for port in ['vss', 'vdd', 'iovss', 'iovdd']:
+ txt = txt.replace("%-9s: inout std_logic" % port,
+ "%-9s: in bit" % port)
+
+
# write the file
with open(fname, "w") as f:
f.write(txt)