arunramnath
Junior Member level 1
- Joined
- Apr 2, 2010
- Messages
- 15
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Austin
- Activity points
- 1,386
Hello People.
I have a parameter to a module. I have used parameters for but widths and stuff usually. But I am in a different need now.
I am using a FSM which is based on a counter. I am trying to control one of the state changes based on the comparison between count and the value specified by the parameter. To be precise, I am trying to do somthing like this
module xyz #(parameter COUNT_STOP = 3) (....);
...
...
...
assign change_state = (count == COUNT_STOP);
...
I strongly feel we cannot use this as a synthesizable code. So, I want count to be compared to a constant, that depends on the corressponding instantiation. If so, Can someone help me in getting a way to do this ?
Thanks
I have a parameter to a module. I have used parameters for but widths and stuff usually. But I am in a different need now.
I am using a FSM which is based on a counter. I am trying to control one of the state changes based on the comparison between count and the value specified by the parameter. To be precise, I am trying to do somthing like this
module xyz #(parameter COUNT_STOP = 3) (....);
...
...
...
assign change_state = (count == COUNT_STOP);
...
I strongly feel we cannot use this as a synthesizable code. So, I want count to be compared to a constant, that depends on the corressponding instantiation. If so, Can someone help me in getting a way to do this ?
Thanks