From: Luke Kenneth Casson Leighton Date: Tue, 20 Mar 2018 21:03:37 +0000 (+0000) Subject: rename interface format fn X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8dcccf3cbe046cf9b9f93974760cd176b324563;p=pinmux.git rename interface format fn --- diff --git a/src/interface_decl.py b/src/interface_decl.py index 7fab0fb..1ceb841 100644 --- a/src/interface_decl.py +++ b/src/interface_decl.py @@ -66,7 +66,7 @@ class Interface(object): def __str__(self): return '\n'+'\n'.join(map(str, self.pins)) - def format(self, i): + def ifacefmt(self, i): return str(self).format(i) # basic test diff --git a/src/pinmux_generator.py b/src/pinmux_generator.py index 4f1fd4c..4b8254b 100644 --- a/src/pinmux_generator.py +++ b/src/pinmux_generator.py @@ -90,39 +90,39 @@ with open("./bsv_src/pinmux.bsv", "w") as bsv_file: // and on output field (input to pinmux)''') for i in range(0, N_IO): bsv_file.write('''\n // interface for IO CEll-{0}''') - bsv_file.write(io_interface.format(i)) + bsv_file.write(io_interface.ifacefmt(i)) # ============================================================== # == create method definitions for all peripheral interfaces ==# for i in range(0, N_UART): bsv_file.write(''' // interface declaration between UART-{0} and pinmux'''.format(i)) - bsv_file.write(uartinterface_decl.format(i)) + bsv_file.write(uartinterface_decl.ifacefmt(i)) for i in range(0, N_SPI): bsv_file.write(''' // interface declaration between SPI-{0} and pinmux'''.format(i)) - bsv_file.write(spiinterface_decl.format(i)) + bsv_file.write(spiinterface_decl.ifacefmt(i)) for i in range(0, N_TWI): bsv_file.write(''' // interface declaration between TWI-{0} and pinmux'''.format(i)) - bsv_file.write(twiinterface_decl.format(i)) + bsv_file.write(twiinterface_decl.ifacefmt(i)) for i in range(0, N_SD): bsv_file.write(''' // interface declaration between SD-{0} and pinmux'''.format(i)) - bsv_file.write(sdinterface_decl.format(i)) + bsv_file.write(sdinterface_decl.ifacefmt(i)) for i in range(0, N_JTAG): bsv_file.write(''' // interface declaration between JTAG-{0} and pinmux'''.format(i)) - bsv_file.write(jtaginterface_decl.format(i)) + bsv_file.write(jtaginterface_decl.ifacefmt(i)) for i in range(0, N_PWM): bsv_file.write(''' // interface declaration between PWM-{0} and pinmux'''.format(i)) - bsv_file.write(pwminterface_decl.format(i)) + bsv_file.write(pwminterface_decl.ifacefmt(i)) # ============================================================== # ===== finish interface definition and start module definition=======