whitespace cleanup
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Mar 2018 14:26:56 +0000 (14:26 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Mar 2018 14:26:56 +0000 (14:26 +0000)
src/actual_pinmux.py
src/parse.py
src/pinmux_generator.py

index 82a0ef2db1d6f6f0ae0b2ec757f0e8eb350b19de..76a0e2e0ca686f5bf7e132e30b88d501b1d775f9 100644 (file)
@@ -66,9 +66,9 @@ def init(p):
             temp = temp.replace(' ', '')
             x = dictionary.get(temp)
             assert x is not None, "ERROR: The signal : " + \
-                    str(cell[i + 1]) + \
-                    " of pinmap.txt isn't present \nin the current" + \
-                  " dictionary. Update dictionary or fix-typo."
+                str(cell[i + 1]) + \
+                " of pinmap.txt isn't present \nin the current" + \
+                " dictionary. Update dictionary or fix-typo."
             if x == "input":
                 p.pinmux += \
                     mux_wire.format(cell[0], i, "wr" + cell[i + 1]) + "\n"
index aeb0c8b429d29a4f960d847fb272e409dc76648b..a02ff8fb619bf6f466aff063d9837f343e7e42ab 100644 (file)
@@ -56,7 +56,7 @@ class Parse(object):
 
         self.pinnumbers = sorted(self.pinnumbers)
         self.upper_offset = self.lower_offset + \
-                            int(math.log(len(self.muxed_cells), 2))
+            int(math.log(len(self.muxed_cells), 2))
 
         if verify:
             self.do_checks()
@@ -100,6 +100,7 @@ class Parse(object):
 
         # TODO
 
+
 if __name__ == '__main__':
     p = Parse()
     print p.N_IO
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)
-