# UART at 0xC000_2000, convert 32-bit bus down to 8-bit in an odd way
if uart_pins is not None:
# sigh actual UART in microwatt is 8-bit
- self.uart = UART16550(data_width=8)
+ self.uart = UART16550(data_width=8, pins=uart_pins)
# but (see soc.vhdl) 8-bit regs are addressed at 32-bit locations
cvtuartbus = wishbone.Interface(addr_width=5, data_width=32,
granularity=8)
# add the main core
pth = os.path.split(__file__)[0]
pth = os.path.join(pth, '../external_core_top.v')
- with open(pth) as f:
- platform.add_file('external_core_top.v', f)
+ fname = os.path.abspath(pth)
+ with open(fname) as f:
+ platform.add_file(fname, f)
return m
uart_pins=uart_pins,
firmware=firmware)
+ if toolchain == 'Trellis':
+ # add -abc9 option to yosys synth_ecp5
+ os.environ['NMIGEN_synth_opts'] = '-abc9'
+
if platform is not None:
# build and upload it
platform.build(soc, do_program=True)