⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ps2_keyboard_interface.bsf

📁 本实验实现PS/2接口与RS-232接口的数据传输
💻 BSF
字号:
/*
WARNING: Do NOT edit the input and output ports in this file in a text
editor if you plan to continue editing the block that represents it in
the Block Editor! File corruption is VERY likely to occur.
*/
/*
Copyright (C) 1991-2004 Altera Corporation
Any  megafunction  design,  and related netlist (encrypted  or  decrypted),
support information,  device programming or simulation file,  and any other
associated  documentation or information  provided by  Altera  or a partner
under  Altera's   Megafunction   Partnership   Program  may  be  used  only
to program  PLD  devices (but not masked  PLD  devices) from  Altera.   Any
other  use  of such  megafunction  design,  netlist,  support  information,
device programming or simulation file,  or any other  related documentation
or information  is prohibited  for  any  other purpose,  including, but not
limited to  modification,  reverse engineering,  de-compiling, or use  with
any other  silicon devices,  unless such use is  explicitly  licensed under
a separate agreement with  Altera  or a megafunction partner.  Title to the
intellectual property,  including patents,  copyrights,  trademarks,  trade
secrets,  or maskworks,  embodied in any such megafunction design, netlist,
support  information,  device programming or simulation file,  or any other
related documentation or information provided by  Altera  or a megafunction
partner, remains with Altera, the megafunction partner, or their respective
licensors. No other licenses, including any licenses needed under any third
party's intellectual property, are provided herein.
*/
(header "symbol" (version "1.1"))
(symbol
	(rect 16 16 264 240)
	(text "ps2_keyboard_interface" (rect 5 0 124 12)(font "Arial" ))
	(text "inst" (rect 8 208 25 220)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "clk" (rect 0 0 14 12)(font "Arial" ))
		(text "clk" (rect 21 27 35 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 1))
	)
	(port
		(pt 0 48)
		(input)
		(text "reset" (rect 0 0 24 12)(font "Arial" ))
		(text "reset" (rect 21 43 45 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 0 64)
		(input)
		(text "rx_read" (rect 0 0 36 12)(font "Arial" ))
		(text "rx_read" (rect 21 59 57 71)(font "Arial" ))
		(line (pt 0 64)(pt 16 64)(line_width 1))
	)
	(port
		(pt 0 80)
		(input)
		(text "tx_data[7..0]" (rect 0 0 62 12)(font "Arial" ))
		(text "tx_data[7..0]" (rect 21 75 83 87)(font "Arial" ))
		(line (pt 0 80)(pt 16 80)(line_width 3))
	)
	(port
		(pt 0 96)
		(input)
		(text "tx_write" (rect 0 0 37 12)(font "Arial" ))
		(text "tx_write" (rect 21 91 58 103)(font "Arial" ))
		(line (pt 0 96)(pt 16 96)(line_width 1))
	)
	(port
		(pt 248 64)
		(output)
		(text "rx_extended" (rect 0 0 60 12)(font "Arial" ))
		(text "rx_extended" (rect 167 59 227 71)(font "Arial" ))
		(line (pt 248 64)(pt 232 64)(line_width 1))
	)
	(port
		(pt 248 80)
		(output)
		(text "rx_released" (rect 0 0 56 12)(font "Arial" ))
		(text "rx_released" (rect 171 75 227 87)(font "Arial" ))
		(line (pt 248 80)(pt 232 80)(line_width 1))
	)
	(port
		(pt 248 96)
		(output)
		(text "rx_shift_key_on" (rect 0 0 80 12)(font "Arial" ))
		(text "rx_shift_key_on" (rect 147 91 227 103)(font "Arial" ))
		(line (pt 248 96)(pt 232 96)(line_width 1))
	)
	(port
		(pt 248 112)
		(output)
		(text "rx_scan_code[7..0]" (rect 0 0 94 12)(font "Arial" ))
		(text "rx_scan_code[7..0]" (rect 133 107 227 119)(font "Arial" ))
		(line (pt 248 112)(pt 232 112)(line_width 3))
	)
	(port
		(pt 248 128)
		(output)
		(text "rx_ascii[7..0]" (rect 0 0 63 12)(font "Arial" ))
		(text "rx_ascii[7..0]" (rect 164 123 227 135)(font "Arial" ))
		(line (pt 248 128)(pt 232 128)(line_width 3))
	)
	(port
		(pt 248 144)
		(output)
		(text "rx_data_ready" (rect 0 0 70 12)(font "Arial" ))
		(text "rx_data_ready" (rect 157 139 227 151)(font "Arial" ))
		(line (pt 248 144)(pt 232 144)(line_width 1))
	)
	(port
		(pt 248 160)
		(output)
		(text "tx_write_ack_o" (rect 0 0 73 12)(font "Arial" ))
		(text "tx_write_ack_o" (rect 154 155 227 167)(font "Arial" ))
		(line (pt 248 160)(pt 232 160)(line_width 1))
	)
	(port
		(pt 248 176)
		(output)
		(text "tx_error_no_keyboard_ack" (rect 0 0 130 12)(font "Arial" ))
		(text "tx_error_no_keyboard_ack" (rect 97 171 227 183)(font "Arial" ))
		(line (pt 248 176)(pt 232 176)(line_width 1))
	)
	(port
		(pt 248 32)
		(bidir)
		(text "ps2_clk" (rect 0 0 37 12)(font "Arial" ))
		(text "ps2_clk" (rect 190 27 227 39)(font "Arial" ))
		(line (pt 248 32)(pt 232 32)(line_width 1))
	)
	(port
		(pt 248 48)
		(bidir)
		(text "ps2_data" (rect 0 0 44 12)(font "Arial" ))
		(text "ps2_data" (rect 183 43 227 55)(font "Arial" ))
		(line (pt 248 48)(pt 232 48)(line_width 1))
	)
	(parameter
		"TIMER_60USEC_VALUE_PP"
		"2950"
		""
	)
	(parameter
		"TIMER_60USEC_BITS_PP"
		"12"
		""
	)
	(parameter
		"TIMER_5USEC_VALUE_PP"
		"186"
		""
	)
	(parameter
		"TIMER_5USEC_BITS_PP"
		"8"
		""
	)
	(parameter
		"TRAP_SHIFT_KEYS_PP"
		"0"
		""
	)
	(parameter
		"m1_rx_clk_h"
		"1"
		""
	)
	(parameter
		"m1_rx_clk_l"
		"0"
		""
	)
	(parameter
		"m1_rx_falling_edge_marker"
		"13"
		""
	)
	(parameter
		"m1_rx_rising_edge_marker"
		"14"
		""
	)
	(parameter
		"m1_tx_force_clk_l"
		"3"
		""
	)
	(parameter
		"m1_tx_first_wait_clk_h"
		"10"
		""
	)
	(parameter
		"m1_tx_first_wait_clk_l"
		"11"
		""
	)
	(parameter
		"m1_tx_reset_timer"
		"12"
		""
	)
	(parameter
		"m1_tx_wait_clk_h"
		"2"
		""
	)
	(parameter
		"m1_tx_clk_h"
		"4"
		""
	)
	(parameter
		"m1_tx_clk_l"
		"5"
		""
	)
	(parameter
		"m1_tx_wait_keyboard_ack"
		"6"
		""
	)
	(parameter
		"m1_tx_done_recovery"
		"7"
		""
	)
	(parameter
		"m1_tx_error_no_keyboard_ack"
		"8"
		""
	)
	(parameter
		"m1_tx_rising_edge_marker"
		"9"
		""
	)
	(parameter
		"m2_rx_data_ready"
		"1"
		""
	)
	(parameter
		"m2_rx_data_ready_ack"
		"0"
		""
	)
	(drawing
		(rectangle (rect 16 16 232 208)(line_width 1))
	)
	(annotation_block (parameter)(rect 264 -64 364 16))
)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -