jiaotongdeng.bdf

来自「用VHDL做的交通灯设计」· BDF 代码 · 共 428 行

BDF
428
字号
/*
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-2005 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 0 48 168 64)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "Hold" (rect 9 0 31 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 0 96 168 112)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "Reset" (rect 9 0 38 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 0 144 168 160)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "Clk" (rect 9 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)))
)
(pin
	(output)
	(rect 568 144 744 160)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "num[5..0]" (rect 90 0 137 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 568 200 744 216)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "GA" (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))
	)
)
(pin
	(output)
	(rect 568 216 744 232)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "GB" (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))
	)
)
(pin
	(output)
	(rect 568 232 744 248)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "YA" (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))
	)
)
(pin
	(output)
	(rect 576 248 752 264)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "YB" (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))
	)
)
(pin
	(output)
	(rect 568 264 744 280)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "RA" (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))
	)
)
(pin
	(output)
	(rect 568 280 744 296)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "RB" (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))
	)
)
(symbol
	(rect 328 176 448 336)
	(text "controller" (rect 5 0 49 12)(font "Arial" ))
	(text "inst" (rect 8 144 25 156)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "Hold" (rect 0 0 22 12)(font "Arial" ))
		(text "Hold" (rect 21 27 43 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 1))
	)
	(port
		(pt 0 48)
		(input)
		(text "Reset" (rect 0 0 29 12)(font "Arial" ))
		(text "Reset" (rect 21 43 50 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 0 64)
		(input)
		(text "Clk" (rect 0 0 16 12)(font "Arial" ))
		(text "Clk" (rect 21 59 37 71)(font "Arial" ))
		(line (pt 0 64)(pt 16 64)(line_width 1))
	)
	(port
		(pt 0 80)
		(input)
		(text "Num[5..0]" (rect 0 0 49 12)(font "Arial" ))
		(text "Num[5..0]" (rect 21 75 70 87)(font "Arial" ))
		(line (pt 0 80)(pt 16 80)(line_width 3))
	)
	(port
		(pt 120 32)
		(output)
		(text "GA" (rect 0 0 15 12)(font "Arial" ))
		(text "GA" (rect 84 27 99 39)(font "Arial" ))
		(line (pt 120 32)(pt 104 32)(line_width 1))
	)
	(port
		(pt 120 48)
		(output)
		(text "GB" (rect 0 0 15 12)(font "Arial" ))
		(text "GB" (rect 84 43 99 55)(font "Arial" ))
		(line (pt 120 48)(pt 104 48)(line_width 1))
	)
	(port
		(pt 120 64)
		(output)
		(text "YA" (rect 0 0 15 12)(font "Arial" ))
		(text "YA" (rect 84 59 99 71)(font "Arial" ))
		(line (pt 120 64)(pt 104 64)(line_width 1))
	)
	(port
		(pt 120 80)
		(output)
		(text "YB" (rect 0 0 15 12)(font "Arial" ))
		(text "YB" (rect 84 75 99 87)(font "Arial" ))
		(line (pt 120 80)(pt 104 80)(line_width 1))
	)
	(port
		(pt 120 96)
		(output)
		(text "RA" (rect 0 0 15 12)(font "Arial" ))
		(text "RA" (rect 84 91 99 103)(font "Arial" ))
		(line (pt 120 96)(pt 104 96)(line_width 1))
	)
	(port
		(pt 120 112)
		(output)
		(text "RB" (rect 0 0 15 12)(font "Arial" ))
		(text "RB" (rect 84 107 99 119)(font "Arial" ))
		(line (pt 120 112)(pt 104 112)(line_width 1))
	)
	(drawing
		(rectangle (rect 16 16 104 144)(line_width 1))
	)
)
(symbol
	(rect 224 56 360 152)
	(text "counter" (rect 5 0 41 12)(font "Arial" ))
	(text "inst1" (rect 8 80 31 92)(font "Arial" ))
	(port
		(pt 0 32)
		(input)
		(text "Hold" (rect 0 0 22 12)(font "Arial" ))
		(text "Hold" (rect 21 27 43 39)(font "Arial" ))
		(line (pt 0 32)(pt 16 32)(line_width 1))
	)
	(port
		(pt 0 48)
		(input)
		(text "Reset" (rect 0 0 29 12)(font "Arial" ))
		(text "Reset" (rect 21 43 50 55)(font "Arial" ))
		(line (pt 0 48)(pt 16 48)(line_width 1))
	)
	(port
		(pt 0 64)
		(input)
		(text "Clk" (rect 0 0 16 12)(font "Arial" ))
		(text "Clk" (rect 21 59 37 71)(font "Arial" ))
		(line (pt 0 64)(pt 16 64)(line_width 1))
	)
	(port
		(pt 136 32)
		(output)
		(text "Num[5..0]" (rect 0 0 49 12)(font "Arial" ))
		(text "Num[5..0]" (rect 66 27 115 39)(font "Arial" ))
		(line (pt 136 32)(pt 120 32)(line_width 3))
	)
	(drawing
		(rectangle (rect 16 16 120 80)(line_width 1))
	)
)
(connector
	(pt 192 240)
	(pt 328 240)
)
(connector
	(pt 192 152)
	(pt 192 240)
)
(connector
	(pt 224 120)
	(pt 216 120)
)
(connector
	(pt 328 256)
	(pt 320 256)
	(bus)
)
(connector
	(pt 320 256)
	(pt 320 160)
	(bus)
)
(connector
	(pt 392 160)
	(pt 320 160)
	(bus)
)
(connector
	(pt 392 160)
	(pt 392 88)
	(bus)
)
(connector
	(pt 472 88)
	(pt 392 88)
	(bus)
)
(connector
	(pt 392 88)
	(pt 360 88)
	(bus)
)
(connector
	(pt 216 120)
	(pt 216 152)
)
(connector
	(pt 168 152)
	(pt 192 152)
)
(connector
	(pt 192 152)
	(pt 216 152)
)
(connector
	(pt 184 88)
	(pt 184 56)
)
(connector
	(pt 184 56)
	(pt 168 56)
)
(connector
	(pt 200 208)
	(pt 328 208)
)
(connector
	(pt 200 208)
	(pt 200 88)
)
(connector
	(pt 184 88)
	(pt 200 88)
)
(connector
	(pt 200 88)
	(pt 224 88)
)
(connector
	(pt 176 224)
	(pt 328 224)
)
(connector
	(pt 176 224)
	(pt 176 104)
)
(connector
	(pt 168 104)
	(pt 176 104)
)
(connector
	(pt 176 104)
	(pt 224 104)
)
(connector
	(pt 472 88)
	(pt 472 152)
	(bus)
)
(connector
	(pt 472 152)
	(pt 568 152)
	(bus)
)
(connector
	(pt 448 208)
	(pt 568 208)
)
(connector
	(pt 448 224)
	(pt 568 224)
)
(connector
	(pt 448 240)
	(pt 568 240)
)
(connector
	(pt 448 256)
	(pt 576 256)
)
(connector
	(pt 448 272)
	(pt 568 272)
)
(connector
	(pt 448 288)
	(pt 568 288)
)
(junction (pt 192 152))
(junction (pt 392 88))
(junction (pt 200 88))
(junction (pt 176 104))

⌨️ 快捷键说明

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