How to open a file in system verilog :
You can open a file in system verilog using the system function $fopen("filename", "mode")
integer fileid = fopen("sample.txt", "r"); if (fileid == 0) begin
$display("ERROR : CAN NOT OPEN THE FILE");
end
How to traverse or print lines of a file : To traverse a file you can simple use a while loop with call the $feof function


