// where each IO will have the same number of muxes.''')
for cell in p.muxed_cells:
- cnum = int(math.log(len(cell) - 1, 2))
+ cnum = 'Bit#(' + str(int(math.log(len(cell) - 1, 2))) + ')'
bsv_file.write(mux_interface.ifacefmt(cell[0], cnum))
bsv_file.write('''
''')
for cell in p.muxed_cells:
bsv_file.write(mux_interface.wirefmt(
- cell[0], int(math.log(len(cell) - 1, 2))))
+ cell[0], 'Bit#('+str(int(math.log(len(cell) - 1, 2)))+')'))
ifaces.wirefmt(bsv_file)
for cell in p.muxed_cells:
bsv_file.write(
mux_interface.ifacedef(
- cell[0], int(
+ cell[0], 'Bit#(' + str(int(
math.log(
- len(cell) - 1, 2))))
+ len(cell) - 1, 2))) + ')'))
bsv_file.write('''
endinterface;
interface peripheral_side = interface PeripheralSide
# == Intermediate wire definitions, special cases ==#
muxwire = '''
- Wire#(Bit#({1})) wrcell{0}_mux<-mkDWire(0);'''
+ Wire#({1}) wrcell{0}_mux<-mkDWire(0);'''
generic_io = '''
GenericIOType cell{0}_mux_out=unpack(0);
Wire#(Bit#(1)) cell{0}_mux_in<-mkDWire(0);