If I have an if statement:
if(risingEdge && cnt == 3'b111) begin ... end
Will it be checked on cnt if the raiseEdge value is incorrect?
Does it even matter inside HDL?
For modeling, it is undefined as to whether short-circuited expressions are evaluated or not. In the example above, this does not matter, but if you have a function call on the right side, you may run into problems with undefined side effects.
See Gotcha # 52 in "Verilog and SystemVerilog Gotchas: 101 Common Coding Errors and How to Avoid Them" by Stuart Sutherland and Don Mills.
, HDL, , , . - . , SystemVerilog:
if(risingEdge && cnt++ == 3'b111) begin ... end
Verilog ( SV) - verilog, , . , .
R, , , ( , Gotchas). , , SystemVerilog, , . Verilog , , SV disambiguates , , ( ++, Java ..). . 11.3.5 IEEE-1800-2009, . , SV , , SV.
Source: https://habr.com/ru/post/1754137/More articles:git how to get back to a specific revision - git-revertHow to create an Android NDK sample: "bitmap-plasma" - androidКак определить, была ли операция перетаскивания отменена с использованием NSDraggingInfo или аналогичного? - objective-cIs the facility free / released on dealloc and / or release? - memory-managementHow to run 64-bit programming with visual studio 2010? - c ++MonoDevelop - Does GTK Designer just show an empty square? - ideDebugging output via printf on a Cortex-M3 processor, kiosks in the BKPT instruction + confusion about JTAG and sw ports - debugginginclude website in php file - htmlSpring resource in WEB-INF - javaHow to sync two NSManagedObjectContext - multithreadingAll Articles