data/full_repos/permissive/107057345/7 Seg Display/Basys3_Abacus_Top.v
None: at end of input
1: b'%Error: Cannot find file containing module: Seg\n        ... Looked in:\n             data/full_repos/permissive/107057345/7/Seg\n             data/full_repos/permissive/107057345/7/Seg.v\n             data/full_repos/permissive/107057345/7/Seg.sv\n             Seg\n             Seg.v\n             Seg.sv\n             obj_dir/Seg\n             obj_dir/Seg.v\n             obj_dir/Seg.sv\n%Error: Cannot find file containing module: Display,data/full_repos/permissive/107057345\n%Error: Cannot find file containing module: data/full_repos/permissive/107057345/7\n%Error: Cannot find file containing module: Display/Basys3_Abacus_Top.v\n%Error: Exiting due to 4 error(s)\n'
module Basys3_Abacus_Top(


	 input clk,
	 

	 input btnC,
	 input btnU, 
	 input btnD,
	 input btnR,
	 input btnL,
	 



	 input [15:0] sw, 
   

     output [15:0] led,
     

     output [6:0] seg,
     output [3:0] an, 
     output dp
    
 );
	

reg [15:0] x;


wire [7:0] sum;
wire [7:0] diff;
wire cout;



reg [15:0] B;
wire[19:0] bcdout;



reg [15:0] B1;
wire[19:0] bcdout1;

reg [15:0] B2;
wire[19:0] bcdout2;



wire [19:0] scroll_datain;
wire [15:0] scroll_dataout;



wire [19:0] scroll_datain_QU;
wire [15:0] scroll_dataout_QU;

wire [19:0] scroll_datain_REM;
wire [15:0] scroll_dataout_REM;



 wire [7:0] QU;
 wire [7:0] REM;


wire [15:0] Product;
wire [7:0] PP0;
wire [7:0] PP1;
wire [7:0] PP2;
wire [7:0] PP3;
wire [21:0] p_temp;


wire [7:0] zero_diff;
wire [7:0] twoC_diff;


wire clr_seg;
assign clr_seg = btnU | btnD | btnC;


