merge redundant function params
[pinmux.git] / src / bsv / peripheral_gen / rs232.py
1 from bsv.peripheral_gen.base import PBase
2
3
4 class rs232(PBase):
5
6 def slowimport(self):
7 return " import Uart_bs::*;\n" + \
8 " import RS232_modified::*;"
9
10 def slowifdecl(self):
11 return " interface RS232 uart{0}_coe;"
12
13 def num_axi_regs32(self):
14 return 2
15
16 def mkslow_peripheral(self, size=0):
17 return " //Ifc_Uart_bs uart{0} <-" + \
18 " // mkUart_bs(clocked_by uart_clock,\n" + \
19 " // reset_by uart_reset,sp_clock, sp_reset);" +\
20 " Ifc_Uart_bs uart{0} <-" + \
21 " mkUart_bs(clocked_by sp_clock,\n" + \
22 " reset_by sp_reset, sp_clock, sp_reset);"
23
24 def _mk_connection(self, name=None, count=0):
25 return "uart{0}.slave_axi_uart"
26
27 def pinname_out(self, pname):
28 return {'tx': 'coe_rs232.sout'}.get(pname, '')
29
30 def pinname_in(self, pname):
31 return {'rx': 'coe_rs232.sin'}.get(pname, '')