Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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?

1658414245040.png
 

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top