wire clr_seg_DIV;
assign clr_seg_DIV = btnR | btnL;

 
assign zero_diff[7:0] = diff[7:0];
assign twoC_diff[7:0] = ((~(zero_diff[7:0])) +8'b00000001);	



assign p_temp[3:0] = PP0[3:0];
assign Product[3:0] = p_temp[3:0];

assign p_temp[9:4] = PP0[7:4]+PP1[3:0]+PP2[3:0];
assign Product[7:4] = p_temp[7:4];

assign p_temp[15:10] = PP1[7:4] + PP2[7:4] + PP3[3:0]+ {2'b00, p_temp[9:8]} ;
assign Product[11:8] = p_temp[13:10];

assign p_temp[21:16] = PP3[7:4] + {2'b00,p_temp[15:14]};
assign Product[15:12] = p_temp[19:16];


assign led[15:0] = sw[15:0];



always @(*) begin

if ( (btnU == 1) && (sw[15:8] <= sw[7:0]))  
begin
	
B = twoC_diff[7:0];

             x[15:12] = 'hA;
			 x[11:8] = scroll_dataout[11:8];
			 x[7:4] = scroll_dataout[7:4];
			 x[3:0] = scroll_dataout[3:0];

	end

else if ( (btnU == 1) && (sw[15:8] >= sw[7:0] ))  
	
	begin
B = diff[7:0];

             x[15:12] = scroll_dataout[15:12];
			 x[11:8] = scroll_dataout[11:8];
			 x[7:4] = scroll_dataout[7:4];
			 x[3:0] = scroll_dataout[3:0];
	 
	end


else if (btnD == 1) begin

B = Product[15:0];

             x[15:12] = scroll_dataout[15:12];
			 x[11:8] = scroll_dataout[11:8];
			 x[7:4] = scroll_dataout[7:4];
			 x[3:0] = scroll_dataout[3:0];
         
end

else if (btnR == 1) begin
 
B1 = QU[7:0];

             x[15:12] = scroll_dataout_QU[15:12];
			 x[11:8] = scroll_dataout_QU[11:8];
			 x[7:4] = scroll_dataout_QU[7:4];
			 x[3:0] = scroll_dataout_QU[3:0];

end

else if (btnL == 1) begin


B2 = REM[7:0];

             x[15:12] = scroll_dataout_REM[15:12];
			 x[11:8] = scroll_dataout_REM[11:8];
			 x[7:4] = scroll_dataout_REM[7:4];
			 x[3:0] = scroll_dataout_REM[3:0];

end

else 
	begin
	
B = {cout, sum[7:0]}; 	


             x[15:12] = scroll_dataout[15:12];
			 x[11:8] = scroll_dataout[11:8];
			 x[7:4] = scroll_dataout[7:4];
			 x[3:0] = scroll_dataout[3:0];
                 

	end
				end




bin_to_decimal u1 (

.B(B), 
.bcdout(bcdout)
);


BIN_DEC1 u2 (

.B1(B1),
.bcdout1(bcdout1)
);


BIN_DEC2 u3 (

.B2(B2),
.bcdout2(bcdout2)
);



seg_scroll u4(

.clk(clk),
.clr(clr_seg),
.scroll_datain(bcdout),
.scroll_dataout(scroll_dataout)
);


Seg_Scroll_QU u5(

.clk(clk),
.clr(clr_seg_DIV),
.scroll_datain_QU(bcdout1),
.scroll_dataout_QU(scroll_dataout_QU)
);


Seg_Scroll_REM u6(

.clk(clk),
.clr(clr_seg_DIV),
.scroll_datain_REM(bcdout2),
.scroll_dataout_REM(scroll_dataout_REM)
);




seg7decimal u7 (

.x(x),
.clk(clk),
.clr(btnC),
.a_to_g(seg),
.an(an),
.dp(dp)
);





adder u8 (

.clk(clk),
.a(sw[15:8]),
.b(sw[7:0]),
.sum(sum),
.diff(diff),
.cout(cout),
.cin(btnU)
);




multi_4_4_pp0 u9 (

.clk(clk),

.A0_3(sw[11:8]),
.B0_3(sw[3:0]),
.pp0(PP0)

);


multi_4_4_pp1 u10 (

.clk(clk),

.A4_7(sw[15:12]),
.B0_3(sw[3:0]),
.pp1(PP1)

);


multi_4_4_pp2 u11 (

.clk(clk),

.A0_3(sw[11:8]),
.B4_7(sw[7:4]),
.pp2(PP2)

);


multi_4_4_pp3 u12 (

.clk(clk),

.A4_7(sw[15:12]),
.B4_7(sw[7:4]),
.pp3(PP3)

);



divider u13(

.clk(clk),
.div(sw[15:8]),
.dvr(sw[7:0]),
.quotient(QU),
.remainder(REM)
);

endmodule
module Basys3_Abacus_Top(


	 input clk,
	 

	 input btnC,
	 input btnU, 
	 input btnD,
	 input btnR,
	 input btnL,
	 



	 input [15:0] sw, 
   

     output [15:0] led,
     

     output [6:0] seg,
     output [3:0] an, 
     output dp
    
 );

	

reg [15:0] x;


wire [7:0] sum;
wire [7:0] diff;
wire cout;



reg [15:0] B;
wire[19:0] bcdout;



reg [15:0] B1;
wire[19:0] bcdout1;

reg [15:0] B2;
wire[19:0] bcdout2;



wire [19:0] scroll_datain;
wire [15:0] scroll_dataout;



wire [19:0] scroll_datain_QU;
wire [15:0] scroll_dataout_QU;

wire [19:0] scroll_datain_REM;
wire [15:0] scroll_dataout_REM;



 wire [7:0] QU;
 wire [7:0] REM;


wire [15:0] Product;
wire [7:0] PP0;
wire [7:0] PP1;
wire [7:0] PP2;
wire [7:0] PP3;
wire [21:0] p_temp;


wire [7:0] zero_diff;
wire [7:0] twoC_diff;


wire clr_seg;
assign clr_seg = btnU | btnD | btnC;


wire clr_seg_DIV;
assign clr_seg_DIV = btnR | btnL;

 
assign zero_diff[7:0] = diff[7:0];
assign twoC_diff[7:0] = ((~(zero_diff[7:0])) +8'b00000001);	



assign p_temp[3:0] = PP0[3:0];
assign Product[3:0] = p_temp[3:0];

assign p_temp[9:4] = PP0[7:4]+PP1[3:0]+PP2[3:0];
assign Product[7:4] = p_temp[7:4];

assign p_temp[15:10] = PP1[7:4] + PP2[7:4] + PP3[3:0]+ {2'b00, p_temp[9:8]} ;
assign Product[11:8] = p_temp[13:10];

assign p_temp[21:16] = PP3[7:4] + {2'b00,p_temp[15:14]};
assign Product[15:12] = p_temp[19:16];


assign led[15:0] = sw[15:0];



always @(*) begin

if ( (btnU == 1) && (sw[15:8] <= sw[7:0]))  
begin
	
B = twoC_diff[7:0];

             x[15:12] = 'hA;
			 x[11:8] = scroll_dataout[11:8];
			 x[7:4] = scroll_dataout[7:4];
			 x[3:0] = scroll_dataout[3:0];

	end

else if ( (btnU == 1) && (sw[15:8] >= sw[7:0] ))  
	
	begin
B = diff[7:0];

             x[15:12] = scroll_dataout[15:12];
			 x[11:8] = scroll_dataout[11:8];
			 x[7:4] = scroll_dataout[7:4];
			 x[3:0] = scroll_dataout[3:0];
	 
	end


else if (btnD == 1) begin

B = Product[15:0];

             x[15:12] = scroll_dataout[15:12];
			 x[11:8] = scroll_dataout[11:8];
			 x[7:4] = scroll_dataout[7:4];
			 x[3:0] = scroll_dataout[3:0];
         
end

else if (btnR == 1) begin
 
B1 = QU[7:0];

             x[15:12] = scroll_dataout_QU[15:12];
			 x[11:8] = scroll_dataout_QU[11:8];
			 x[7:4] = scroll_dataout_QU[7:4];
			 x[3:0] = scroll_dataout_QU[3:0];

end

else if (btnL == 1) begin


B2 = REM[7:0];

             x[15:12] = scroll_dataout_REM[15:12];
			 x[11:8] = scroll_dataout_REM[11:8];
			 x[7:4] = scroll_dataout_REM[7:4];
			 x[3:0] = scroll_dataout_REM[3:0];

end

else 
	begin
	
B = {cout, sum[7:0]}; 	


             x[15:12] = scroll_dataout[15:12];
			 x[11:8] = scroll_dataout[11:8];
			 x[7:4] = scroll_dataout[7:4];
			 x[3:0] = scroll_dataout[3:0];
                 

	end
				end




bin_to_decimal u1 (

.B(B), 
.bcdout(bcdout)
);


BIN_DEC1 u2 (

.B1(B1),
.bcdout1(bcdout1)
);


BIN_DEC2 u3 (

.B2(B2),
.bcdout2(bcdout2)
);



seg_scroll u4(

.clk(clk),
.clr(clr_seg),
.scroll_datain(bcdout),
.scroll_dataout(scroll_dataout)
);


Seg_Scroll_QU u5(

.clk(clk),
.clr(clr_seg_DIV),
.scroll_datain_QU(bcdout1),
.scroll_dataout_QU(scroll_dataout_QU)
);


Seg_Scroll_REM u6(

.clk(clk),
.clr(clr_seg_DIV),
.scroll_datain_REM(bcdout2),
.scroll_dataout_REM(scroll_dataout_REM)
);




seg7decimal u7 (

.x(x),
.clk(clk),
.clr(btnC),
.a_to_g(seg),
.an(an),
.dp(dp)
);





adder u8 (

.clk(clk),
.a(sw[15:8]),
.b(sw[7:0]),
.sum(sum),
.diff(diff),
.cout(cout),
.cin(btnU)
);




multi_4_4_pp0 u9 (

.clk(clk),

.A0_3(sw[11:8]),
.B0_3(sw[3:0]),
.pp0(PP0)

);


multi_4_4_pp1 u10 (

.clk(clk),

.A4_7(sw[15:12]),
.B0_3(sw[3:0]),
.pp1(PP1)

);


multi_4_4_pp2 u11 (

.clk(clk),

.A0_3(sw[11:8]),
.B4_7(sw[7:4]),
.pp2(PP2)

);


multi_4_4_pp3 u12 (

.clk(clk),

.A4_7(sw[15:12]),
.B4_7(sw[7:4]),
.pp3(PP3)

);



divider u13(

.clk(clk),
.div(sw[15:8]),
.dvr(sw[7:0]),
.quotient(QU),
.remainder(REM)
);

endmodule