Dear Don Cragun,
Thank you very much for your reply.
I am using C macro to accomplish this. I can not pass states to remove from
as I am not aware of previous state. What I want is their should always have no more than one of the three low order bits set.
Example :- If I am in
currently then my state variable would be
. Now If I want to set state to
then my state variable should become
Thank you.
This makes no sense. If your program isn't aware of your current state (previous state when you want to change to a new set of states), then setting the new state is just a statement like:
If you can't restrain yourself from writing code like:
and you aren't going to set up a function to perform verification of state changes, I have no idea what you are trying to do. And, doing this, there are never any unknown (or unchanged states); you replace (rather than update) states every time to assign a new value to state. So you won't have xxxx x100, you'll have 0000 0001, 0100 1100, or (the undesired) 0000 0011, respectively, for the three samples above; but never any xs.
I must be missing something in your description of what you're trying to do.
Hi I wanted to call the AutoFsm function (given below) in vim to generate a code something like:
**********verilog code to generate *************
always @(posedge clk or negedge rst_n) begin
if(!rst_n) begin
state_r <= #1 next_stateascii_r; ... (0 Replies)