Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcd file includes blank traces #91

Open
mattvenn opened this issue Jun 12, 2020 · 7 comments
Open

vcd file includes blank traces #91

mattvenn opened this issue Jun 12, 2020 · 7 comments

Comments

@mattvenn
Copy link
Collaborator

I recall previous behaviour was that untouched signals were dropped from the vcd. Now untouched signals are present in the vcd but have no value - which IMO is more confusing.

`default_nettype        none
module counter (input wire clock);

    reg [2:0] f_counter1 = 0;
    reg [2:0] f_counter2 = 0;

        always @(posedge clock) begin
        f_counter1 <= f_counter1 + 1;
        f_counter2 <= f_counter2 + 1;
        assert(f_counter2 != 3);
    end

endmodule
[options]
mode prove
depth 5

[engines]
smtbmc

[script]
read -formal counter.v
prep -top counter

[files]
counter.v

image

counter.zip

@ZipCPU
Copy link
Contributor

ZipCPU commented Jun 12, 2020

Which signal in the trace above are you referencing? f_counter1? or some other signal?

@mattvenn
Copy link
Collaborator Author

mattvenn commented Jun 12, 2020 via email

@ZipCPU
Copy link
Contributor

ZipCPU commented Jun 12, 2020

I'm confused then. f_counter1 shows in your trace. It shows as the low line rather than both simply because this is considered an "upgrade" of gtkwave. You can see this if you examine f_counter2 and see what happens when it switches to all zeros.

@mattvenn
Copy link
Collaborator Author

mattvenn commented Jun 15, 2020

f_counter1 shows in the trace but there is no data. It is incrementing every time like f_counter2.

Previously I've noticed that signals that are not used in the formal process are not present in the vcd (unless using keep).

The above is an example of an unused signal trace being kept but containing no data.

@ZipCPU
Copy link
Contributor

ZipCPU commented Jun 15, 2020

Ok, I see it now, it's not that f_counter1 isn't present, it's that it has the wrong value.

Yeah, that looks like a bug.

Dan

@nakengelhardt
Copy link
Member

It's the call to opt_clean in preparing the model that does this; there were a bunch of changes to opt_clean recently but before I track down which one, I'd rather understand first if it's doing what it is supposed to, and what the preferred outcome would be.

If you just want f_counter1 to disappear again, changing it to opt_clean -purge would do that. But I think the better solution would be to treat any public net like an output when creating the model, so that both it and its behavior is kept. @clairexen is there an easy way to do that?

@nakengelhardt
Copy link
Member

nakengelhardt commented Jun 23, 2020

Here's an ugly hotfix for if you want proper traces:

[script]
read -formal counter.v
hierarchy -top counter
proc
setattr -set keep 1 w:\\*
prep

This sets the (* keep *) attribute on all public wires, which stops opt_clean from removing the things driving them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants