Comments (8)
In our setup we are able to inspect registers with (gdb) p/x $mie
and (gdb) p/x $mtvec
. There is however a discrepancy between the addressing that we are using and the configuration that we found in the code you linked. We will look into it.
from renode.
Here's what I get when I do info all
when connecting to a VexRiscv CPU in hardware, via wishbone-tool
:
(gdb) info all
zero 0x0 0
ra 0x17dc 0x17dc <trap_entry+72>
sp 0x1001ff60 0x1001ff60
gp 0x0 0x0 <_start>
tp 0x0 0x0 <_start>
t0 0x19f8 6648
t1 0x1000009c 268435612
t2 0x10000090 268435600
fp 0x1 0x1 <_start+1>
s1 0xe0008000 -536838144
a0 0x0 0
a1 0xe0005000 -536850432
a2 0x40 64
a3 0x40 64
a4 0xe0005000 -536850432
a5 0x1 1
a6 0x100000c4 268435652
a7 0x40 64
s2 0x0 0
s3 0x10000000 268435456
s4 0x10000000 268435456
s5 0x10000000 268435456
s6 0x10000000 268435456
s7 0x10000000 268435456
s8 0x0 0
s9 0x0 0
s10 0x0 0
s11 0x0 0
t3 0x10000090 268435600
t4 0x10000098 268435608
t5 0x50 80
t6 0x0 0
pc 0x1540 0x1540 <isr+44>
satp 0x0 0
mstatus 0x1880 SD:0 VM:00 MXR:0 PUM:0 MPRV:0 XS:0 FS:0 MPP:3 HPP:0 SPP:0 MPIE:1 HPIE:0 SPIE:0 UPIE:0 MIE:0 HIE:0 SIE:0 UIE:0
mie 0x880 2176
mtvec 0x0 0
mscratch 0x0 0
mepc 0x1388 5000
mcause 0x8000000b -2147483637
mtval 0x0 0
mip 0x800 2048
mcycle 0x162e6808 372140040
minstret 0x8e00a40 148900416
mcycleh 0x0 0
minstreth 0x0 0
mvendorid 0x0 0
marchid 0x0 0
mimpid 0x0 0
mhartid 0x0 0
(gdb)
Note that, for example, I can see $mcycle
is something that is sane. And I can see that $mcause
in this hardware CPU is set to 0x8000000b
.
Contrast this with Renode, where registers cannot be inspected that way:
(gdb) p/x $mcause
$3 = 0x0
(gdb) mon cpu MCAUSE
0x8000000b
(gdb)
from renode.
Right now when you read p/x $mcause
in Renode you probably just receive a default value (0) of a not-known register.
Extending Renode’s target.xml
with the set of CSRs compatible with wishbone-tool
should not be complicated - I’ll look into this.
from renode.
@mateusz-holenko - You probably want to return a target.xml
which matches the current CPU architecture -- IE it'll be different for SiFive, picorv32, VexRISCV configurations, etc.
from renode.
You'll also want to make registers disappear and reappear depending on the current register set. For example, when running with RISCV_PRIV_1.10, you'll want $satp
, but under RISCV_PRIV_1.09 you'll want to expose $sbtpr
.
from renode.
Thanks to the contribution of @evolentini there is now an infrastructure for defining GDB features, including the CPU registers list.
The next step is to enable this support for various kinds of RISC-V cores.
from renode.
Listing and support for custom CSRs for RISC-V should now work with the current Renode.
from renode.
Closing as done
from renode.
Related Issues (20)
- Support of an ethernet device driver (litex_vexriscv board) for Zephyr
- Updating BME280 I2C sensor value using python script. HOT 1
- Save statefile inside a Hook (it hangs) via python script HOT 3
- Read value from GPIO
- hi i am trying to run gdb for blinky which is using nordic-blinky-zephyr.elf and using nrf52840 board when i am trying gdb not working HOT 1
- Possibility to synchronize simulation time with real time HOT 1
- Feature Request: Ethernet Support for Cortex-A53 Linux in Renode HOT 1
- Documentation: How to add a custom C# peripheral and testing it ? HOT 1
- `InvalidOperationException` is thrown when invoking a method via reflection HOT 2
- wish: rtos awareness for GDB server HOT 2
- How to use buildroot with renode HOT 2
- Failed to Flash from the eMMC in the Icicle Kit Machine in Renode HOT 1
- Bug in Virtqueue implementation HOT 4
- CAN tools (Wireshark, candump, python-can) run directly from host shows invalid CAN ID while using SocketCAN-Bridge feature
- How to connect multiple AXI masters/slaves to a VerilatedPeripheral HOT 3
- STM32F103 (Bluepill) simulation with CAN bus HOT 1
- Support Needed: Add SD Card peripheral when it is connected to a SPI bus
- renode-test cli output shows status of skipped tests as failed
- LTDC add 2 registers (LTDC_SRCR and LTDC_CDSR ) for stm32h7 support
- Attempts to generate repl for Qualcomm Robotics RB5 failing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from renode.