def mk_cellconn(self, *args):
return ''
+ def mkfast_peripheral(self, size=0):
+ return ''
+
def mkslow_peripheral(self, size=0):
return ''
for fname in ['slowimport',
'extifinstance', 'extifdecl',
'slowifdecl', 'slowifdeclmux',
- 'mkslow_peripheral', 'mk_plic', 'mk_ext_ifacedef',
+ 'mkslow_peripheral',
+ 'mkfast_peripheral',
+ 'mk_plic', 'mk_ext_ifacedef',
'mk_connection', 'mk_cellconn', 'mk_pincon']:
fn = CallFn(self, fname)
setattr(self, fname, types.MethodType(fn, self))
ret.append(self.data[name].axi_addr_map(i))
return '\n'.join(list(filter(None, ret)))
+ def mkfast_peripheral(self, *args):
+ ret = []
+ for (name, count) in self.ifacecount:
+ for i in range(count):
+ if self.is_on_fastbus(name, i):
+ continue
+ #print "mkfast", name, count
+ x = self.data[name].mkfast_peripheral()
+ print name, count, x
+ suffix = self.data[name].mksuffix(name, i)
+ ret.append(x.format(suffix))
+ return '\n'.join(list(filter(None, ret)))
+
def mkslow_peripheral(self, *args):
ret = []
for (name, count) in self.ifacecount:
for i in range(count):
if self.is_on_fastbus(name, i):
continue
- print "mkslow", name, count
+ #print "mkslow", name, count
x = self.data[name].mkslow_peripheral()
print name, count, x
suffix = self.data[name].mksuffix(name, i)
def slowimport(self):
return " import jtagtdm::*;\n"
- def mkslow_peripheral(self):
+ def mkfast_peripheral(self):
return """\
- Ifc_jtagdtm {0} <-mkjtagdtm(clocked_by tck, reset_by trst);
- rule drive_tmp_scan_outs;
- {0}.scan_out_1_i(1'b0);
- {0}.scan_out_2_i(1'b0);
- {0}.scan_out_3_i(1'b0);
- {0}.scan_out_4_i(1'b0);
- {0}.scan_out_5_i(1'b0);
- endrule
+ Ifc_jtagdtm jtag{0} <-mkjtagdtm(clocked_by tck, reset_by trst);
+ rule drive_tmp_scan_outs;
+ jtag{0}.scan_out_1_i(1'b0);
+ jtag{0}.scan_out_2_i(1'b0);
+ jtag{0}.scan_out_3_i(1'b0);
+ jtag{0}.scan_out_4_i(1'b0);
+ jtag{0}.scan_out_5_i(1'b0);
+ endrule
"""
def axi_slave_name(self, name, ifacenum):
return ''
regdef = ifaces.axi_reg_def()
slavedecl = ifaces.axi_slave_idx()
fnaddrmap = ifaces.axi_addr_map()
- mkfast = ifaces.mkslow_peripheral()
+ mkfast = ifaces.mkfast_peripheral()
mkcon = ifaces.mk_connection()
mkcellcon = ifaces.mk_cellconn()
pincon = ifaces.mk_pincon()