mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
emulation: add initial draft of ec
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
428ccd2e0f
commit
37fa1d7cc4
7 changed files with 1506 additions and 13 deletions
34
emulation/ec/betrusted-ec.repl
Normal file
34
emulation/ec/betrusted-ec.repl
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
cpu: CPU.VexRiscv @ sysbus
|
||||||
|
cpuType: "rv32i"
|
||||||
|
PerformanceInMips: 6
|
||||||
|
|
||||||
|
uart: UART.LiteX_UART @ {
|
||||||
|
sysbus 0xE0001800
|
||||||
|
}
|
||||||
|
-> cpu@1000
|
||||||
|
|
||||||
|
timer0: Timers.LiteX_Timer_32 @ {
|
||||||
|
sysbus 0xe0002000
|
||||||
|
}
|
||||||
|
frequency: 100000000
|
||||||
|
-> cpu@1001
|
||||||
|
|
||||||
|
sram: Memory.MappedMemory @ {
|
||||||
|
sysbus 0x10000000;
|
||||||
|
sysbus 0x90000000 // shadow
|
||||||
|
}
|
||||||
|
size: 0x00020000
|
||||||
|
|
||||||
|
ticktimer: Timers.TickTimer @ sysbus 0xe0005000
|
||||||
|
periodInMs: 1
|
||||||
|
-> cpu @ 1003
|
||||||
|
|
||||||
|
flash_mem: Memory.MappedMemory @ {
|
||||||
|
sysbus 0x20000000;
|
||||||
|
sysbus 0xA0000000 // shadow
|
||||||
|
}
|
||||||
|
size: 0x8000000
|
||||||
|
|
||||||
|
sysbus:
|
||||||
|
init:
|
||||||
|
ApplySVD @ec/soc.svd
|
||||||
BIN
emulation/ec/kernel.bin
Normal file
BIN
emulation/ec/kernel.bin
Normal file
Binary file not shown.
1447
emulation/ec/soc.svd
Normal file
1447
emulation/ec/soc.svd
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
||||||
cpu: CPU.VexRiscv @ sysbus
|
cpu: CPU.VexRiscv @ sysbus
|
||||||
timeProvider: cpu_timer
|
|
||||||
cpuType: "rv32imac"
|
cpuType: "rv32imac"
|
||||||
privilegeArchitecture: PrivilegeArchitecture.Priv1_10
|
privilegeArchitecture: PrivilegeArchitecture.Priv1_10
|
||||||
|
PerformanceInMips: 120
|
||||||
|
|
||||||
uart: UART.LiteX_UART @ {
|
uart: UART.LiteX_UART @ {
|
||||||
sysbus 0xF0004000 // shadow
|
sysbus 0xF0004000 // shadow
|
||||||
|
|
@ -48,13 +48,6 @@ trng_kernel: Miscellaneous.BetrustedRNGKernel @ sysbus 0xF0019000
|
||||||
|
|
||||||
trng_server: Miscellaneous.BetrustedRNGServer @ sysbus 0xF001A000
|
trng_server: Miscellaneous.BetrustedRNGServer @ sysbus 0xF001A000
|
||||||
|
|
||||||
// This peripheral doesn't actually exist, but is required
|
|
||||||
// in order to keep the CPU running.
|
|
||||||
cpu_timer: Timers.LiteX_CPUTimer @ sysbus 0xf0000800
|
|
||||||
frequency: 100000000
|
|
||||||
// IRQ #100 is Machine Timer Interrupt
|
|
||||||
-> cpu@100
|
|
||||||
|
|
||||||
ticktimer: Timers.TickTimer @ sysbus 0xF0011000
|
ticktimer: Timers.TickTimer @ sysbus 0xF0011000
|
||||||
periodInMs: 1
|
periodInMs: 1
|
||||||
-> cpu @ 1008
|
-> cpu @ 1008
|
||||||
|
|
@ -67,4 +60,4 @@ flash_mem: Memory.MappedMemory @ {
|
||||||
|
|
||||||
sysbus:
|
sysbus:
|
||||||
init:
|
init:
|
||||||
ApplySVD @renode.svd
|
ApplySVD @soc/renode.svd
|
||||||
|
|
@ -5,19 +5,20 @@
|
||||||
path add $ORIGIN
|
path add $ORIGIN
|
||||||
|
|
||||||
using sysbus
|
using sysbus
|
||||||
mach create
|
|
||||||
|
|
||||||
# Add peripherals that are defined in C#. You must restart Renode
|
# Add peripherals that are defined in C#. You must restart Renode
|
||||||
# if you modify these files.
|
# if you modify these files.
|
||||||
|
i @peripherals/i2c_lattice_hip.cs
|
||||||
|
i @peripherals/keyboard.cs
|
||||||
i @peripherals/LiteX_Timer_32.cs
|
i @peripherals/LiteX_Timer_32.cs
|
||||||
i @peripherals/memlcd.cs
|
i @peripherals/memlcd.cs
|
||||||
i @peripherals/keyboard.cs
|
|
||||||
i @peripherals/ticktimer.cs
|
i @peripherals/ticktimer.cs
|
||||||
i @peripherals/trng_kernel.cs
|
i @peripherals/trng_kernel.cs
|
||||||
i @peripherals/trng_server.cs
|
i @peripherals/trng_server.cs
|
||||||
|
|
||||||
# Load the Betrusted Renode Platform file
|
############### Define the Betrusted SoC ###############
|
||||||
machine LoadPlatformDescription @betrusted.repl
|
mach create "SoC"
|
||||||
|
machine LoadPlatformDescription @soc/betrusted-soc.repl
|
||||||
|
|
||||||
machine StartGdbServer 3333 true
|
machine StartGdbServer 3333 true
|
||||||
showAnalyzer uart
|
showAnalyzer uart
|
||||||
|
|
@ -50,4 +51,22 @@ macro reset
|
||||||
"""
|
"""
|
||||||
|
|
||||||
runMacro $reset
|
runMacro $reset
|
||||||
|
mach clear
|
||||||
|
|
||||||
|
############### Define the Betrusted EC ###############
|
||||||
|
mach create "EC"
|
||||||
|
machine LoadPlatformDescription @ec/betrusted-ec.repl
|
||||||
|
showAnalyzer uart
|
||||||
|
macro reset
|
||||||
|
"""
|
||||||
|
sysbus LoadBinary @ec/kernel.bin 0x10000000
|
||||||
|
cpu PC 0x10000000
|
||||||
|
"""
|
||||||
|
runMacro $reset
|
||||||
|
|
||||||
|
# Silence I2C for now while we work on the driver
|
||||||
|
sysbus SilenceRange <0xB0000000, 0xB000FFFF>
|
||||||
|
|
||||||
|
mach clear
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue