data/full_repos/permissive/157101210/cpu.t.v
 line:241: before: "output"
1: b'%Error: data/full_repos/permissive/157101210/cpu.t.v:1: Cannot find include file: cpu.v\n`include "cpu.v" \n         ^~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/157101210,data/full_repos/permissive/157101210/cpu.v\n             data/full_repos/permissive/157101210,data/full_repos/permissive/157101210/cpu.v.v\n             data/full_repos/permissive/157101210,data/full_repos/permissive/157101210/cpu.v.sv\n             cpu.v\n             cpu.v.v\n             cpu.v.sv\n             obj_dir/cpu.v\n             obj_dir/cpu.v.v\n             obj_dir/cpu.v.sv\n%Warning-STMTDLY: data/full_repos/permissive/157101210/cpu.t.v:14: Unsupported: Ignoring delay on this delayed statement.\n    always #10 clk = !clk;\n           ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/157101210/cpu.t.v:58: Unsupported or unknown PLI call: $dumpfile\n $dumpfile(dump_fn);\n ^~~~~~~~~\n%Error: data/full_repos/permissive/157101210/cpu.t.v:59: Unsupported or unknown PLI call: $dumpvars\n $dumpvars();\n ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/157101210/cpu.t.v:62: Unsupported: Ignoring delay on this delayed statement.\n reset = 0; #10;\n            ^\n%Warning-STMTDLY: data/full_repos/permissive/157101210/cpu.t.v:63: Unsupported: Ignoring delay on this delayed statement.\n reset = 1; #10;\n            ^\n%Warning-STMTDLY: data/full_repos/permissive/157101210/cpu.t.v:64: Unsupported: Ignoring delay on this delayed statement.\n reset = 0; #10;\n            ^\n%Warning-STMTDLY: data/full_repos/permissive/157101210/cpu.t.v:72: Unsupported: Ignoring delay on this delayed statement.\n        $display("%4t | %h | %h", $time, cpu.IF_programCounter, cpu.IF_instr); #20 ;\n                                                                               ^\n%Warning-STMTDLY: data/full_repos/permissive/157101210/cpu.t.v:79: Unsupported: Ignoring delay on this delayed statement.\n #500000 \n ^\n%Error: Exiting due to 3 error(s), 6 warning(s)\n'
module cpu_test ();

    reg clk;
    reg reset;


    initial clk=0;
    always #10 clk = !clk;


    CPU cpu(.clk(clk), .reset(reset));


    reg [1023:0] mem_text_fn;
    reg [1023:0] mem_data_fn;
    reg [1023:0] dump_fn;
    reg init_data = 1;


    initial begin
    	$display("Starting CPU tests.");




	if (! $value$plusargs("mem_text_fn=%s", mem_text_fn)) begin
	    $display("ERROR: provide +mem_text_fn=[path to .text memory image] argument");
	    $finish();
        end
	if (! $value$plusargs("mem_data_fn=%s", mem_data_fn)) begin
	    $display("INFO: +mem_data_fn=[path to .data memory image] argument not provided; data memory segment uninitialized");
	    init_data = 0;
        end

	if (! $value$plusargs("dump_fn=%s", dump_fn)) begin
	    $display("ERROR: provide +dump_fn=[path for VCD dump] argument");
	    $finish();
        end






	$readmemh(mem_text_fn, cpu.memory.memory, 0);
        if (init_data) begin
	    $readmemh(mem_data_fn, cpu.memory.memory, 2048);
        end
	


	$dumpfile(dump_fn);
	$dumpvars();


	reset = 0; #10;
	reset = 1; #10;
	reset = 0; #10;





	$display("Time | PC       | Instruction");
	repeat(3) begin
        $display("%4t | %h | %h", $time, cpu.IF_programCounter, cpu.IF_instr); #20 ;
        end
	$display("... more execution (see waveform)");
    



	#500000 


	$finish();
    end

endmodule
module cpu_test ();


    reg clk;
    reg reset;


    initial clk=0;
    always #10 clk = !clk;


    CPU cpu(.clk(clk), .reset(reset));


    reg [1023:0] mem_text_fn;
    reg [1023:0] mem_data_fn;
    reg [1023:0] dump_fn;
    reg init_data = 1;


    initial begin
    	$display("Starting CPU tests.");




	if (! $value$plusargs("mem_text_fn=%s", mem_text_fn)) begin
	    $display("ERROR: provide +mem_text_fn=[path to .text memory image] argument");
	    $finish();
        end
	if (! $value$plusargs("mem_data_fn=%s", mem_data_fn)) begin
	    $display("INFO: +mem_data_fn=[path to .data memory image] argument not provided; data memory segment uninitialized");
	    init_data = 0;
        end

	if (! $value$plusargs("dump_fn=%s", dump_fn)) begin
	    $display("ERROR: provide +dump_fn=[path for VCD dump] argument");
	    $finish();
        end






	$readmemh(mem_text_fn, cpu.memory.memory, 0);
        if (init_data) begin
	    $readmemh(mem_data_fn, cpu.memory.memory, 2048);
        end
	


	$dumpfile(dump_fn);
	$dumpvars();


	reset = 0; #10;
	reset = 1; #10;
	reset = 0; #10;





	$display("Time | PC       | Instruction");
	repeat(3) begin
        $display("%4t | %h | %h", $time, cpu.IF_programCounter, cpu.IF_instr); #20 ;
        end
	$display("... more execution (see waveform)");
    



	#500000 


	$finish();
    end

endmodule