nvic: IRQControllers.NVIC @ sysbus 0xE000E000
    priorityMask: 0xF0
    systickFrequency: 32000000
    IRQ -> cpu@0

cpu: CPU.CortexM @ sysbus
    cpuType: "cortex-m33"
    nvic: nvic

code_flash: Memory.MappedMemory @ sysbus 0x0
    size: 0x200000

// should be 0x10080f0 - 0x10081b4, but the registered memory region has to be aligned to page boundaries
factory_flash: Memory.MappedMemory @ sysbus 0x1008000
    size: 0x400

// should be 0x100a100 - 0x100a300, but the registered memory region has to be aligned to page boundaries
option_setting_flash: Memory.MappedMemory @ sysbus 0x100A000
    size: 0x400

data_flash: Memory.MappedMemory @ sysbus 0x8000000
    size: 0x2000

sram: Memory.MappedMemory @ sysbus 0x20000000
    size: 0x80000

icu: IRQControllers.RenesasRA_ICU @ sysbus 0x40006000
    nvic: nvic

sysc_oscsf: Python.PythonPeripheral @ sysbus 0x4001E03C
    size: 0x4
    initable: true
    script: "request.Value = 0xFF"

gpt: Timers.RenesasRA_GPT @ sysbus 0x40169000
    numberOf32BitChannels: 4
    numberOf16BitChannels: 6
    commonRegistersOffset: 0xa00
    peripheralClockDFrequency: 20000000
    [0x0-0x58] -> icu@[0x0C0-0x118]

agt0: Timers.RenesasRA_AGT @ sysbus 0x400E8000
    lowSpeedOnChipOscillatorFrequency: 32768
    subClockOscillatorFrequency: 32768
    peripheralClockBFrequency: 50000000
    IRQ -> icu@0x040
    CompareMatchA -> icu@0x041
    CompareMatchB -> icu@0x042

agt1: Timers.RenesasRA_AGT @ sysbus 0x400E8100
    lowSpeedOnChipOscillatorFrequency: 32768
    subClockOscillatorFrequency: 32768
    peripheralClockBFrequency: 50000000
    IRQ -> icu@0x043
    CompareMatchA -> icu@0x044
    CompareMatchB -> icu@0x045

agt2: Timers.RenesasRA_AGT @ sysbus 0x400E8200
    lowSpeedOnChipOscillatorFrequency: 32768
    subClockOscillatorFrequency: 32768
    peripheralClockBFrequency: 50000000
    IRQ -> icu@0x046
    CompareMatchA -> icu@0x047
    CompareMatchB -> icu@0x048

agt3: Timers.RenesasRA_AGT @ sysbus 0x400E8300
    lowSpeedOnChipOscillatorFrequency: 32768
    subClockOscillatorFrequency: 32768
    peripheralClockBFrequency: 50000000
    IRQ -> icu@0x049
    CompareMatchA -> icu@0x04A
    CompareMatchB -> icu@0x04B

agt4: Timers.RenesasRA_AGT @ sysbus 0x400E8400
    lowSpeedOnChipOscillatorFrequency: 32768
    subClockOscillatorFrequency: 32768
    peripheralClockBFrequency: 50000000
    IRQ -> icu@0x04C
    CompareMatchA -> icu@0x04D
    CompareMatchB -> icu@0x04E

agt5: Timers.RenesasRA_AGT @ sysbus 0x400E8500
    lowSpeedOnChipOscillatorFrequency: 32768
    subClockOscillatorFrequency: 32768
    peripheralClockBFrequency: 50000000
    IRQ -> icu@0x04F
    CompareMatchA -> icu@0x050
    CompareMatchB -> icu@0x051

sci0: SCI.RenesasRA6M5_SCI @ sysbus 0x40118000
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x180
    TransmitIRQ -> icu@0x181
    TransmitEndIRQ -> icu@0x182

sci1: SCI.RenesasRA6M5_SCI @ sysbus 0x40118100
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x186
    TransmitIRQ -> icu@0x187
    TransmitEndIRQ -> icu@0x188

sci2: SCI.RenesasRA6M5_SCI @ sysbus 0x40118200
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x18C
    TransmitIRQ -> icu@0x18D
    TransmitEndIRQ -> icu@0x18E

sci3: SCI.RenesasRA6M5_SCI @ sysbus 0x40118300
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x192
    TransmitIRQ -> icu@0x193
    TransmitEndIRQ -> icu@0x194

