data/full_repos/permissive/162106151/rom_test/rom_test.v
1: b"%Error: data/full_repos/permissive/162106151/rom_test/rom_test.v:30: Cannot find file containing module: 'segment'\n segment seg_inst(\n ^~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/162106151/rom_test,data/full_repos/permissive/162106151/segment\n             data/full_repos/permissive/162106151/rom_test,data/full_repos/permissive/162106151/segment.v\n             data/full_repos/permissive/162106151/rom_test,data/full_repos/permissive/162106151/segment.sv\n             segment\n             segment.v\n             segment.sv\n             obj_dir/segment\n             obj_dir/segment.v\n             obj_dir/segment.sv\n%Error: data/full_repos/permissive/162106151/rom_test/rom_test.v:37: Cannot find file containing module: 'rom'\n rom rom_inst(\n ^~~\n%Error: Exiting due to 2 error(s)\n"
module rom_test (
	input clk,
	input resetn,
	input count,
	
	output reg [7:0] led,
	output [8:0] seg1,
	output [8:0] seg2
);

	wire [31:0] inst;
	reg [13:0] inst_addr;
	reg num;
	
	
	always @(posedge clk) begin
		num <= count;
		if(!resetn) begin
			led <= 8'b11111111;
			inst_addr <= 0;
		end
		else begin
			led <= ~inst_addr[9:2];
			if(num > count) begin
				inst_addr = inst_addr + 4;
			end
		end
	end
	
	segment seg_inst(
		.seg_data_1(inst[3:0]),
		.seg_data_2(inst[7:4]),
		.segment_led_1(seg1),
    .	segment_led_2(seg2)
   );
	
	rom rom_inst(
		.address(inst_addr[6:2]),
		.clock(clk),
		.q(inst)
	);
	
endmodule
module rom_test (
	input clk,
	input resetn,
	input count,
	
	output reg [7:0] led,
	output [8:0] seg1,
	output [8:0] seg2
);


	wire [31:0] inst;
	reg [13:0] inst_addr;
	reg num;
	
	
	always @(posedge clk) begin
		num <= count;
		if(!resetn) begin
			led <= 8'b11111111;
			inst_addr <= 0;
		end
		else begin
			led <= ~inst_addr[9:2];
			if(num > count) begin
				inst_addr = inst_addr + 4;
			end
		end
	end
	
	segment seg_inst(
		.seg_data_1(inst[3:0]),
		.seg_data_2(inst[7:4]),
		.segment_led_1(seg1),
    .	segment_led_2(seg2)
   );
	
	rom rom_inst(
		.address(inst_addr[6:2]),
		.clock(clk),
		.q(inst)
	);
	
endmodule