1U74_2: CPU.RiscV64 @ sysbus
2    cpuType: "rv64gc"
3    hartId: 1
4    privilegedArchitecture: PrivilegedArchitecture.Priv1_10
5    timeProvider: clint
6
7U74_1: CPU.RiscV64 @ sysbus
8    cpuType: "rv64gc"
9    hartId: 0
10    privilegedArchitecture: PrivilegedArchitecture.Priv1_10
11    timeProvider: clint
12
13dtim: Memory.MappedMemory @sysbus 0x0100000
14    size: 0x2000
15
16itim0: Memory.MappedMemory @sysbus 0x01808000
17    size: 0x8000
18
19itim1: Memory.MappedMemory @sysbus 0x01820000
20    size: 0x8000
21
22clint: IRQControllers.CoreLevelInterruptor  @ sysbus 0x02000000
23    frequency: 6250000
24    numberOfTargets: 2
25    [0, 1] -> U74_1@[3, 7]
26    [2, 3] -> U74_2@[3, 7]
27
28L2LIM: Memory.MappedMemory @sysbus 0x08000000
29    size: 0x200000
30
31plic: IRQControllers.PlatformLevelInterruptController @ sysbus 0x0c000000
32    [0, 1] -> U74_1@[11, 9]
33    [2, 3] -> U74_2@[11, 9]
34    numberOfSources: 127
35    numberOfContexts: 4
36    prioritiesEnabled : true
37
38rstgen: Python.PythonPeripheral @ sysbus 0x11840000
39    size: 0x20
40    initable: true
41    script: '''
42if request.isInit:
43    regs=[0xffffffff,
44          0xffffffff,
45          0xffffffff,
46          0xffffffff]
47    mask=[0xfffff3fb,
48          0xffffffe7,
49          0xfffffffe,
50          0xffffffff]
51elif request.isRead:
52    offset = (request.offset//4) & 0x7
53    if offset & 4 == 0:
54        request.value = regs[offset & 0x3] & 0xffffffff
55    else:
56        request.value = (regs[offset & 0x3] ^ mask[offset & 0x3]) & 0xffffffff
57elif request.isWrite:
58    offset = (request.offset//4) & 0x3
59    regs[offset] = request.value
60'''
61
62audiorstgen: Python.PythonPeripheral @ sysbus 0x10490000
63    size: 0x8
64    initable: true
65    script: '''
66if request.isInit:
67    reg = 0xffffffff
68elif request.isRead:
69    offset = request.offset//4
70    if offset == 0:
71        request.value = reg & 0xffffffff
72    else:
73        request.value = ~reg & 0xffffffff
74elif request.isWrite:
75    reg = request.value
76'''
77
78voutsysrstgen: Python.PythonPeripheral @ sysbus 0x12250000
79    size: 0x8
80    initable: true
81    script: '''
82if request.isInit:
83    reg = 0xffffffff
84elif request.isRead:
85    offset = request.offset//4
86    if offset == 0:
87        request.value = reg & 0xffffffff
88    else:
89        request.value = ~reg & 0xffffffff
90elif request.isWrite:
91    reg = request.value
92'''
93
94uart0: UART.NS16550@sysbus 0x11870000
95    wideRegisters: true
96    IRQ -> plic@92
97
98uart1: UART.NS16550@sysbus 0x11880000
99    wideRegisters: true
100    IRQ -> plic@93
101
102uart2: UART.NS16550@sysbus 0x12430000
103    wideRegisters: true
104    IRQ -> plic@72
105
106uart3: UART.NS16550@sysbus 0x12440000
107    wideRegisters: true
108    IRQ -> plic@73
109
110pwm0: HiFive_PWM @sysbus 0x12490000
111
112gpio: GPIOPort.SiFive_GPIO @sysbus 0x1191000
113
114SoCSRAM: Memory.MappedMemory @sysbus 0x18000000
115    size: 0x20000
116
117spi2: SPI.DesignWare_SPI@sysbus 0x12410000
118    transmitDepth: 128
119    receiveDepth: 128
120    IRQ -> plic@70
121
122ethernet: Network.SynopsysEthernetMAC @sysbus 0x10020000
123    IRQ -> plic@6
124    version: SynopsysEthernetVersion.BeagleV
125
126sysbus:
127    init:
128        SilenceRange <0x02010000 0x1000>
129        Tag <0x10000000 0x10000> "SDIO"
130        Tag <0x104C0000 0x40000> "USB30"
131        Tag <0x11860000 0x10000> "QSPI"
132        Tag <0x118B0000 0x10000> "I2C0"
133        Tag <0x118C0000 0x10000> "I2C1"
134        Tag <0x12450000 0x10000> "I2C1"
135        Tag <0x100b0000 0x10000> "sgdam2"
136        Tag <0x10500000 0x10000> "sgdam1"
137        Tag <0x11910000 0x10000> "GPIO"
138        Tag <0x11800000 0x10000> "CLKGEN_CSR"
139        Tag <0x11850000 0x10000> "SYSCTRL"
140        Tag <0x118D0000 0x10000> "TRNG"
141        Tag <0x10480000 0x30000> "DOM_AUDIO"
142        Tag <0x12240000 0x30000> "VOUT"
143
144