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

📄 keyscan.bdf

📁 增加有去抖模块等的fpga控制矩阵键盘的源代码及RTL级的模块图
💻 BDF
字号:
/*
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-2008 Altera Corporation
Your use of Altera Corporation's design tools, logic functions 
and other software and tools, and its AMPP partner logic 
functions, and any output files from any of the foregoing 
(including device programming or simulation files), and any 
associated documentation or information are expressly subject 
to the terms and conditions of the Altera Program License 
Subscription Agreement, Altera MegaCore Function License 
Agreement, or other applicable license agreement, including, 
without limitation, that your use is for the sole purpose of 
programming logic devices manufactured by Altera and sold by 
Altera or its authorized distributors.  Please refer to the 
applicable agreement for further details.
*/
//#pragma file_not_in_maxplusii_format
(header "graphic" (version "1.3"))
(pin
	(input)
	(rect 56 344 224 360)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "KEY[3..0]" (rect 5 0 53 12)(font "Arial" ))
	(pt 168 8)
	(drawing
		(line (pt 92 12)(pt 117 12)(line_width 1))
		(line (pt 92 4)(pt 117 4)(line_width 1))
		(line (pt 121 8)(pt 168 8)(line_width 1))
		(line (pt 92 12)(pt 92 4)(line_width 1))
		(line (pt 117 4)(pt 121 8)(line_width 1))
		(line (pt 117 12)(pt 121 8)(line_width 1))
	)
	(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
	(input)
	(rect 56 392 224 408)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "CR" (rect 5 0 21 12)(font "Arial" ))
	(pt 168 8)
	(drawing
		(line (pt 92 12)(pt 117 12)(line_width 1))
		(line (pt 92 4)(pt 117 4)(line_width 1))
		(line (pt 121 8)(pt 168 8)(line_width 1))
		(line (pt 92 12)(pt 92 4)(line_width 1))
		(line (pt 117 4)(pt 121 8)(line_width 1))
		(line (pt 117 12)(pt 121 8)(line_width 1))
	)
	(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
	(input)
	(rect 64 448 232 464)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "CLK1M" (rect 5 0 40 12)(font "Arial" ))
	(pt 168 8)
	(drawing
		(line (pt 92 12)(pt 117 12)(line_width 1))
		(line (pt 92 4)(pt 117 4)(line_width 1))
		(line (pt 121 8)(pt 168 8)(line_width 1))
		(line (pt 92 12)(pt 92 4)(line_width 1))
		(line (pt 117 4)(pt 121 8)(line_width 1))
		(line (pt 117 12)(pt 121 8)(line_width 1))
	)
	(text "VCC" (rect 136 7 156 17)(font "Arial" (font_size 6)))
)
(pin
	(output)
	(rect 416 344 592 360)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "SELOUT[2..0]" (rect 90 0 158 12)(font "Arial" ))
	(pt 0 8)
	(drawing
		(line (pt 0 8)(pt 52 8)(line_width 1))
		(line (pt 52 4)(pt 78 4)(line_width 1))
		(line (pt 52 12)(pt 78 12)(line_width 1))
		(line (pt 52 12)(pt 52 4)(line_width 1))
		(line (pt 78 4)(pt 82 8)(line_width 1))
		(line (pt 82 8)(pt 78 12)(line_width 1))
		(line (pt 78 12)(pt 82 8)(line_width 1))
	)
)
(pin
	(output)
	(rect 416 400 592 416)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "SEGOUT[6..0]" (rect 90 0 160 12)(font "Arial" ))
	(pt 0 8)
	(drawing
		(line (pt 0 8)(pt 52 8)(line_width 1))
		(line (pt 52 4)(pt 78 4)(line_width 1))
		(line (pt 52 12)(pt 78 12)(line_width 1))
		(line (pt 52 12)(pt 52 4)(line_width 1))
		(line (pt 78 4)(pt 82 8)(line_width 1))
		(line (pt 82 8)(pt 78 12)(line_width 1))
		(line (pt 78 12)(pt 82 8)(line_width 1))
	)
)
(symbol
	(rect 128 16 272 112)
	(text "clk_block" (rect 5 0 51 12)(font "Arial" ))
	(text "inst" (rect 8 80 25 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "clk_1m" (rect 0 0 35 12)(font "Arial" ))
		(text "clk_1m" (rect 21 27 56 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 1))
	)
	(port
		(pt 0 48)
		(input)
		(text "clr" (rect 0 0 11 12)(font "Arial" ))
		(text "clr" (rect 21 43 32 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 144 32)
		(output)
		(text "clk_scan" (rect 0 0 43 12)(font "Arial" ))
		(text "clk_scan" (rect 80 27 123 39)(font "Arial" ))
		(line (pt 144 32)(pt 128 32)(line_width 1))
	)
	(port
		(pt 144 48)
		(output)
		(text "clk_key" (rect 0 0 38 12)(font "Arial" ))
		(text "clk_key" (rect 85 43 123 55)(font "Arial" ))
		(line (pt 144 48)(pt 128 48)(line_width 1))
	)
	(port
		(pt 144 64)
		(output)
		(text "selout[2..0]" (rect 0 0 55 12)(font "Arial" ))
		(text "selout[2..0]" (rect 68 59 123 71)(font "Arial" ))
		(line (pt 144 64)(pt 128 64)(line_width 3))
	)
	(drawing
		(rectangle (rect 16 16 128 80)(line_width 1))
	)
)
(symbol
	(rect 80 200 264 296)
	(text "key_dounce4" (rect 5 0 81 14)(font "Arial" (font_size 8)))
	(text "inst1" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "KEYIN[3..0]" (rect 0 0 63 14)(font "Arial" (font_size 8)))
		(text "KEYIN[3..0]" (rect 21 27 84 41)(font "Arial" (font_size 8)))
		(line (pt 0 32)(pt 16 32)(line_width 3))
	)
	(port
		(pt 0 48)
		(input)
		(text "CLK_SAM" (rect 0 0 57 14)(font "Arial" (font_size 8)))
		(text "CLK_SAM" (rect 21 43 78 57)(font "Arial" (font_size 8)))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 184 32)
		(output)
		(text "KEY_H[3..0]" (rect 0 0 68 14)(font "Arial" (font_size 8)))
		(text "KEY_H[3..0]" (rect 95 27 163 41)(font "Arial" (font_size 8)))
		(line (pt 184 32)(pt 168 32)(line_width 3))
	)
	(port
		(pt 184 48)
		(output)
		(text "KEY_L[3..0]" (rect 0 0 67 14)(font "Arial" (font_size 8)))
		(text "KEY_L[3..0]" (rect 96 43 163 57)(font "Arial" (font_size 8)))
		(line (pt 184 48)(pt 168 48)(line_width 3))
	)
	(drawing
		(rectangle (rect 16 16 168 80)(line_width 1))
	)
)
(symbol
	(rect 400 8 576 104)
	(text "keys_display" (rect 5 0 71 12)(font "Arial" ))
	(text "inst2" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "seltmp[2..0]" (rect 0 0 59 12)(font "Arial" ))
		(text "seltmp[2..0]" (rect 21 27 80 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 3))
	)
	(port
		(pt 0 48)
		(input)
		(text "bcdin[31..0]" (rect 0 0 57 12)(font "Arial" ))
		(text "bcdin[31..0]" (rect 21 43 78 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 3))
	)
	(port
		(pt 176 32)
		(output)
		(text "segout[6..0]" (rect 0 0 59 12)(font "Arial" ))
		(text "segout[6..0]" (rect 96 27 155 39)(font "Arial" ))
		(line (pt 176 32)(pt 160 32)(line_width 3))
	)
	(drawing
		(rectangle (rect 16 16 160 80)(line_width 1))
	)
)
(symbol
	(rect 400 168 584 296)
	(text "keys_decoder" (rect 5 0 74 12)(font "Arial" ))
	(text "inst3" (rect 8 112 31 124)(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 "clr" (rect 0 0 11 12)(font "Arial" ))
		(text "clr" (rect 21 43 32 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 0 64)
		(input)
		(text "seltmp[2..0]" (rect 0 0 59 12)(font "Arial" ))
		(text "seltmp[2..0]" (rect 21 59 80 71)(font "Arial" ))
		(line (pt 0 64)(pt 16 64)(line_width 3))
	)
	(port
		(pt 0 80)
		(input)
		(text "key[3..0]" (rect 0 0 44 12)(font "Arial" ))
		(text "key[3..0]" (rect 21 75 65 87)(font "Arial" ))
		(line (pt 0 80)(pt 16 80)(line_width 3))
	)
	(port
		(pt 184 32)
		(output)
		(text "key_code[4..0]" (rect 0 0 74 12)(font "Arial" ))
		(text "key_code[4..0]" (rect 89 27 163 39)(font "Arial" ))
		(line (pt 184 32)(pt 168 32)(line_width 3))
	)
	(drawing
		(rectangle (rect 16 16 168 112)(line_width 1))
	)
)
(symbol
	(rect 144 504 176 520)
	(text "VCC" (rect 7 0 27 10)(font "Arial" (font_size 6)))
	(text "inst8" (rect 3 5 26 17)(font "Arial" )(invisible))
	(port
		(pt 16 16)
		(output)
		(text "1" (rect 19 7 24 19)(font "Courier New" (bold))(invisible))
		(text "1" (rect 19 7 24 19)(font "Courier New" (bold))(invisible))
		(line (pt 16 16)(pt 16 8)(line_width 1))
	)
	(drawing
		(line (pt 8 8)(pt 24 8)(line_width 1))
	)
)
(symbol
	(rect 496 480 528 512)
	(text "GND" (rect 3 6 24 16)(font "Arial" (font_size 6)))
	(text "inst9" (rect 6 -1 29 11)(font "Arial" )(invisible))
	(port
		(pt 16 32)
		(output)
		(text "1" (rect 18 0 23 12)(font "Courier New" (bold))(invisible))
		(text "1" (rect 9 20 14 32)(font "Courier New" (bold))(invisible))
		(line (pt 16 24)(pt 16 32)(line_width 1))
	)
	(drawing
		(line (pt 24 24)(pt 16 16)(line_width 1))
		(line (pt 16 16)(pt 8 24)(line_width 1))
		(line (pt 24 24)(pt 8 24)(line_width 1))
	)
	(rotate180)
)
(connector
	(pt 128 64)
	(pt 72 64)
)
(connector
	(pt 272 80)
	(pt 344 80)
	(bus)
)
(connector
	(pt 344 40)
	(pt 400 40)
	(bus)
)
(connector
	(pt 400 232)
	(pt 344 232)
	(bus)
)
(connector
	(pt 344 40)
	(pt 344 80)
	(bus)
)
(connector
	(pt 400 248)
	(pt 264 248)
	(bus)
)
(connector
	(pt 72 176)
	(pt 304 176)
)
(connector
	(pt 304 216)
	(pt 400 216)
)
(connector
	(pt 304 176)
	(pt 304 216)
)
(connector
	(text "CLK" (rect 82 32 103 44)(font "Arial" ))
	(pt 128 48)
	(pt 72 48)
)
(connector
	(text "CLR" (rect 56 147 68 169)(font "Arial" )(vertical))
	(pt 72 64)
	(pt 72 176)
)
(connector
	(text "CLR" (rect 234 384 256 396)(font "Arial" ))
	(pt 224 400)
	(pt 280 400)
)
(connector
	(text "CLK" (rect 242 440 263 452)(font "Arial" ))
	(pt 232 456)
	(pt 280 456)
)
(connector
	(text "SEL[2..0]" (rect 346 336 392 348)(font "Arial" ))
	(pt 416 352)
	(pt 336 352)
	(bus)
)
(connector
	(pt 272 48)
	(pt 376 48)
)
(connector
	(pt 376 48)
	(pt 376 200)
)
(connector
	(pt 376 200)
	(pt 400 200)
)
(connector
	(pt 296 64)
	(pt 296 144)
)
(connector
	(pt 296 144)
	(pt 40 144)
)
(connector
	(pt 40 144)
	(pt 40 248)
)
(connector
	(pt 80 248)
	(pt 40 248)
)
(connector
	(pt 296 64)
	(pt 272 64)
)
(connector
	(text "SEG[6..0]" (rect 338 392 386 404)(font "Arial" ))
	(pt 416 408)
	(pt 328 408)
	(bus)
)
(connector
	(text "SEG[6..0]" (rect 586 24 634 36)(font "Arial" ))
	(pt 576 40)
	(pt 648 40)
	(bus)
)
(connector
	(text "BCD[4..0]" (rect 594 184 643 196)(font "Arial" ))
	(pt 584 200)
	(pt 672 200)
	(bus)
)
(connector
	(text "SEL[2..0]" (rect 328 183 340 229)(font "Arial" )(vertical))
	(pt 344 80)
	(pt 344 232)
	(bus)
)
(connector
	(text "BCD[31..0]" (rect 322 40 377 52)(font "Arial" ))
	(pt 400 56)
	(pt 312 56)
	(bus)
)
(connector
	(text "BCD[31..8]" (rect 170 504 225 516)(font "Arial" ))
	(pt 160 520)
	(pt 280 520)
	(bus)
)
(connector
	(text "BCD[7..5]" (rect 402 496 451 508)(font "Arial" ))
	(pt 512 512)
	(pt 392 512)
	(bus)
)
(connector
	(text "K[3..0]" (rect 26 216 59 228)(font "Arial" ))
	(pt 80 232)
	(pt 16 232)
	(bus)
)
(connector
	(text "K[3..0]" (rect 234 336 267 348)(font "Arial" ))
	(pt 224 352)
	(pt 280 352)
	(bus)
)
(junction (pt 344 80))

⌨️ 快捷键说明

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