Question: Identify the error in the below system verilog code and rectify it class transaction; bit [ 3 1 : 0 ] data; int id; endclass

Identify the error in the below system verilog code and rectify it
class transaction;
bit [31:0] data;
int id;
endclass
function void transaction::display();
$display("data =%0d and id =%0d", data, id);
endfunction
task transaction::delay();
#50;
$display("Time =%0.0t, delayed data =%0d", $time, data);
endtask
module class_example;
transaction tr;
initial begin
tr.data =100;
tr.id =1;
tr.display();
tr.delay();
end
endmodule

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!