Clear all

Simulating Input switches with Whisper


New Member
Joined: 2 years ago
Posts: 3
Topic starter  


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!


Member Admin
Joined: 4 years ago
Posts: 92

Hi @hachat,

The following post explains how you can do it in the Debug Console:

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:

Let us know if this resolves your question.

Best regards


RCWO reacted