Skip to content
Discussion options

You must be logged in to vote

It would help to have an example, so I made this one:

(* synthesize *)
module mkTest();

  Reg#(Bool) rg1 <- mkRegU;
  Reg#(Bool) rg2 <- mkRegU;

  rule rl (rg1 && ! rg1);
    rg2 <= False;
  endrule

endmodule

The rule condition can never be true because it has the form x && !x. And if I compile it, I see a message like this:

Warning: "Test.bsv", line 7, column 8: (G0023)
  The condition for rule `rl' is always false. Removing...

BSC runs in a series of stages, so one of the first things I do when debugging is to see what stage things are happening in. I do this with the -v flag, which causes BSC to print the names of the stages as it enters and exits them. The expanded stage is where …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sb1234132
Comment options

Answer selected by sb1234132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants