Dear Reader,
Recently I posted one blog post “System Verilog Final Means Final !”
As we all know final means final in system Verilog, Final block will get called at the end of the simulation before $finish. Now with this understanding we can have few questions. Recently few engineers have asked me some questions and thought answering those questions. Questions asked are listed below
- Is multiple final block is allowed in System Verilog?
- If yes, what will be the execution order in simulation, which final is final?
Here are the answers to this questions :
Multiple final blocks are allowed in system Verilog, you can define multiple final block in your testbench. Some time you might require to use final blocks in different places of environment. Here we need to understand one most important thing on final block is that, final blocks are called at the end of the simulation before $finish. It is like a calling a function which executes in zero simulation time.