Line up poke() and register output changes in .vcd trace

Open
#5,107 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
scala
Domain
compilers

Research direction

Start by locating the generated C++ harness and the code that sequences clock changes, timeInc(1), eval(), and dump() for .vcd tracing. Compare the current falling-edge poke behavior with the requested rising-edge sequence, including the extra eval after pokes. Done means register and poke() changes appear together on the rising edge in the generated trace.

Written by the indexing model from the issue text.

Description

Type of issue: Feature Request

Is your feature request related to a problem? Please describe.

Today poke() signals are shown as changing on the falling edge.

I would like to see poke input signals immediately after the rising edge of the clock but before the waveform dump for that timestep occurs. This makes the .vcd dumps easier on the eye, because the change due to a peek/poke lines up with the change of a register.

Describe the solution you'd like

Image

Showing poke() signals changing on the rising edge of a clock in Verilator dumps can be achieved in the generated C++ harness by inserting a poke/eval phase between the clock rise and the dump. The desired execution flow is:

clock = 0;
timeInc(1);
eval();
dump();

clock = 1;
timeInc(1);
eval(); // Logic settles on rising edge

// Pokes happen here

if (trace) {
    // Re-evaluate to propagate pokes immediately
    eval();
}
// changes from output of registers and poke() now appear on the rising edge
dump();


Dominant language
Scala
Stars
4.8k
Forks
669
Avg merge
1d 12h
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from chipsalliance/chisel

All issues in chipsalliance/chisel

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.