What are SystemVerilog threads or processes ?
A thread or process is any piece of code that gets executed as a separate entity. In verilog, each of the initial and always blocks are spawned off as separate threads that start to run in parallel from zero time. A
fork join block also creates different threads that run in parallel.
What are different fork - join styles ?
We have three different styles of
fork join in SystemVerilog.
ARM based SoC's are very common these days in the mobile/tablet market space and other consumer electronics. In a SoC verification environment, C tests are written to exercise data transactions across various IPs in the system. C tests are converted to object code following the procedure described on this page. The object code is then loaded into memory models for the processor to execute. So, let's try to learn how a C program stored in hard disk is transformed into a program executed on a processor. There are basically four logical steps/phases that you need to be aware of.
Why do we need randomness in the environment ?
Directed tests take a long time to develop because you have to think about all possible scenarios to verify different features. There is a high possibility that you would miss some kind of corner cases. So we want to be able to generate random values that fall within a valid range and apply these random values to the signals we are interested in.
These days, SoCs are assembled by a lot of in-house and third party IP's. Integration of many processor cores and IP's is a challenging task. It is even more challenging to verify the various scenarios that comes with such complex designs. It has become essential to perform a hardware-software co-verification to cover functionalities presented by both hardware and software structures.
What are classes ?
class is a user-defined datatype, an OOP construct, that can be used to encapsulate data (property) and tasks/functions (methods) which operate on the data. Here's an example:
class myPacket; bit [2:0] header; bit encode; bit [2:0] mode; bit [7:0] data; bit stop; function new (bit [2:0] header = 3'h1, bit [2:0] mode = 5); this.header = header; this.encode = 0; this.mode = mode; this.stop = 1; endfunction function display (); $display ("Header = 0x%0h, Encode = %0b, Mode = 0x%0h, Stop = %0b", this.header, this.encode, this.mode, this.stop); endfunction endclass