refactor peripheral_gen, split out interface classes
[pinmux.git] / src / bsv / peripheral_gen / sdmmc.py
1 from bsv.peripheral_gen.base import PBase
2
3 class sdmmc(PBase):
4
5 def slowimport(self):
6 return " import sdcard_dummy :: *;"
7
8 def slowifdecl(self):
9 return " interface QSPI_out sd{0}_out;\n" + \
10 " method Bit#(1) sd{0}_isint;"
11
12 def num_axi_regs32(self):
13 return 13
14
15 def mkslow_peripheral(self):
16 return " Ifc_sdcard_dummy sd{0} <- mksdcard_dummy();"
17
18 def _mk_connection(self, name=None, count=0):
19 return "sd{0}.slave"
20
21 def pinname_in(self, pname):
22 return "%s_in" % pname
23
24 def pinname_out(self, pname):
25 if pname.startswith('d'):
26 return "%s_out" % pname
27 return pname
28
29 def pinname_outen(self, pname):
30 if pname.startswith('d'):
31 return "%s_outen" % pname