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.
$monitor, once invoked, continuously monitors the values of the variables/signals specified in the parameter list and displays all the parameters in the list whenever the value of ANY one of the variables/signals changes.
Since this system task continuously monitors the values, it needs to be invoked only once and hence, it is typically invoked in the initial block since the initial block is also invoked only once during the length of the simulation.
However, it is not necessary that the $monitor statement HAS to be invoked through the initial block. You can invoke it in any procedural block (like always block). In fact, it may be invoked multiple times in conjunction with $monitoron and $monitoroff statements.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.