V
Verictor
Guest
Hi,
I have a VHDL file in which a state machine is built. The states are
coded in enum form. Now an SVA checker is intended to check the state
machine. The SVA checker will be locating in another file so that a
"bind" is needed. Now there is a question on how VHDL enum form is
interpreted in SVA.
Here is a pseudo example to show the question:
In VHDL:
-- definition
architecture BEHV of foo is
type STATE_TYPE is (S1, S2, S3, S4); -- say we have only 4 states
signal current_state, next_state: STATE_TYPE;
-- the rest ignore
In SVA:
module SVA_rule (clk, state)
input clk;
input state; // THE PROBLEM HERE, how wide is state: is state 2-
bit or 4-bit or whatever?
....
endmodule
At top level testbench:
bind foo SV_rule foo_SV_rule(.clk(clk), .state(state), .*); // SVA
checks are not correct AS STATE WIDTH IS UNKNOWN
Anyone has encountered this kind of question? I wonder if an enum type
is defined in SVA, how does that get mapped into the VHDL definition.
Thanks
I have a VHDL file in which a state machine is built. The states are
coded in enum form. Now an SVA checker is intended to check the state
machine. The SVA checker will be locating in another file so that a
"bind" is needed. Now there is a question on how VHDL enum form is
interpreted in SVA.
Here is a pseudo example to show the question:
In VHDL:
-- definition
architecture BEHV of foo is
type STATE_TYPE is (S1, S2, S3, S4); -- say we have only 4 states
signal current_state, next_state: STATE_TYPE;
-- the rest ignore
In SVA:
module SVA_rule (clk, state)
input clk;
input state; // THE PROBLEM HERE, how wide is state: is state 2-
bit or 4-bit or whatever?
....
endmodule
At top level testbench:
bind foo SV_rule foo_SV_rule(.clk(clk), .state(state), .*); // SVA
checks are not correct AS STATE WIDTH IS UNKNOWN
Anyone has encountered this kind of question? I wonder if an enum type
is defined in SVA, how does that get mapped into the VHDL definition.
Thanks