disable fork in SystemVerilog

If a process is started by fork .. join_any then it can be disabled by using disable fork or it can be disabled by using disable LABEL . There are some difference in using both these ways of disabling processes. Difference 1 : Here is example :   In this example , you can use disable fork or…

define usage in verilog and Macro

`define is very useful in verilog and here are some examples for that which will be useful to debug and develop smart macros. Simple usage of define is with ifdef and ifndef as shown . pass with compilation as  +define+XYZ `ifdef XYZ <code>  `endif   Define with some value associated with it. +define+ABC=2  Defines used…

Handling write and read file verilog

Functions used for writing and reading from file in verilog. fopen fclose fscanf  – read from file as per format fwrite – write to file as per format fdisplay -write to file Above Function are similar to C programming file handling. Difference of fwrite and fdisplay is that fwrite does not insert newline after each…