data/full_repos/permissive/193909872/Implementation/nexys2/push_button_p.v
1: b'%Warning-WIDTH: data/full_repos/permissive/193909872/Implementation/nexys2/push_button_p.v:38: Operator ASSIGNDLY expects 32 bits on the Assign RHS, but Assign RHS\'s VARREF \'db_push_button\' generates 3 bits.\n                                                                                             : ... In instance push_button_p\n   push_button_p_r[0] <= db_push_button;\n                      ^~\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/193909872/Implementation/nexys2/push_button_p.v:42: Cannot find file containing module: \'debounce\'\n debounce inst_debounce_1(.clk(clk), .reset(rst), .db_in(push_button[0]), .db_out(db_push_button[0]));  \n ^~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/193909872/Implementation/nexys2,data/full_repos/permissive/193909872/debounce\n             data/full_repos/permissive/193909872/Implementation/nexys2,data/full_repos/permissive/193909872/debounce.v\n             data/full_repos/permissive/193909872/Implementation/nexys2,data/full_repos/permissive/193909872/debounce.sv\n             debounce\n             debounce.v\n             debounce.sv\n             obj_dir/debounce\n             obj_dir/debounce.v\n             obj_dir/debounce.sv\n%Error: data/full_repos/permissive/193909872/Implementation/nexys2/push_button_p.v:43: Cannot find file containing module: \'debounce\'\n debounce inst_debounce_2(.clk(clk), .reset(rst), .db_in(push_button[1]), .db_out(db_push_button[1]));\n ^~~~~~~~\n%Error: data/full_repos/permissive/193909872/Implementation/nexys2/push_button_p.v:44: Cannot find file containing module: \'debounce\'\n debounce inst_debounce_3(.clk(clk), .reset(rst), .db_in(push_button[2]), .db_out(db_push_button[2]));\n ^~~~~~~~\n%Error: Exiting due to 3 error(s), 1 warning(s)\n'
module push_button_p(

	input clk,
	input rst,
	input [3:0] addra,
	output reg [31:0] douta,
	input [2:0] push_button,
	output int_push_button
	
	);

	wire [2:0] db_push_button;
	reg [31:0] push_button_p_r [0:15];

	always@(posedge clk) begin
	
		douta <= push_button_p_r[addra];

		if(rst) begin
			push_button_p_r[0] <= 0;
			push_button_p_r[1] <= 0;
			push_button_p_r[2] <= 0;
			push_button_p_r[3] <= 0;
			push_button_p_r[4] <= 0;
			push_button_p_r[5] <= 0;
			push_button_p_r[6] <= 0;
			push_button_p_r[7] <= 0;
			push_button_p_r[8] <= 0;
			push_button_p_r[9] <= 0;
			push_button_p_r[10] <= 0;
			push_button_p_r[11] <= 0;
			push_button_p_r[12] <= 0;
			push_button_p_r[13] <= 0;
			push_button_p_r[14] <= 0;
			push_button_p_r[15] <= 0;
		end
		else begin
			push_button_p_r[0] <= db_push_button;
		end
	end
	  
	debounce inst_debounce_1(.clk(clk), .reset(rst), .db_in(push_button[0]), .db_out(db_push_button[0]));  
	debounce inst_debounce_2(.clk(clk), .reset(rst), .db_in(push_button[1]), .db_out(db_push_button[1]));
	debounce inst_debounce_3(.clk(clk), .reset(rst), .db_in(push_button[2]), .db_out(db_push_button[2]));
	
	assign int_push_button = |(db_push_button);

endmodule
module push_button_p(

	input clk,
	input rst,
	input [3:0] addra,
	output reg [31:0] douta,
	input [2:0] push_button,
	output int_push_button
	
	);


	wire [2:0] db_push_button;
	reg [31:0] push_button_p_r [0:15];

	always@(posedge clk) begin
	
		douta <= push_button_p_r[addra];

		if(rst) begin
			push_button_p_r[0] <= 0;
			push_button_p_r[1] <= 0;
			push_button_p_r[2] <= 0;
			push_button_p_r[3] <= 0;
			push_button_p_r[4] <= 0;
			push_button_p_r[5] <= 0;
			push_button_p_r[6] <= 0;
			push_button_p_r[7] <= 0;
			push_button_p_r[8] <= 0;
			push_button_p_r[9] <= 0;
			push_button_p_r[10] <= 0;
			push_button_p_r[11] <= 0;
			push_button_p_r[12] <= 0;
			push_button_p_r[13] <= 0;
			push_button_p_r[14] <= 0;
			push_button_p_r[15] <= 0;
		end
		else begin
			push_button_p_r[0] <= db_push_button;
		end
	end
	  
	debounce inst_debounce_1(.clk(clk), .reset(rst), .db_in(push_button[0]), .db_out(db_push_button[0]));  
	debounce inst_debounce_2(.clk(clk), .reset(rst), .db_in(push_button[1]), .db_out(db_push_button[1]));
	debounce inst_debounce_3(.clk(clk), .reset(rst), .db_in(push_button[2]), .db_out(db_push_button[2]));
	
	assign int_push_button = |(db_push_button);

endmodule