Reputation: 837
I'm trying to create a password system with a baysis2 FPGA and verilog that verifies a password which is entered via keyboard. I need to make sure that my keyboard is working properly, as it seems to be a bit glitchy. I was told that the best way to make sure my keyboard is sending data to the board is by checking to see if ps2d and ps2c are high when I press a button, which makes sense. The problem is that in testing, the two LEDs I bound ps2d and ps2c to are ALWAYS LOGICAL HIGH even when the keyboard is disconnected! Is this some feature of verilog/Xilinx ISE or does my board have a bad port?
The following is my Verilog code.
module wtf(ps2d, ps2c, ps2dout, ps2cout);
input wire ps2d, ps2c;
output wire ps2dout, ps2cout;
assign ps2dout = ps2d;
assign ps2cout = ps2c;
endmodule
With the following constraint file
NET "ps2c" LOC = "B1" | DRIVE = 2 | PULLUP ;
NET "ps2d" LOC = "C3" | DRIVE = 2 | PULLUP ;
NET "ps2cout" LOC = "G1" ;
NET "ps2dout" LOC = "P4" ;
Upvotes: 0
Views: 74
Reputation: 1435
Well, the UCF file enables internal pull-ups on those pins, so reading those as high with nothing connected is exactly what it is supposed to do.
Upvotes: 1