fixed indentation issue while generating wire definitions for TWI
[pinmux.git] / src / pinmux_generator.py
index 4f1fd4c76fb7222b0551c7c76089a2e04808897d..64bb373004dba5d43090074bf01a1c3613390cd7 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=======
@@ -168,7 +168,7 @@ with open("./bsv_src/pinmux.bsv", "w") as bsv_file:
         bsv_file.write(
         '''\n      // following wires capture signals to IO CELL if twi-{0} is
       // allotted to it'''.format(i))
-    bsv_file.write(twiwires.format(i))
+        bsv_file.write(twiwires.format(i))
 
     for i in range(0, N_SD):
         bsv_file.write(
@@ -210,7 +210,7 @@ with open("./bsv_src/pinmux.bsv", "w") as bsv_file:
     interface peripheral_side = interface PeripheralSide
 ''')
     for i in range(0, N_IO):
-        bsv_file.write(io_interface_def.format(i))
+        bsv_file.write(io_interface.ifacedef(i))
     for i in range(0, N_UART):
         bsv_file.write(uartinterface_def.format(i))
     for i in range(0, N_SPI):