[SOLVED] Case statement Verilog

Status
Not open for further replies.

stark43

Member level 1
Joined
Oct 24, 2021
Messages
35
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
387
Hello, I see sample codes like this. It got a little weird. Each mipi_clk will have rst_cnt <= 0, but rst_cnt <=1 if the necessary conditions are met. Aren't these processes parallel?

 

Solution
The way that Verilog scheduling works for these non-blocking statements (<=). The RHS of the assignments are computed from top to bottom, and the assignment of these RHS results to the LHS is assigned at the end of the always block.

If a value is updated multiple times the last assignment "wins" and is assigned to the LHS.
Hello, I see sample codes like this. It got a little weird. Each mipi_clk will have rst_cnt <= 0, but rst_cnt <=1 if the necessary conditions are met. Aren't these processes parallel?

View attachment 177552
The first assignment is default.
The last condition overrides.
 
Hi,

but in opposite to software code it is not written to "0" and some time later to "1" resulting in a short pulse or glitch.
It is processed at the same time, thus no glitch. Either clean "0" or clean "1" synchronized to posedge of mipi_clk.

Klaus
 
The way that Verilog scheduling works for these non-blocking statements (<=). The RHS of the assignments are computed from top to bottom, and the assignment of these RHS results to the LHS is assigned at the end of the always block.

If a value is updated multiple times the last assignment "wins" and is assigned to the LHS.
 
Solution
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…