sci4: SCI.RenesasRA6M5_SCI @ sysbus 0x40118400
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x198
    TransmitIRQ -> icu@0x199
    TransmitEndIRQ -> icu@0x19A

sci5: SCI.RenesasRA6M5_SCI @ sysbus 0x40118500
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x19E
    TransmitIRQ -> icu@0x19F
    TransmitEndIRQ -> icu@0x1A0

sci6: SCI.RenesasRA6M5_SCI @ sysbus 0x40118600
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x1A4
    TransmitIRQ -> icu@0x1A5
    TransmitEndIRQ -> icu@0x1A6

sci7: SCI.RenesasRA6M5_SCI @ sysbus 0x40118700
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x1AA
    TransmitIRQ -> icu@0x1AB
    TransmitEndIRQ -> icu@0x1AC

sci8: SCI.RenesasRA6M5_SCI @ sysbus 0x40118800
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x1B0
    TransmitIRQ -> icu@0x1B1
    TransmitEndIRQ -> icu@0x1B2

sci9: SCI.RenesasRA6M5_SCI @ sysbus 0x40118900
    frequency: 50000000
    enableManchesterMode: false
    enableFIFO: false

    ReceiveIRQ -> icu@0x1B6
    TransmitIRQ -> icu@0x1B7
    TransmitEndIRQ -> icu@0x1B8

portMisc: GPIOPort.RenesasRA_GPIOMisc @ sysbus 0x40080D00

