moerjielovecookie

Sawen_Blog

一个普通工科牲的博客网站
x
github
follow
email

Differences in the circuits synthesized from if statements and case statements in Verilog

The difference is that the logical judgment of if else has priority, with the innermost if having the highest priority, while the logical judgment of case is parallel. Each circuit synthesized from if else is a 2-to-1 multiplexer. This statement is used when there is a clear priority among signals, but too many nested if statements can lead to excessive path delays, reducing operating speed. Therefore, it is used when there are fewer conditions. The circuit area synthesized from if else is relatively small.
|400
The case statement is suitable for logical judgments without clear priorities, where these logical conditions are at the same priority level and mutually exclusive, such as implementing high-speed encoding and decoding; the case structure circuit is faster but occupies a larger area, synthesized as an n-to-1 mux circuit.
|400

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.