rename interface format fn
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Mar 2018 21:03:37 +0000 (21:03 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Mar 2018 21:03:37 +0000 (21:03 +0000)
src/interface_decl.py
src/pinmux_generator.py

index 7fab0fb6c8ddb881a15416b12a61de93f5b5407b..1ceb841fb7baa5fb89f0e9949bddb4965a62bee8 100644 (file)
@@ -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
index 4f1fd4c76fb7222b0551c7c76089a2e04808897d..4b8254b30a5c43221adf4090ec4ef977c1516cba 100644 (file)
@@ -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=======