whitespace cleanup
[pinmux.git] / src / pinmux_generator.py
index e8d629d0982363112ce26c916336e7a91ff35abe..661060f63c7c8c0eee032161648e288d8fae8d6a 100644 (file)
@@ -59,6 +59,7 @@ footer = '''
 endpackage
 '''
 
+
 def pinmuxgen(pth=None, verify=True):
     """ populating the file with the code
     """
@@ -92,8 +93,8 @@ def pinmuxgen(pth=None, verify=True):
       // where each IO will have the same number of muxes.''')
 
         for cell in p.muxed_cells:
-            bsv_file.write(mux_interface.ifacefmt(cell[0],
-                                              int(math.log(len(cell) - 1, 2))))
+            cnum = int(math.log(len(cell) - 1, 2))
+            bsv_file.write(mux_interface.ifacefmt(cell[0], cnum))
 
         bsv_file.write('''
       endinterface
@@ -238,6 +239,7 @@ endpackage
         bsv_file.write(axi4_lite.format(p.ADDR_WIDTH, p.DATA_WIDTH))
     # ##################################################
 
+
 def printhelp():
     print ('''pinmux_generator.py [-o outputdir] [-v|--validate] [-h|--help]
     -o outputdir    : defaults to bsv_src.  also location for reading pinmux.txt
@@ -246,6 +248,7 @@ def printhelp():
     -h | --help     : this help message
 ''')
 
+
 if __name__ == '__main__':
     try:
         options, remainder = getopt.getopt(
@@ -273,4 +276,3 @@ if __name__ == '__main__':
             sys.exit(0)
 
     pinmuxgen(output_dir, validate)
-