FPGA的PS2口接口程序
源代码在线查看: setup.tcl.bak
#Setup.tcl
# Setup pin setting for EP2C5_EP2C8 V3 main board
set_global_assignment -name RESERVE_ALL_UNUSED_PINS "AS INPUT TRI-STATED"
set_global_assignment -name ENABLE_INIT_DONE_OUTPUT OFF
set_location_assignment PIN_23 -to clk
set_location_assignment PIN_56 -to reset
#78LED
set_location_assignment PIN_137 -to 78ledcom\[0\]
set_location_assignment PIN_135 -to 78ledcom\[1\]
set_location_assignment PIN_139 -to 78ledcom\[2\]
set_location_assignment PIN_138 -to 78ledcom\[3\]
set_location_assignment PIN_142 -to 78ledcom\[4\]
set_location_assignment PIN_141 -to 78ledcom\[5\]
set_location_assignment PIN_144 -to 78ledcom\[6\]
set_location_assignment PIN_143 -to 78ledcom\[7\]
set_location_assignment PIN_133 -to 78leddata\[0\]
set_location_assignment PIN_127 -to 78leddata\[1\]
set_location_assignment PIN_116 -to 78leddata\[2\]
set_location_assignment PIN_117 -to 78leddata\[3\]
set_location_assignment PIN_128 -to 78leddata\[4\]
set_location_assignment PIN_134 -to 78leddata\[5\]
set_location_assignment PIN_115 -to 78leddata\[6\]
set_location_assignment PIN_118 -to 78leddata\[7\]
#PS2
set_location_assignment PIN_95 -to kb_data
set_location_assignment PIN_96 -to kb_clk