tvu1020
Newbie level 3
Hello, I'm working on a little project called binary to decimal converter.
I use 4 push buttons as my 4 bits binary input. 7 segment display is my decimal output.The board i'm using is Basys2, and when I tried to synthesis it, it said the port "btn" is never connected and left unused.
Could anyone give me some advice? Here's the code and the constraints file
constraint file
I use 4 push buttons as my 4 bits binary input. 7 segment display is my decimal output.The board i'm using is Basys2, and when I tried to synthesis it, it said the port "btn" is never connected and left unused.
Could anyone give me some advice? Here's the code and the constraints file
Code:
module binaryconverter(clk,btn, AN, segA, segB, segC, segD, segE, segF, segG,segDP);
input clk;
input [3:0]btn;
output reg [3:0]AN;
output reg segA, segB, segC, segD, segE, segF, segG,segDP;
always @(btn)
begin
AN = 4'b1110;
{segA, segB, segC, segD, segE, segF, segG, segDP} = 8'b00100101;
end
endmodule
constraint file
Code:
NET clk LOC=B8;
NET btn<3> LOC=A7;
NET btn<2> LOC=M4;
NET btn<1> LOC=C11;
NET btn<0> LOC=G12;
NET AN<3> LOC=K14;
NET AN<2> LOC=M13;
NET AN<1> LOC=J12;
NET AN<0> LOC=F12;