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