adder_1.bdf

来自「一些很好的FPGA设计实例」· BDF 代码 · 共 407 行

BDF
407
字号
/*
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 -32 144 136 160)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "cin" (rect 5 0 19 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 -16 104 152 120)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "a" (rect 5 0 10 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 120 104 136)
	(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
	(text "b" (rect 5 0 10 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 584 208 760 224)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "cout" (rect 90 0 111 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 696 120 872 136)
	(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
	(text "sum" (rect 90 0 111 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 96 392 144)
	(text "XOR" (rect 1 0 21 10)(font "Arial" (font_size 6)))
	(text "inst1" (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 11 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 11 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 49 24)(pt 64 24)(line_width 1))
	)
	(drawing
		(line (pt 14 13)(pt 25 13)(line_width 1))
		(line (pt 14 36)(pt 25 36)(line_width 1))
		(arc (pt 7 29)(pt 7 19)(rect -14 8 19 41)(line_width 1))
		(arc (pt 49 24)(pt 25 13)(rect -6 13 57 76)(line_width 1))
		(arc (pt 25 35)(pt 49 24)(rect -6 -27 57 36)(line_width 1))
		(arc (pt 8 36)(pt 8 12)(rect -21 7 14 42)(line_width 1))
	)
)
(symbol
	(rect 560 104 624 152)
	(text "XOR" (rect 1 0 21 10)(font "Arial" (font_size 6)))
	(text "inst3" (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 11 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 11 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 49 24)(pt 64 24)(line_width 1))
	)
	(drawing
		(line (pt 14 13)(pt 25 13)(line_width 1))
		(line (pt 14 36)(pt 25 36)(line_width 1))
		(arc (pt 7 29)(pt 7 19)(rect -14 8 19 41)(line_width 1))
		(arc (pt 49 24)(pt 25 13)(rect -6 13 57 76)(line_width 1))
		(arc (pt 25 35)(pt 49 24)(rect -6 -27 57 36)(line_width 1))
		(arc (pt 8 36)(pt 8 12)(rect -21 7 14 42)(line_width 1))
	)
)
(symbol
	(rect 472 192 536 240)
	(text "NAND2" (rect 1 0 32 10)(font "Arial" (font_size 6)))
	(text "inst8" (rect 3 37 26 49)(font "Arial" ))
	(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 15 32)(line_width 1))
	)
	(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 15 16)(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 52 24)(pt 64 24)(line_width 1))
	)
	(drawing
		(line (pt 15 37)(pt 32 37)(line_width 1))
		(line (pt 15 12)(pt 32 12)(line_width 1))
		(line (pt 15 36)(pt 15 12)(line_width 1))
		(arc (pt 32 36)(pt 32 12)(rect 20 12 45 37)(line_width 1))
		(circle (rect 44 20 52 28)(line_width 1))
	)
)
(symbol
	(rect 328 168 392 216)
	(text "NAND2" (rect 1 0 32 10)(font "Arial" (font_size 6)))
	(text "inst9" (rect 3 37 26 49)(font "Arial" ))
	(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 15 32)(line_width 1))
	)
	(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 15 16)(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 52 24)(pt 64 24)(line_width 1))
	)
	(drawing
		(line (pt 15 37)(pt 32 37)(line_width 1))
		(line (pt 15 12)(pt 32 12)(line_width 1))
		(line (pt 15 36)(pt 15 12)(line_width 1))
		(arc (pt 32 36)(pt 32 12)(rect 20 12 45 37)(line_width 1))
		(circle (rect 44 20 52 28)(line_width 1))
	)
)
(symbol
	(rect 328 232 392 280)
	(text "NAND2" (rect 1 0 32 10)(font "Arial" (font_size 6)))
	(text "inst10" (rect 3 37 32 49)(font "Arial" ))
	(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 15 32)(line_width 1))
	)
	(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 15 16)(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 52 24)(pt 64 24)(line_width 1))
	)
	(drawing
		(line (pt 15 37)(pt 32 37)(line_width 1))
		(line (pt 15 12)(pt 32 12)(line_width 1))
		(line (pt 15 36)(pt 15 12)(line_width 1))
		(arc (pt 32 36)(pt 32 12)(rect 20 12 45 37)(line_width 1))
		(circle (rect 44 20 52 28)(line_width 1))
	)
)
(connector
	(pt 432 192)
	(pt 392 192)
)
(connector
	(pt 392 256)
	(pt 432 256)
)
(connector
	(pt 560 136)
	(pt 544 136)
)
(connector
	(pt 328 264)
	(pt 232 264)
)
(connector
	(pt 328 200)
	(pt 240 200)
)
(connector
	(pt 240 200)
	(pt 240 128)
)
(connector
	(pt 328 184)
	(pt 264 184)
)
(connector
	(pt 544 136)
	(pt 544 152)
)
(connector
	(pt 328 248)
	(pt 280 248)
)
(connector
	(pt 280 168)
	(pt 280 248)
)
(connector
	(pt 488 168)
	(pt 280 168)
)
(connector
	(pt 488 168)
	(pt 488 120)
)
(connector
	(pt 248 112)
	(pt 248 104)
)
(connector
	(pt 264 136)
	(pt 264 184)
)
(connector
	(pt 264 136)
	(pt 288 136)
)
(connector
	(pt 288 136)
	(pt 288 112)
)
(connector
	(pt 432 192)
	(pt 432 208)
)
(connector
	(pt 432 256)
	(pt 432 224)
)
(connector
	(pt 584 216)
	(pt 536 216)
)
(connector
	(pt 432 208)
	(pt 472 208)
)
(connector
	(pt 432 224)
	(pt 472 224)
)
(connector
	(pt 136 152)
	(pt 232 152)
)
(connector
	(pt 232 152)
	(pt 544 152)
)
(connector
	(pt 488 120)
	(pt 560 120)
)
(connector
	(pt 248 112)
	(pt 288 112)
)
(connector
	(pt 288 112)
	(pt 328 112)
)
(connector
	(pt 96 128)
	(pt 104 128)
)
(connector
	(pt 240 128)
	(pt 328 128)
)
(connector
	(pt 152 112)
	(pt 248 112)
)
(connector
	(pt 104 128)
	(pt 240 128)
)
(connector
	(pt 392 120)
	(pt 488 120)
)
(connector
	(pt 232 152)
	(pt 232 264)
)
(connector
	(pt 624 128)
	(pt 696 128)
)
(junction (pt 104 128))
(junction (pt 232 152))
(junction (pt 488 120))
(junction (pt 248 112))
(junction (pt 288 112))
(junction (pt 240 128))

⌨️ 快捷键说明

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