data/full_repos/permissive/439345921/Peripherals_tb.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:47: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_cs_n = 0;\n  ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:48: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_mosi = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:49: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:50: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:51: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:52: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:53: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:54: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:55: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:56: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:57: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:58: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:59: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:60: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:61: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:62: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:63: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:64: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_sck = ~key_sck;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:65: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_mosi = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:66: Unsupported: Ignoring delay on this delayed statement.\n  #100 key_cs_n = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:69: Unsupported: Ignoring delay on this delayed statement.\n always #4 begin\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/439345921/Peripherals_tb.v:73: Unsupported: Ignoring delay on this delayed statement.\n always #8 begin\n        ^\n%Error: data/full_repos/permissive/439345921/Peripherals_tb.v:22: Cannot find file containing module: \'Peripherals\'\n Peripherals Peripherals_inst (\n ^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/439345921,data/full_repos/permissive/439345921/Peripherals\n             data/full_repos/permissive/439345921,data/full_repos/permissive/439345921/Peripherals.v\n             data/full_repos/permissive/439345921,data/full_repos/permissive/439345921/Peripherals.sv\n             Peripherals\n             Peripherals.v\n             Peripherals.sv\n             obj_dir/Peripherals\n             obj_dir/Peripherals.v\n             obj_dir/Peripherals.sv\n%Error: Exiting due to 1 error(s), 22 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module Peripherals_tb();

	reg clk_cpu;
	reg clk_vga;
	reg rst_n;
	
	reg [14:0] mem_address;
	reg [15:0] mem_in;
	reg mem_load;
	
	reg key_sck;
	reg key_mosi;
	reg key_cs_n;
	

	wire [15:0] mem_out;
	wire vga_hsync;
	wire vga_vsync;
	wire vga_rgb;

	Peripherals Peripherals_inst (
		.clk_cpu(clk_cpu),
		.clk_vga(clk_vga),
		.rst_n(rst_n),
		.mem_address(mem_address),
		.mem_in(mem_in),
		.mem_load(mem_load),
		.key_sck(key_sck),
		.key_mosi(key_mosi),
		.key_cs_n(key_cs_n),
		.mem_out(mem_out),
		.vga_hsync(vga_hsync),
		.vga_vsync(vga_vsync),
		.vga_rgb(vga_rgb)
	);
	initial begin
		clk_cpu = 0;
		clk_vga = 0;
		rst_n = 1;
		mem_address = 15'd0;
		mem_in = 16'd0;
		mem_load = 1;
		key_sck = 0;
		key_mosi = 0;
		key_cs_n = 1;
		#100 key_cs_n = 0;
		#100 key_mosi = 1;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_mosi = 0;
		#100 key_cs_n = 1;
	end
	
	always #4 begin
		clk_cpu = ~clk_cpu;
	end

	always #8 begin
		clk_vga = ~clk_vga;
	end

	always @(posedge clk_cpu) begin
		mem_address = mem_address + 15'd1024;
		mem_load = ~mem_load;
		mem_in = mem_out + 16'd256;
	end

endmodule
module Peripherals_tb();


	reg clk_cpu;
	reg clk_vga;
	reg rst_n;
	
	reg [14:0] mem_address;
	reg [15:0] mem_in;
	reg mem_load;
	
	reg key_sck;
	reg key_mosi;
	reg key_cs_n;
	

	wire [15:0] mem_out;
	wire vga_hsync;
	wire vga_vsync;
	wire vga_rgb;

	Peripherals Peripherals_inst (
		.clk_cpu(clk_cpu),
		.clk_vga(clk_vga),
		.rst_n(rst_n),
		.mem_address(mem_address),
		.mem_in(mem_in),
		.mem_load(mem_load),
		.key_sck(key_sck),
		.key_mosi(key_mosi),
		.key_cs_n(key_cs_n),
		.mem_out(mem_out),
		.vga_hsync(vga_hsync),
		.vga_vsync(vga_vsync),
		.vga_rgb(vga_rgb)
	);
	initial begin
		clk_cpu = 0;
		clk_vga = 0;
		rst_n = 1;
		mem_address = 15'd0;
		mem_in = 16'd0;
		mem_load = 1;
		key_sck = 0;
		key_mosi = 0;
		key_cs_n = 1;
		#100 key_cs_n = 0;
		#100 key_mosi = 1;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_sck = ~key_sck;
		#100 key_mosi = 0;
		#100 key_cs_n = 1;
	end
	
	always #4 begin
		clk_cpu = ~clk_cpu;
	end

	always #8 begin
		clk_vga = ~clk_vga;
	end

	always @(posedge clk_cpu) begin
		mem_address = mem_address + 15'd1024;
		mem_load = ~mem_load;
		mem_in = mem_out + 16'd256;
	end

endmodule