09c049de54b50e93a23537fe25d60a43ab6e324b
[pinmux.git] / src / bsv / peripheral_gen / jtag.py
1 from bsv.peripheral_gen.base import PBase
2
3 class jtag(PBase):
4
5 def axi_slave_name(self, name, ifacenum):
6 return ''
7
8 def axi_slave_idx(self, idx, name, ifacenum):
9 return ('', 0)
10
11 def axi_addr_map(self, name, ifacenum):
12 return ''
13
14 def slowifdeclmux(self):
15 return " method Action jtag_ms (Bit#(1) in);\n" + \
16 " method Bit#(1) jtag_di;\n" + \
17 " method Action jtag_do (Bit#(1) in);\n" + \
18 " method Action jtag_ck (Bit#(1) in);"
19
20 def slowifinstance(self):
21 return jtag_method_template # bit of a lazy hack this...
22
23 jtag_method_template = """\
24 method Action jtag_ms (Bit#(1) in);
25 pinmux.peripheral_side.jtag_ms(in);
26 endmethod
27 method Bit#(1) jtag_di=pinmux.peripheral_side.jtag_di;
28 method Action jtag_do (Bit#(1) in);
29 pinmux.peripheral_side.jtag_do(in);
30 endmethod
31 method Action jtag_ck (Bit#(1) in);
32 pinmux.peripheral_side.jtag_ck(in);
33 endmethod
34 """