initial commit

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-12-18 09:53:11 +08:00
commit 607a91f06e
5 changed files with 88 additions and 0 deletions

18
.gitattributes vendored Normal file
View File

@ -0,0 +1,18 @@
*.py text eol=lf
*.dfu binary
*.png binary
*.jpg binary
*.bin binary
*.elf binary
*.h text eol=lf
*.c text eol=lf
*.s text eol=lf
*.S text eol=lf
README.* text eol=lf
LICENSE text eol=lf
Makefile text eol=lf
*.mk text eol=lf
*.sh text eol=lf
*.ps1 text eol=crlf
.gitignore text eol=lf
.gitattributes text eol=lf

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/target
**/*.rs.bk

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Platonic RISC-V Device
Platonic is an ideal system useful for developing an operating system. It does not represent any sort of real hardware, though differences between platforms is minimal.
## Usage
It is recommended to use Renode.

7
boot.resc Normal file
View File

@ -0,0 +1,7 @@
using sysbus
mach create
machine LoadPlatformDescription @platonic.repl
machine StartGdbServer 3333
showAnalyzer uart

54
platonic.repl Normal file
View File

@ -0,0 +1,54 @@
uart: UART.LiteX_UART @ {
sysbus 0x60001800;
sysbus 0xE0001800 // shadow
}
rom: Memory.MappedMemory @ {
sysbus 0x00000000;
sysbus 0x80000000 // shadow
}
size: 0x00002000
sram: Memory.MappedMemory @ {
sysbus 0x10000000;
sysbus 0x90000000 // shadow
}
size: 0x00020000
cpu: CPU.VexRiscv @ sysbus
timeProvider: cpu_timer
cpuType: "rv32ima"
privilegeArchitecture: PrivilegeArchitecture.Priv1_10
cpu_timer: Timers.LiteX_CPUTimer @ sysbus 0xf0000800
frequency: 66000000
// IRQ #100 is Machine Timer Interrupt
-> cpu@100
timer0: Timers.LiteX_Timer @ {
sysbus 0x60002800;
sysbus 0xE0002800 // shadow
}
frequency: 12000000
-> cpu@0
spi: SPI.PicoRV_SPI @ {
sysbus 0x60005000;
sysbus 0xe0005000 // shadow
}
flash: SPI.Micron_MT25Q @ spi
underlyingMemory: flash_mem
flash_mem: Memory.MappedMemory @ {
sysbus 0x20000000;
sysbus 0xA0000000 // shadow
}
size: 0x4000000
sysbus:
init:
Tag <0xe0000000 0x800> "CTRL"
Tag <0xE0006000 0x800> "REBOOT"
Tag <0xE0006800 0x800> "RGB"
Tag <0xE0007000 0x800> "VERSION"