must declare mux selection same bitwidth
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 14 Apr 2018 11:28:03 +0000 (12:28 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 14 Apr 2018 11:28:03 +0000 (12:28 +0100)
src/bsv/pinmux_generator.py

index 7a01fb33ccfc8589f3c029fbd93e27b0f3b681d0..d45f5dfed28753c6fba09175af8c4ec2f7e2623f 100644 (file)
@@ -170,9 +170,7 @@ def write_pmp(pmp, p, ifaces):
         for cell in p.muxed_cells:
             bsv_file.write(
                 mux_interface.ifacedef(
-                    cell[0], 'Bit#(' + str(int(
-                        math.log(
-                            len(cell) - 1, 2))) + ')'))
+                    cell[0], cell_bit_width))
         bsv_file.write('''
     endinterface;
     interface peripheral_side = interface PeripheralSide