Is it possible to peek internal signals in testers?

127 views
Skip to first unread message

Shafiur Rahman

unread,
Nov 26, 2017, 3:31:23 AM11/26/17
to chisel-users
Hi, I've been looking for a way to peek on the internal signals of a module that isn't connected to the IO. I tried peek(c.state) in PeekPokeTester. It cannot observe the value of the internal signal. Is it possible to peek internal states/wires using any of the testers?

My use case: I have several submodules that should exchange messages between them in certain order to output the final result. To ensure that the messages follow proper ordering, I print all events, parse, and run a script over them. It would be simpler if I could monitor the internal signals between them in my test code.
Thanks.

wacha

unread,
Nov 26, 2017, 4:01:28 AM11/26/17
to shafee...@gmail.com, chisel...@googlegroups.com
Hello,

With InterpretiveTester it is more or less possible, with PeekPokeTester afaik not.

Gabor
--
You received this message because you are subscribed to the Google Groups "chisel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
To post to this group, send email to chisel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/6676fdc8-8e7a-4bb9-b481-607cd499e07c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shafiur Rahman

unread,
Nov 26, 2017, 5:48:34 PM11/26/17
to chisel-users
Thanks. I will look into InterpretiveTester.
Though, OrderedDecoupledHWIOTester suits my use case better. Since I need this for only one big test for the top-level module and I would only eavesdrop in the signals, I might channel the debug signals through the IO. It might work for me if there is some way to keep some wires during testing but discard them during final compilation.

wacha

unread,
Nov 27, 2017, 1:39:56 AM11/27/17
to Shafiur Rahman, chisel-users
Keep in mind, that InterpretiveTester has its quirks:
- you have to pass the signal name as a string, so not as "safe" as a PeekPokeTester
- on many not toplevel io signals - internal signals - it sometimes throws exceptions saying "the value not found". I don't know if this is a bug or a feature.

So it is possible, but not very stable.
Gabor
Reply all
Reply to author
Forward
0 new messages