finite state machine simulator
I have synthesized FSM and data path for a design. When i run the post synthesis gate level Verilog simulation, i get xxxxxxxxx.
I traced the reason and the reason is that in one of the FSM states, i am using "if condition" on an external input (from another module) that does not change in one clock cycle. For example
State_Si:
begin
if(DONE) // DONE (an external signal) takes 10 clock cycles to become true
next_state = State_Sj;
else
next_state = State_Si;
end
So when State_Si is reached the very first time, DONE is neither true nor false. It is unknown. After 10 clock cycles, it becomes 1 and so in these 10 clock cycles, it remains in the state State_Si.
This thing works absolutely fine in pre synthesis behavioral (golden) simulation but does not work after synthesis.
Any ideas how to solve this problem?
Any link or tutorial will be really appreciated.
I hope i made it clear. Let me know if you need more explanation.
Thanks a lot.