setting up uart communication in a riscv system in gem5 simualtor in python

main.py
from m5.objects import Uart8250

# Creating a UART device
uart = Uart8250()

# Connect the UART device to the simulated system
uart.pio.pio_id = 0
uart.pio.addr = 0x10000000
uart.pio.size = 8
uart.interrupt = 'fake'

# Set up the UART console
root = Root(full_system=True, system=system)
root.uart = uart
305 chars
15 lines

related categories

gistlibby LogSnag