1 from bsv
.peripheral_gen
.base
import PBase
7 return " import jtagtdm::*;\n"
9 def extfastifinstance(self
, name
, count
):
11 print "jtag", name
, count
13 method Action tms_i(Bit#(1) tms);
16 method Action tdi_i(Bit#(1) tdi);
19 method Action bs_chain_i(Bit#(1) bs_chain);
20 {0}.bs_chain_i(bs_chain);
22 method Bit#(1) shiftBscan2Edge={0}.shiftBscan2Edge;
23 method Bit#(1) selectJtagInput={0}.selectJtagInput;
24 method Bit#(1) selectJtagOutput={0}.selectJtagOutput;
25 method Bit#(1) updateBscan={0}.updateBscan;
26 method Bit#(1) bscan_in={0}.bscan_in;
27 method Bit#(1) scan_shift_en={0}.scan_shift_en;
28 method Bit#(1) tdo={0}.tdo;
29 method Bit#(1) tdo_oe={0}.tdo_oe;
30 """.format(self
.name
, count
)
34 def fastifdecl(self
, name
, count
):
37 (*always_ready,always_enabled*) method Action tms_i(Bit#(1) tms);
38 (*always_ready,always_enabled*) method Action tdi_i(Bit#(1) tdi);
39 (*always_ready,always_enabled*)
40 method Action bs_chain_i(Bit#(1) bs_chain);
41 (*always_ready,always_enabled*) method Bit#(1) shiftBscan2Edge;
42 (*always_ready,always_enabled*) method Bit#(1) selectJtagInput;
43 (*always_ready,always_enabled*) method Bit#(1) selectJtagOutput;
44 (*always_ready,always_enabled*) method Bit#(1) updateBscan;
45 (*always_ready,always_enabled*) method Bit#(1) bscan_in;
46 (*always_ready,always_enabled*) method Bit#(1) scan_shift_en;
47 (*always_ready,always_enabled*) method Bit#(1) tdo;
48 (*always_ready,always_enabled*) method Bit#(1) tdo_oe;
52 def mkfast_peripheral(self
):
54 Ifc_jtagdtm jtag{0} <-mkjtagdtm(clocked_by tck, reset_by trst);
55 rule drive_tmp_scan_outs;
56 jtag{0}.scan_out_1_i(1'b0);
57 jtag{0}.scan_out_2_i(1'b0);
58 jtag{0}.scan_out_3_i(1'b0);
59 jtag{0}.scan_out_4_i(1'b0);
60 jtag{0}.scan_out_5_i(1'b0);
63 def axi_slave_name(self
, name
, ifacenum
, typ
=''):
66 def axi_slave_idx(self
, idx
, name
, ifacenum
, typ
):
69 def axi_addr_map(self
, name
, ifacenum
):