Commit graph

10 commits

Author SHA1 Message Date
Sean Cross
beeca26823 emulation: ec: add new riscv suffixes for csr/fence
The riscv foundation changed the descriptor of riscv cores. We must now
add "_zicsr_zifencei" to the "rv32i" designation in order to ensure we
have access to CSRs and the "FENCE.I" instruction.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-12-29 18:42:16 +08:00
Sean Cross
153736810b Revert "renode: remove custom LiteX_Timer_32"
The custom litex timer is more custom than we thought.

This reverts commit 46fab8cbc8.
2023-01-30 22:15:01 +08:00
Sean Cross
46fab8cbc8 renode: remove custom LiteX_Timer_32
When we started this project, all Renode Litex modules were 8-bits, and
we had to custom-make a 32-bit timer module. However, in the interim,
upstream has grown a 32-bit variant of this timer. As of this writing,
this change was made two years ago.

Remove our custom variant and use the upstream version instead.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-21 08:40:10 +08:00
Sean Cross
4b3d1503e7 renode: place all peripherals under "Betrusted" ns
Give a "Betrusted" namespace to all of the peripherals. This will enable
us to upstream various modules without breaking compatibility with our
own versions of these peripherals.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-20 22:19:40 +08:00
Sean Cross
f342f6f9c8 wf200: add binary file
Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-02 21:02:01 +08:00
Sean Cross
768a7c4b0d emulation: add WF200 ethernet implementation
This adds a working Ethernet implementation based on the WF200. It
currently gets connected to a Linux machine running a udhcpd server,
however it could also get connected to a TUN/TAP connection on Linux or
Mac.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-23 21:44:01 +08:00
Sean Cross
49e1eb19c0 emulation: connect EC
Connect the EC to the SoC. This allows for emulating both the EC and SoC
in tandem. Messages flow via a 16-bit bus. When data is not available,
`0xdddd` is returned.

There is a HOLD line that goes from the EC to the SoC. This is tied to
the inverse of presence of data in the EC FIFO -- when it's empty, HOLD
is `1`, and when there is data it's `0`.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-02-14 12:28:40 +08:00
Sean Cross
63dc07d633 emulation: get more of the EC working
Signed-off-by: Sean Cross <sean@xobs.io>
2021-09-27 19:42:04 +08:00
Sean Cross
5aaf166541 emulation: implement partial ec i2c
This implements some i2c functionality on the EC. Additionally, it
implements the Betrusted watchdog.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-30 12:36:04 +08:00
Sean Cross
37fa1d7cc4 emulation: add initial draft of ec
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-25 14:32:02 +08:00