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

📄 codelock1.bdf

📁 实现电子密码锁的各项功能,经过编译和仿真
💻 BDF
📖 第 1 页 / 共 2 页
字号:
/*
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-2006 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 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.
*/
(header "graphic" (version "1.3"))
(pin
	(input)
	(rect -48 64 120 80)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "q[7..0]" (rect 5 0 36 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)))
	(annotation_block (location)(rect -144 80 -96 192))
)
(pin
	(input)
	(rect -104 216 64 232)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "q_temp[7..0]" (rect 5 0 67 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)))
	(annotation_block (location)(rect -192 232 -144 344))
)
(pin
	(input)
	(rect -120 304 48 320)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "clk4" (rect 5 0 25 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)))
	(annotation_block (location)(rect -208 320 -160 336))
)
(pin
	(input)
	(rect 1264 104 1280 272)
	(text "INPUT" (rect 6 133 16 161)(font "Arial" (font_size 6))(vertical))
	(text "clk7" (rect 4 5 16 25)(font "Arial" )(vertical))
	(pt 8 168)
	(drawing
		(line (pt 4 92)(pt 4 117)(line_width 1))
		(line (pt 12 92)(pt 12 117)(line_width 1))
		(line (pt 8 121)(pt 8 168)(line_width 1))
		(line (pt 4 92)(pt 12 92)(line_width 1))
		(line (pt 12 117)(pt 8 121)(line_width 1))
		(line (pt 4 117)(pt 8 121)(line_width 1))
	)
	(rotate270)
	(text "VCC" (rect -1 136 9 156)(font "Arial" (font_size 6))(vertical))
	(annotation_block (location)(rect 1176 272 1224 288))
)
(pin
	(input)
	(rect -16 -8 152 8)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "clk1" (rect 5 0 25 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)))
	(annotation_block (location)(rect -112 8 -64 24))
)
(pin
	(input)
	(rect -32 152 136 168)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "clk2" (rect 5 0 25 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)))
	(annotation_block (location)(rect -128 168 -80 184))
)
(pin
	(output)
	(rect 640 144 816 160)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "fa" (rect 90 0 100 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))
	)
	(annotation_block (location)(rect 816 160 864 176))
)
(pin
	(output)
	(rect 640 160 816 176)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "fb" (rect 90 0 100 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))
	)
	(annotation_block (location)(rect 808 176 856 192))
)
(pin
	(output)
	(rect 728 520 904 536)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "c[3..0]" (rect 90 0 121 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))
	)
	(annotation_block (location)(rect 904 536 952 592))
)
(pin
	(output)
	(rect 936 336 1112 352)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "d[4..0]" (rect 90 0 121 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))
	)
	(annotation_block (location)(rect 1048 296 1096 368))
)
(pin
	(output)
	(rect 1456 392 1632 408)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "police11" (rect 90 0 130 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))
	)
	(annotation_block (location)(rect 1632 408 1680 424))
)
(symbol
	(rect 208 40 328 136)
	(text "Reg1" (rect 5 0 30 12)(font "Arial" ))
	(text "inst" (rect 8 80 25 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "q[7..0]" (rect 0 0 31 12)(font "Arial" ))
		(text "q[7..0]" (rect 21 27 52 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 3))
	)
	(port
		(pt 0 48)
		(input)
		(text "clk1" (rect 0 0 20 12)(font "Arial" ))
		(text "clk1" (rect 21 43 41 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 120 32)
		(output)
		(text "a[7..0]" (rect 0 0 31 12)(font "Arial" ))
		(text "a[7..0]" (rect 68 27 99 39)(font "Arial" ))
		(line (pt 120 32)(pt 104 32)(line_width 3))
	)
	(drawing
		(rectangle (rect 16 16 104 80)(line_width 1))
	)
)
(symbol
	(rect 200 192 344 288)
	(text "Reg2" (rect 5 0 30 12)(font "Arial" ))
	(text "inst1" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "q_temp[7..0]" (rect 0 0 62 12)(font "Arial" ))
		(text "q_temp[7..0]" (rect 21 27 83 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 3))
	)
	(port
		(pt 0 48)
		(input)
		(text "clk2" (rect 0 0 20 12)(font "Arial" ))
		(text "clk2" (rect 21 43 41 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 144 32)
		(output)
		(text "b[7..0]" (rect 0 0 31 12)(font "Arial" ))
		(text "b[7..0]" (rect 92 27 123 39)(font "Arial" ))
		(line (pt 144 32)(pt 128 32)(line_width 3))
	)
	(drawing
		(rectangle (rect 16 16 128 80)(line_width 1))
	)
)
(symbol
	(rect 128 360 264 456)
	(text "or88" (rect 5 0 26 12)(font "Arial" ))
	(text "inst2" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "q_temp[7..0]" (rect 0 0 62 12)(font "Arial" ))
		(text "q_temp[7..0]" (rect 21 27 83 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 3))
	)
	(port
		(pt 136 32)
		(output)
		(text "qout" (rect 0 0 21 12)(font "Arial" ))
		(text "qout" (rect 94 27 115 39)(font "Arial" ))
		(line (pt 136 32)(pt 120 32)(line_width 1))
	)
	(drawing
		(rectangle (rect 16 16 120 80)(line_width 1))
	)
)
(symbol
	(rect 520 120 616 216)
	(text "compare8" (rect 5 0 53 12)(font "Arial" ))
	(text "inst3" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "q1[7..0]" (rect 0 0 37 12)(font "Arial" ))
		(text "q1[7..0]" (rect 21 27 58 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 3))
	)
	(port
		(pt 0 48)
		(input)
		(text "q2[7..0]" (rect 0 0 37 12)(font "Arial" ))
		(text "q2[7..0]" (rect 21 43 58 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 3))
	)
	(port
		(pt 0 64)
		(input)
		(text "test" (rect 0 0 18 12)(font "Arial" ))
		(text "test" (rect 21 59 39 71)(font "Arial" ))
		(line (pt 0 64)(pt 16 64)(line_width 1))
	)
	(port
		(pt 96 32)
		(output)
		(text "fa" (rect 0 0 10 12)(font "Arial" ))
		(text "fa" (rect 65 27 75 39)(font "Arial" ))
		(line (pt 96 32)(pt 80 32)(line_width 1))
	)
	(port
		(pt 96 48)
		(output)
		(text "fb" (rect 0 0 10 12)(font "Arial" ))
		(text "fb" (rect 65 43 75 55)(font "Arial" ))
		(line (pt 96 48)(pt 80 48)(line_width 1))
	)
	(drawing
		(rectangle (rect 16 16 80 80)(line_width 1))
	)
)
(symbol
	(rect 504 -16 632 80)
	(text "compa" (rect 5 0 38 12)(font "Arial" ))
	(text "inst4" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "q11[7..0]" (rect 0 0 43 12)(font "Arial" ))
		(text "q11[7..0]" (rect 21 27 64 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 3))
	)
	(port
		(pt 0 48)
		(input)
		(text "q22[7..0]" (rect 0 0 43 12)(font "Arial" ))
		(text "q22[7..0]" (rect 21 43 64 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 3))
	)
	(port
		(pt 128 32)
		(output)
		(text "police" (rect 0 0 28 12)(font "Arial" ))
		(text "police" (rect 79 27 107 39)(font "Arial" ))
		(line (pt 128 32)(pt 112 32)(line_width 1))
	)
	(drawing
		(rectangle (rect 16 16 112 80)(line_width 1))
	)
)
(symbol
	(rect 512 368 608 464)
	(text "cnt10" (rect 5 0 32 12)(font "Arial" ))
	(text "inst5" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "ena" (rect 0 0 17 12)(font "Arial" ))
		(text "ena" (rect 21 27 38 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 1))
	)
	(port
		(pt 0 48)
		(input)
		(text "clk3" (rect 0 0 20 12)(font "Arial" ))
		(text "clk3" (rect 21 43 41 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 0 64)
		(input)
		(text "lock" (rect 0 0 20 12)(font "Arial" ))
		(text "lock" (rect 21 59 41 71)(font "Arial" ))
		(line (pt 0 64)(pt 16 64)(line_width 1))
	)
	(port
		(pt 96 32)
		(output)
		(text "c[3..0]" (rect 0 0 31 12)(font "Arial" ))
		(text "c[3..0]" (rect 44 27 75 39)(font "Arial" ))
		(line (pt 96 32)(pt 80 32)(line_width 3))
	)
	(port
		(pt 96 48)
		(output)
		(text "cout2" (rect 0 0 27 12)(font "Arial" ))
		(text "cout2" (rect 48 43 75 55)(font "Arial" ))
		(line (pt 96 48)(pt 80 48)(line_width 1))
	)
	(drawing
		(rectangle (rect 16 16 80 80)(line_width 1))
	)
)
(symbol
	(rect 776 368 872 464)
	(text "cnt30" (rect 5 0 32 12)(font "Arial" ))
	(text "inst6" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "clk5" (rect 0 0 20 12)(font "Arial" ))
		(text "clk5" (rect 21 27 41 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 1))
	)
	(port
		(pt 0 48)
		(input)
		(text "enat" (rect 0 0 21 12)(font "Arial" ))
		(text "enat" (rect 21 43 42 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 96 32)
		(output)
		(text "d[4..0]" (rect 0 0 31 12)(font "Arial" ))
		(text "d[4..0]" (rect 44 27 75 39)(font "Arial" ))
		(line (pt 96 32)(pt 80 32)(line_width 3))
	)
	(port
		(pt 96 48)
		(output)
		(text "cout3" (rect 0 0 27 12)(font "Arial" ))
		(text "cout3" (rect 48 43 75 55)(font "Arial" ))
		(line (pt 96 48)(pt 80 48)(line_width 1))
	)
	(drawing
		(rectangle (rect 16 16 80 80)(line_width 1))
	)
)
(symbol
	(rect 432 488 480 520)
	(text "NOT" (rect 27 22 47 32)(font "Arial" (font_size 6)))
	(text "inst7" (rect 22 -1 45 11)(font "Arial" ))
	(port
		(pt 48 16)
		(input)
		(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
		(text "IN" (rect 35 13 46 25)(font "Courier New" (bold))(invisible))
		(line (pt 48 16)(pt 35 16)(line_width 1))
	)
	(port
		(pt 0 16)
		(output)
		(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
		(text "OUT" (rect -1 13 16 25)(font "Courier New" (bold))(invisible))
		(line (pt 9 16)(pt 0 16)(line_width 1))
	)
	(drawing
		(line (pt 35 7)(pt 35 25)(line_width 1))
		(line (pt 35 25)(pt 17 16)(line_width 1))
		(line (pt 35 7)(pt 17 16)(line_width 1))
		(circle (rect 9 12 17 20)(line_width 1))
	)
	(rotate180)
)
(symbol
	(rect 648 344 680 392)
	(text "NOT" (rect 22 27 32 47)(font "Arial" (font_size 6))(vertical))
	(text "inst8" (rect -1 22 11 45)(font "Arial" )(vertical))
	(port
		(pt 16 48)
		(input)
		(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
		(text "IN" (rect 13 35 25 46)(font "Courier New" (bold))(vertical)(invisible))
		(line (pt 16 48)(pt 16 35)(line_width 1))
	)
	(port
		(pt 16 0)
		(output)
		(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
		(text "OUT" (rect 13 -1 25 16)(font "Courier New" (bold))(vertical)(invisible))
		(line (pt 16 9)(pt 16 0)(line_width 1))
	)
	(drawing
		(line (pt 7 35)(pt 25 35)(line_width 1))
		(line (pt 25 35)(pt 16 17)(line_width 1))
		(line (pt 7 35)(pt 16 17)(line_width 1))
		(circle (rect 12 9 20 17)(line_width 1))
	)
	(flipx_rotate90)
)
(symbol
	(rect 320 376 384 424)
	(text "AND2" (rect 1 0 25 10)(font "Arial" (font_size 6)))
	(text "inst9" (rect 3 37 26 49)(font "Arial" ))
	(port
		(pt 0 16)
		(input)
		(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
		(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
		(line (pt 0 16)(pt 14 16)(line_width 1))
	)
	(port
		(pt 0 32)
		(input)
		(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
		(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
		(line (pt 0 32)(pt 14 32)(line_width 1))
	)
	(port
		(pt 64 24)
		(output)
		(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
		(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
		(line (pt 42 24)(pt 64 24)(line_width 1))
	)
	(drawing
		(line (pt 14 12)(pt 30 12)(line_width 1))
		(line (pt 14 37)(pt 31 37)(line_width 1))
		(line (pt 14 12)(pt 14 37)(line_width 1))
		(arc (pt 31 37)(pt 30 12)(rect 18 12 43 37)(line_width 1))
	)
)
(symbol
	(rect 1288 368 1400 464)

⌨️ 快捷键说明

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