In SystemVerilog, functional code is written in four constructs: modules, interfaces, program blocks, or classes. Design code (synthesized into ICs) uses modules and interfaces, while verification code includes stimulus, checker, functional coverage, and assertions. Modules and interfaces support continuous assignments (assign keyword) and procedural assignments (always, initial, final blocks, functions, tasks) with blocking (=) and non-blocking (<=) assignments. Program blocks can only contain initial blocks and functions/tasks, not always/final blocks. Classes support functions, tasks, program blocks, and functional coverage, but rarely assertions. Understanding which constructs execute in which simulation regions is essential for proper code organization and verification flow.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Course : Systemverilog Verification 6 : L2.1 : Abstract of A Systemverilog Code
Added:welcome to the next session of this course system with log simulation region in this session you are going to see what all components are there in a system window code so finally you will be able to make a question what you need to learn to understand simulation region or how do you map simulation regions to your system with your code so the first question will be where do you write your functional code in a systematic program whether it's a verification code or a design code you are going to always write a functional code in any of these four constructs either in a module or in an interface or in a program or program block or in a class and and next you'll see what type of codes you will write in system builder so you will always write two types of code either as a design code or a verification code so the design code is the one which is finally synthesized and going into an ic which is doing the intended ic functionality all your design codes will be split into different modules and also it is legal to write interfaces and system value design now coming to the verification code the first part is the stimulus and checker code so stimulus is the one which is driving inputs to the duty in simulation and the checker will see the outputs so this stimulus and checker code can be written in any of this module interface or class or program block apart from the stimulus part you need to write functional coverage and assertions so these are again verification components the functional coverage will be written either in a module or in an interface or in a class typically this will be written in a module or in a class and finally coming to assertions the assertions are a kind of extra checks and they also be written either in modules or interfaces and they are very rarely written in a class and the next question is what type of statements comes in each of these you have already seen that you will be writing all your codes in either in a module or interface or in a program block or in a class so we will see what are the set of legal statements or blocks that can be put in each of them so in case of a module or interface you can have two type of statements which is a continuous assignment statement or procedural assignment statements so a continuous assignment statement is a single line statement and it is written by using the assign keyword and again you can write your functional code in a module or interface in a procedural assignment blocks there are different types of assignment blocks there are always always com always slash which are called the always type of books and there is an initial and final books again functions or tasks are again procedural assignment blocks here you need to remember one more thing in case of procedural assignment block there are two types of category of this assignment so these are always these items are blocks which you can write multiple set of statements and within a statement you can use an assignment a procedural assignment and procedural assignments are of two types which is a blocking assignment and a non-blocking so blocking assignment is written by a single equal to and a non-blocking assignment will be written with a less than or equal to so apart from this continuous assignment and procedural assignment blocks and you can even write assertions and functional coverage in module and interface the next item is program block in a program block you will see an initial block and you can't write any of the always or final block in it program block and also you can write functions and task in a program block and finally coming to classes in a class you can write a function or a task and you can write any of other type of program blocks in in a class and also it is allowed to write functional coverage in a class and our solutions are very rarely written in a class so these are the type of statements that is coming in a module program block or a class and also remember that out of this only a module or interface can be used in a design code we have already seen that and not all of them can be used in a design as well so they are out of the scope of this course i am not discussing here in details but this is a very generalized categorization of a systematic code how a system will accord will look like whether it is a design or testbench code and what all components will be there and in each those components what all kind of statements or blocks will be there now finally what you learned from this course is the answer to this question where this will be getting executed in the simulation or in in which simulation region this will be getting executed or in which order they will be getting executed towards end of this course we will be able to understand how these items are connected together how each statement will be executed in every time slot from next lecture onwards you'll see in detail every simulation time region in the system below and where all these items fall in there but while going through this lectures remember that i will be explaining them in terms of uh their person either in a module called or in a program code so the items that is that you're writing in module or interface are following the same rules in case of a simulation region therefore modules or interfaces are the same again program blocks are different and i will be explaining with respect to module or program look and finally at the end of this course you will see where class items will be executed there is no fancy rule about the items that is present in class again there is a subset of these items you just need to focus on items that is present in module or program block for the time being
Related Videos
LBF101 Creating an XML Changelog
liquibase7511
3K views•2026-06-15
Alta Labs Cloud Dashboard Real time Network & Xnet Insights!
ShinyTechThings
158 views•2026-06-17
Wait... Group Policy Not Applying? Check This First!
keeplearning_iT
144 views•2026-06-15
Leetcode Weekly Contest 506 | Life's boring these days
Pudeesht
2K views•2026-06-14
microJAM: MAKING A MICRO GAME FOR A GAME JAM IN CLOJURESCRIPT AND TOTALLY NOT C
janetacarr
156 views•2026-06-18
Partitioning vs Bucketing vs Clustering: How to Make Queries 100x Faster
thedataandaiguy
194 views•2026-06-16
Design Claude Code Like a Senior Engineer
hayk.simonyan
344 views•2026-06-19
Linus Torvalds: AI Won’t Replace Understanding Code
SavvyNik
140 views•2026-06-19











