Notifications
Clear all

Simulating Input switches with Whisper

 

(@hachat)
New Member
Joined: 2 years ago
Posts: 3
Topic starter  

Hi,

When using the Whisper with Verilator to simulate, but how can we simulate the change of a switch? We need to change the memory manually, since we don't have a physical switch.

I have read there is a poke command in whisper interactive mode [1] as follows, but I cannot edit the memory location. It just give me a tip saying "Cannot edit in read-only editor" Please see the attached screenshot.

poke res addr value
  Set value of resource res (one of r, c or m) and address addr.
  Examples: poke r x1 0xff  poke c 0x4096 0xabcd

Any idea on how to run the poke command in whisper interactive mode within PlatformIO?

Thank you!

[1] https://github.com/chipsalliance/SweRV-ISS


   
Quote
dchaver
(@dchaver)
Member Admin
Joined: 3 years ago
Posts: 82
 

Hi @hachat,

The following post explains how you can do it in the Debug Console: https://community.platformio.org/t/edit-memory-contents-in-platformio-debugger/6777

For example, you could use the following: set {unsigned int}0x80001400=0x00ff0000. Note that memory updates when we start execution again.

Here you have a video of the simulation of the LedsSwitches example in Whisper: https://drive.google.com/file/d/1sP36qLyLJagvGCQNDECS33gKjf7F3U6w/view?usp=sharing

Let us know if this resolves your question.

Best regards

Dani


   
RCWO reacted
ReplyQuote