port0: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080000;
        sysbus new Bus.BusMultiRegistration { address: 0x40080800; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x0
    numberOfConnections: 13
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port1: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080020;
        sysbus new Bus.BusMultiRegistration { address: 0x40080840; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x1
    numberOfConnections: 16
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port2: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080040;
        sysbus new Bus.BusMultiRegistration { address: 0x40080880; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x2
    numberOfConnections: 15
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port3: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080060;
        sysbus new Bus.BusMultiRegistration { address: 0x400808C0; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x3
    numberOfConnections: 16
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port4: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080080;
        sysbus new Bus.BusMultiRegistration { address: 0x40080900; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x4
    numberOfConnections: 16
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port5: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x400800A0;
        sysbus new Bus.BusMultiRegistration { address: 0x40080940; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x5
    numberOfConnections: 12
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port6: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x400800C0;
        sysbus new Bus.BusMultiRegistration { address: 0x40080980; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x6
    numberOfConnections: 16
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port7: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x400800E0;
        sysbus new Bus.BusMultiRegistration { address: 0x400809C0; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x7
    numberOfConnections: 9
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port8: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080100;
        sysbus new Bus.BusMultiRegistration { address: 0x40080A00; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x8
    numberOfConnections: 7
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

port9: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080120;
        sysbus new Bus.BusMultiRegistration { address: 0x40080A40; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0x9
    numberOfConnections: 6
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

portA: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080140;
        sysbus new Bus.BusMultiRegistration { address: 0x40080A80; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0xA
    numberOfConnections: 5
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

portB: GPIOPort.RenesasRA6_GPIO @ {
        sysbus 0x40080160;
        sysbus new Bus.BusMultiRegistration { address: 0x40080AC0; size: 0x40; region: "pinConfiguration" }
    }
    portNumber: 0xB
    numberOfConnections: 2
    pfsMisc: portMisc

    IRQ0 -> icu@1
    IRQ1 -> icu@2
    IRQ2 -> icu@3
    IRQ3 -> icu@4
    IRQ4 -> icu@5
    IRQ5 -> icu@6
    IRQ6 -> icu@7
    IRQ7 -> icu@8
    IRQ8 -> icu@9
    IRQ9 -> icu@10
    IRQ10 -> icu@11
    IRQ11 -> icu@12
    IRQ12 -> icu@13
    IRQ13 -> icu@14
    IRQ14 -> icu@15
    IRQ15 -> icu@16

iic0: I2C.RenesasRA_IIC @ sysbus 0x4009F000
    ReceiveIRQ -> icu@0x073
    TransmitIRQ -> icu@0x074
    TransmitEndIRQ -> icu@0x075
    ErrorOrEventIRQ -> icu@0x076

iic1: I2C.RenesasRA_IIC @ sysbus 0x4009F100
    ReceiveIRQ -> icu@0x078
    TransmitIRQ -> icu@0x079
    TransmitEndIRQ -> icu@0x07A
    ErrorOrEventIRQ -> icu@0x07B

iic2: I2C.RenesasRA_IIC @ sysbus 0x4009F200
    ReceiveIRQ -> icu@0x07D
    TransmitIRQ -> icu@0x07E
    TransmitEndIRQ -> icu@0x07F
    ErrorOrEventIRQ -> icu@0x080

sysbus:
    init:
        Tag <0x40000000,0x40000673> "RMPU" // Renesas Memory Protection Unit
        Tag <0x40000e00,0x40000e07> "TZF" // TrustZone Filter
        Tag <0x40002000,0x400020db> "SRAM" // SRAM Control
        Tag <0x40003000,0x40004a73> "BUS" // Bus Control
        Tag <0x40005000,0x40005037> "DMAC0" // Direct memory access controller 0
        Tag <0x40005200,0x40005247> "DMA" // DMAC Module Activation
        Tag <0x40005400,0x40005427> "DTC" // Data Transfer Controller
        Tag <0x40007000,0x4000720b> "CACHE" // CACHE
        Tag <0x40008000,0x400081b7> "CPSCU" // CPU System Security Control Unit
        Tag <0x4001b000,0x4001b017> "DBG" // Debug Function
        Tag <0x4001c100,0x4001c143> "FCACHE" // SYSTEM/FLASH
        Tag <0x4001e000,0x4001e62b> "SYSC" // System Control
        Tag <0x40080800,0x40080d37> "PFS" // Control Register
        Tag <0x40082000,0x40082087> "ELC" // Event Link Controller
        Tag <0x40083000,0x400830ab> "RTC" // Realtime Clock
        Tag <0x40083200,0x40083207> "IWDT" // Independent Watchdog Timer
        Tag <0x40083400,0x4008340b> "WDT" // Watchdog Timer
        Tag <0x40083600,0x4008360f> "CAC" // Clock Frequency Accuracy Measurement Circuit
        Tag <0x40084000,0x40084023> "MSTP" // Module Stop Control
        Tag <0x4008a000,0x4008a307> "POEG" // Port Output Enable Module for GPT
        Tag <0x40090000,0x4009040b> "USBFS" // USB 2.0 Full-Speed Module
        Tag <0x40092000,0x400921e7> "SDHI0" // SD Host Interface 0
        Tag <0x4009d000,0x4009d037> "SSIE0" // Serial Sound Interface Enhanced (SSIE)
        Tag <0x400a6000,0x400a6087> "OSPI" // Octa Serial Peripheral Interface
        Tag <0x400ac000,0x400ac047> "CEC" // Consumer Electronics Control
        Tag <0x400b0000,0x400c4097> "CANFD" // CANFD
        Tag <0x400d0000,0x400d0027> "CTSU" // Capacitive Touch Sensing Unit
        Tag <0x400e0000,0x400e004b> "PSCU" // Peripheral Security Control Unit
        Tag <0x400f3000,0x400f3003> "TSN" // Temperature Sensor
        Tag <0x40108000,0x4010800f> "CRC" // Cyclic Redundancy Check Calculator
        Tag <0x40109000,0x40109007> "DOC" // Data Operation Circuit
        Tag <0x40111000,0x40111173> "USBHS" // USB 2.0 High-Speed Module
        Tag <0x40114000,0x401140df> "EDMAC0" // DMA Controller for the Ethernet Controller Channel 0
        Tag <0x40114100,0x4011420b> "ETHERC0" // Ethernet Controller Channel 0
        Tag <0x4011a000,0x4011a02f> "SPI0" // Serial Peripheral Interface 0
        Tag <0x4012f000,0x4012f017> "ECCAFL0" // ECCAFL
        Tag <0x4012f200,0x4012f217> "ECCMB" // ECCMB
        Tag <0x40170000,0x401700f3> "ADC120" // 12-bit A/D Converter
        Tag <0x40170200,0x401702e3> "ADC121" // 12-bit A/D Converter
        Tag <0x40171000,0x401720c3> "DAC12" // 12-bit D/A converter
        Tag <0x407fb000,0x407fb183> "TSD" // Temperature Sensor Calibration Data
        Tag <0x407fc000,0x407fc043> "FLAD" // Data Flash
        Tag <0x407fe000,0x407fe0eb> "FACI" // Flash/CPU Interface
        Tag <0x64000000,0x6400080b> "QSPI" // Quad Serial Peripheral Interface
