`ifdef DDR
(*prefix="M_AXI"*) interface AXI4_Master_IFC#(`PADDR, `Reg_width, `USERSPACE) master;
`endif
- `ifdef Debug
- (*always_ready,always_enabled*)
- method Action tms_i(Bit#(1) tms);
- (*always_ready,always_enabled*)
- method Action tdi_i(Bit#(1) tdi);
- (*always_ready,always_enabled*)
- method Action bs_chain_i(Bit#(1) bs_chain);
- (*always_ready,always_enabled*)
- method Bit#(1) shiftBscan2Edge;
- (*always_ready,always_enabled*)
- method Bit#(1) selectJtagInput;
- (*always_ready,always_enabled*)
- method Bit#(1) selectJtagOutput;
- (*always_ready,always_enabled*)
- method Bit#(1) updateBscan;
- (*always_ready,always_enabled*)
- method Bit#(1) bscan_in;
- (*always_ready,always_enabled*)
- method Bit#(1) scan_shift_en;
- (*always_ready,always_enabled*)
- method Bit#(1) tdo;
- (*always_ready,always_enabled*)
- method Bit#(1) tdo_oe;
- `endif
`ifdef HYPER
(*always_ready,always_enabled*)
interface Ifc_flash ifc_flash;
def has_axi_master(self):
return False
+ def fastifdecl(self, name, count):
+ return ''
+
def slowifdeclmux(self, name, count):
return ''
for fname in ['slowimport',
'extifinstance', 'extifdecl',
'slowifdecl', 'slowifdeclmux',
+ 'fastifdecl',
'mkslow_peripheral',
'mkfast_peripheral',
'mk_plic', 'mk_ext_ifacedef',
ret.append(self.data[name].slowifdeclmux(name, i))
return '\n'.join(list(filter(None, ret)))
+ def fastifdecl(self, *args):
+ ret = []
+ for (name, count) in self.ifacecount:
+ for i in range(count):
+ print "fastifdecl", name, i, self.is_on_fastbus(name, i)
+ if self.is_on_fastbus(name, i):
+ continue
+ ret.append(self.data[name].fastifdecl(name, i))
+ return '\n'.join(list(filter(None, ret)))
+
def slowifdecl(self, *args):
ret = []
for (name, count) in self.ifacecount:
def slowimport(self):
return " import jtagtdm::*;\n"
+ def fastifdecl(self, name, count):
+ # YUK!
+ template = """ \
+ (*always_ready,always_enabled*) method Action tms_i(Bit#(1) tms);
+ (*always_ready,always_enabled*) method Action tdi_i(Bit#(1) tdi);
+ (*always_ready,always_enabled*)
+ method Action bs_chain_i(Bit#(1) bs_chain);
+ (*always_ready,always_enabled*) method Bit#(1) shiftBscan2Edge;
+ (*always_ready,always_enabled*) method Bit#(1) selectJtagInput;
+ (*always_ready,always_enabled*) method Bit#(1) selectJtagOutput;
+ (*always_ready,always_enabled*) method Bit#(1) updateBscan;
+ (*always_ready,always_enabled*) method Bit#(1) bscan_in;
+ (*always_ready,always_enabled*) method Bit#(1) scan_shift_en;
+ (*always_ready,always_enabled*) method Bit#(1) tdo;
+ (*always_ready,always_enabled*) method Bit#(1) tdo_oe;
+"""
+ return template
+
def mkfast_peripheral(self):
return """\
Ifc_jtagdtm jtag{0} <-mkjtagdtm(clocked_by tck, reset_by trst);
with open(soct) as bsv_file:
soct = bsv_file.read()
imports = ifaces.slowimport()
- ifdecl = "" #ifaces.slowifdeclmux() + '\n' + ifaces.extifdecl()
+ ifdecl = ifaces.fastifdecl()
+#ifaces.slowifdeclmux() + '\n' + ifaces.extifdecl()
regdef = ifaces.axi_reg_def()
slavedecl = ifaces.axi_fastslave_idx()
mastdecl = ifaces.axi_master_idx()