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

📄 block1.bdf

📁 自动售货机的程序
💻 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-2007 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.
*/
(header "graphic" (version "1.3"))
(pin
	(input)
	(rect 40 408 208 424)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "key_in[1..0]" (rect 5 0 64 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 -16 424 32 456))
)
(pin
	(input)
	(rect 56 72 224 88)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "clk_in" (rect 5 0 33 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 8 88 56 104))
)
(pin
	(output)
	(rect 752 72 928 88)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "sell" (rect 90 0 106 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 928 88 984 104))
)
(pin
	(output)
	(rect 760 88 936 104)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "fetch" (rect 90 0 115 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 936 104 984 120))
)
(pin
	(output)
	(rect 760 104 936 120)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "get" (rect 90 0 105 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 936 120 984 136))
)
(symbol
	(rect 552 48 712 176)
	(text "seller" (rect 5 0 30 12)(font "Arial" ))
	(text "inst" (rect 8 112 25 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 "rst_n" (rect 0 0 24 12)(font "Arial" ))
		(text "rst_n" (rect 21 43 45 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 0 64)
		(input)
		(text "in_wujiao" (rect 0 0 43 12)(font "Arial" ))
		(text "in_wujiao" (rect 21 59 64 71)(font "Arial" ))
		(line (pt 0 64)(pt 16 64)(line_width 1))
	)
	(port
		(pt 0 80)
		(input)
		(text "in_yikuai" (rect 0 0 43 12)(font "Arial" ))
		(text "in_yikuai" (rect 21 75 64 87)(font "Arial" ))
		(line (pt 0 80)(pt 16 80)(line_width 1))
	)
	(port
		(pt 160 32)
		(output)
		(text "sell_succeed" (rect 0 0 63 12)(font "Arial" ))
		(text "sell_succeed" (rect 76 27 139 39)(font "Arial" ))
		(line (pt 160 32)(pt 144 32)(line_width 1))
	)
	(port
		(pt 160 48)
		(output)
		(text "fetch_alarm" (rect 0 0 59 12)(font "Arial" ))
		(text "fetch_alarm" (rect 80 43 139 55)(font "Arial" ))
		(line (pt 160 48)(pt 144 48)(line_width 1))
	)
	(port
		(pt 160 64)
		(output)
		(text "get_change" (rect 0 0 56 12)(font "Arial" ))
		(text "get_change" (rect 83 59 139 71)(font "Arial" ))
		(line (pt 160 64)(pt 144 64)(line_width 1))
	)
	(parameter
		"idle"
		"B\"00001\""
		""
	)
	(parameter
		"wujiao"
		"B\"00010\""
		""
	)
	(parameter
		"yikuai"
		"B\"00100\""
		""
	)
	(parameter
		"yikuaiwu"
		"B\"01000\""
		""
	)
	(parameter
		"liangkuai"
		"B\"10000\""
		""
	)
	(drawing
		(rectangle (rect 16 16 144 112)(line_width 1))
	)
	(annotation_block (parameter)(rect 712 -40 824 48))
)
(symbol
	(rect 312 -16 328 16)
	(text "VCC" (rect 0 5 10 25)(font "Arial" (font_size 6))(vertical))
	(text "inst6" (rect 5 6 17 29)(font "Arial" )(vertical)(invisible))
	(port
		(pt 16 16)
		(output)
		(text "1" (rect 19 7 24 19)(font "Courier New" (bold))(invisible))
		(text "1" (rect 7 8 19 13)(font "Courier New" (bold))(vertical)(invisible))
		(line (pt 16 16)(pt 8 16)(line_width 1))
	)
	(drawing
		(line (pt 8 24)(pt 8 8)(line_width 1))
	)
	(rotate90)
)
(symbol
	(rect 456 120 504 152)
	(text "NOT" (rect 1 0 21 10)(font "Arial" (font_size 6)))
	(text "inst7" (rect 3 21 26 33)(font "Arial" ))
	(port
		(pt 0 16)
		(input)
		(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
		(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
		(line (pt 0 16)(pt 13 16)(line_width 1))
	)
	(port
		(pt 48 16)
		(output)
		(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
		(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
		(line (pt 39 16)(pt 48 16)(line_width 1))
	)
	(drawing
		(line (pt 13 25)(pt 13 7)(line_width 1))
		(line (pt 13 7)(pt 31 16)(line_width 1))
		(line (pt 13 25)(pt 31 16)(line_width 1))
		(circle (rect 31 12 39 20)(line_width 1))
	)
)
(symbol
	(rect 456 160 504 192)
	(text "NOT" (rect 1 0 21 10)(font "Arial" (font_size 6)))
	(text "inst8" (rect 3 21 26 33)(font "Arial" ))
	(port
		(pt 0 16)
		(input)
		(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
		(text "IN" (rect 2 7 13 19)(font "Courier New" (bold))(invisible))
		(line (pt 0 16)(pt 13 16)(line_width 1))
	)
	(port
		(pt 48 16)
		(output)
		(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
		(text "OUT" (rect 32 7 49 19)(font "Courier New" (bold))(invisible))
		(line (pt 39 16)(pt 48 16)(line_width 1))
	)
	(drawing
		(line (pt 13 25)(pt 13 7)(line_width 1))
		(line (pt 13 7)(pt 31 16)(line_width 1))
		(line (pt 13 25)(pt 31 16)(line_width 1))
		(circle (rect 31 12 39 20)(line_width 1))
	)
)
(symbol
	(rect 352 368 640 464)
	(text "debounce" (rect 5 0 52 12)(font "Arial" ))
	(text "inst3" (rect 8 80 31 92)(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 "key_in[key_width-1..0]" (rect 0 0 112 12)(font "Arial" ))
		(text "key_in[key_width-1..0]" (rect 21 43 133 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 3))
	)
	(port
		(pt 288 32)
		(output)
		(text "key_out[key_width-1..0]" (rect 0 0 119 12)(font "Arial" ))
		(text "key_out[key_width-1..0]" (rect 148 27 267 39)(font "Arial" ))
		(line (pt 288 32)(pt 272 32)(line_width 3))
	)
	(parameter
		"key_width"
		"2"
		""
	)
	(drawing
		(rectangle (rect 16 16 272 80)(line_width 1))
	)
	(annotation_block (parameter)(rect 640 336 744 368))
)
(symbol
	(rect 360 -32 480 64)
	(text "Reset_Delay" (rect 5 0 69 12)(font "Arial" ))
	(text "inst2" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "iRST" (rect 0 0 23 12)(font "Arial" ))
		(text "iRST" (rect 21 27 44 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 1))
	)
	(port
		(pt 0 48)
		(input)
		(text "iCLK" (rect 0 0 23 12)(font "Arial" ))
		(text "iCLK" (rect 21 43 44 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 120 32)
		(output)
		(text "oRESET" (rect 0 0 41 12)(font "Arial" ))
		(text "oRESET" (rect 58 27 99 39)(font "Arial" ))
		(line (pt 120 32)(pt 104 32)(line_width 1))
	)
	(drawing
		(rectangle (rect 16 16 104 80)(line_width 1))
	)
)
(symbol
	(rect 184 232 304 328)
	(text "std_div" (rect 5 0 41 12)(font "Arial" ))
	(text "inst1" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "clk_in" (rect 0 0 28 12)(font "Arial" ))
		(text "clk_in" (rect 21 27 49 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 1))
	)
	(port
		(pt 120 32)
		(output)
		(text "clk_out" (rect 0 0 35 12)(font "Arial" ))
		(text "clk_out" (rect 64 27 99 39)(font "Arial" ))
		(line (pt 120 32)(pt 104 32)(line_width 1))
	)
	(parameter
		"diver"
		"250000"
		""
	)
	(parameter
		"div_width"
		"25"
		""
	)
	(drawing
		(rectangle (rect 16 16 104 80)(line_width 1))
	)
	(annotation_block (parameter)(rect 304 184 408 232))
)
(connector
	(pt 184 264)
	(pt 160 264)
)
(connector
	(pt 160 264)
	(pt 160 152)
)
(connector
	(pt 160 152)
	(pt 248 152)
)
(connector
	(pt 248 152)
	(pt 248 80)
)
(connector
	(pt 304 264)
	(pt 328 264)
)
(connector
	(pt 328 264)
	(pt 328 400)
)
(connector
	(pt 328 400)
	(pt 352 400)
)
(connector
	(pt 208 416)
	(pt 352 416)
	(bus)
)
(connector
	(pt 504 136)
	(pt 512 136)
)
(connector
	(pt 512 136)
	(pt 512 112)
)
(connector
	(pt 512 112)
	(pt 552 112)
)
(connector
	(pt 504 176)
	(pt 528 176)
)
(connector
	(pt 528 176)
	(pt 528 128)
)
(connector
	(pt 528 128)
	(pt 552 128)
)
(connector
	(text "key_out[1..0]" (rect 650 384 716 396)(font "Arial" ))
	(pt 640 400)
	(pt 824 400)
	(bus)
)
(connector
	(text "key_out[0]" (rect 410 120 463 132)(font "Arial" ))
	(pt 456 136)
	(pt 400 136)
)
(connector
	(text "key_out[1]" (rect 410 160 463 172)(font "Arial" ))
	(pt 456 176)
	(pt 400 176)
)
(connector
	(pt 712 80)
	(pt 752 80)
)
(connector
	(pt 712 96)
	(pt 760 96)
)
(connector
	(pt 712 112)
	(pt 760 112)
)
(connector
	(pt 224 80)
	(pt 248 80)
)
(connector
	(pt 480 0)
	(pt 504 0)
)
(connector
	(pt 504 0)
	(pt 504 96)
)
(connector
	(pt 504 96)
	(pt 552 96)
)
(connector
	(pt 328 0)
	(pt 360 0)
)
(connector
	(pt 360 16)
	(pt 328 16)
)
(connector
	(pt 328 16)
	(pt 328 80)
)
(connector
	(pt 248 80)
	(pt 328 80)
)
(connector
	(pt 328 80)
	(pt 552 80)
)
(junction (pt 248 80))
(junction (pt 328 80))

⌨️ 快捷键说明

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