u931803
Newbie level 3
- Joined
- Apr 6, 2014
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 33
Verilog combinational logic coding style, assign or always?
Hello guys,
Today I had a discussion about Verilog coding style with a senior engineer
I personal prefer write combinational logic using assign
For example, assign cnt_w = incr ? cnt_r + 1 : cnt_r;
However, he said combinational logic should be coded using always for the following reason
1. Continuous assignment slows down simulation speed
2. Synthesis tool can optimize always better than assign
3. All assign can be realized by always, but not all always can be realized by assign
I agree with the first reason
But I wonder if the second is true with contemporary synthesis tools such as design compiler
Also I think assign and always are convertible both ways (except, of course, if you use for loop)
Does anyone have and idea?
Thanks a lot
Hello guys,
Today I had a discussion about Verilog coding style with a senior engineer
I personal prefer write combinational logic using assign
For example, assign cnt_w = incr ? cnt_r + 1 : cnt_r;
However, he said combinational logic should be coded using always for the following reason
1. Continuous assignment slows down simulation speed
2. Synthesis tool can optimize always better than assign
3. All assign can be realized by always, but not all always can be realized by assign
I agree with the first reason
But I wonder if the second is true with contemporary synthesis tools such as design compiler
Also I think assign and always are convertible both ways (except, of course, if you use for loop)
Does anyone have and idea?
Thanks a lot