📄 i2c_top.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-2004 Altera Corporation
Any megafunction design, and related netlist (encrypted or decrypted),
support information, device programming or simulation file, and any other
associated documentation or information provided by Altera or a partner
under Altera's Megafunction Partnership Program may be used only
to program PLD devices (but not masked PLD devices) from Altera. Any
other use of such megafunction design, netlist, support information,
device programming or simulation file, or any other related documentation
or information is prohibited for any other purpose, including, but not
limited to modification, reverse engineering, de-compiling, or use with
any other silicon devices, unless such use is explicitly licensed under
a separate agreement with Altera or a megafunction partner. Title to the
intellectual property, including patents, copyrights, trademarks, trade
secrets, or maskworks, embodied in any such megafunction design, netlist,
support information, device programming or simulation file, or any other
related documentation or information provided by Altera or a megafunction
partner, remains with Altera, the megafunction partner, or their respective
licensors. No other licenses, including any licenses needed under any third
party's intellectual property, are provided herein.
*/
(header "graphic" (version "1.3"))
(pin
(input)
(rect -64 384 104 400)
(text "INPUT" (rect 133 0 161 9)(font "Arial" (font_size 6)))
(text "SYSCLK" (rect 5 0 48 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 153 17)(font "Arial" (font_size 6)))
)
(pin
(output)
(rect 1232 208 1408 224)
(text "OUTPUT" (rect 1 0 34 9)(font "Arial" (font_size 6)))
(text "BUSY" (rect 90 0 120 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 816 -64 992 -48)
(text "OUTPUT" (rect 1 0 34 9)(font "Arial" (font_size 6)))
(text "CMD_STOP" (rect 90 0 149 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 816 -40 992 -24)
(text "OUTPUT" (rect 1 0 34 9)(font "Arial" (font_size 6)))
(text "CMD_START" (rect 90 0 154 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 816 -16 992 0)
(text "OUTPUT" (rect 1 0 34 9)(font "Arial" (font_size 6)))
(text "CMD_SEND" (rect 90 0 151 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 816 8 992 24)
(text "OUTPUT" (rect 1 0 34 9)(font "Arial" (font_size 6)))
(text "CMD_READ" (rect 90 0 151 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 600 448 783 464)
(text "OUTPUT" (rect 1 0 34 9)(font "Arial" (font_size 6)))
(text "ROM_ADDR[6..0]" (rect 90 0 178 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 880 472 1059 488)
(text "OUTPUT" (rect 1 0 34 9)(font "Arial" (font_size 6)))
(text "ROM_DATA[7..0]" (rect 90 0 174 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 368 8 544 24)
(text "OUTPUT" (rect 1 0 34 9)(font "Arial" (font_size 6)))
(text "RST" (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 472 56 672 216)
(text "i2c_cmd" (rect 5 0 46 12)(font "Arial" ))
(text "inst" (rect 8 144 25 156)(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" (rect 0 0 12 12)(font "Arial" ))
(text "rst" (rect 21 43 33 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 0 64)
(input)
(text "busy" (rect 0 0 24 12)(font "Arial" ))
(text "busy" (rect 21 59 45 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(line_width 1))
)
(port
(pt 0 80)
(input)
(text "rom_data[7..0]" (rect 0 0 71 12)(font "Arial" ))
(text "rom_data[7..0]" (rect 21 75 92 87)(font "Arial" ))
(line (pt 0 80)(pt 16 80)(line_width 3))
)
(port
(pt 200 32)
(output)
(text "cmd_stop" (rect 0 0 48 12)(font "Arial" ))
(text "cmd_stop" (rect 131 27 179 39)(font "Arial" ))
(line (pt 200 32)(pt 184 32)(line_width 1))
)
(port
(pt 200 48)
(output)
(text "cmd_start" (rect 0 0 49 12)(font "Arial" ))
(text "cmd_start" (rect 130 43 179 55)(font "Arial" ))
(line (pt 200 48)(pt 184 48)(line_width 1))
)
(port
(pt 200 64)
(output)
(text "cmd_send" (rect 0 0 50 12)(font "Arial" ))
(text "cmd_send" (rect 129 59 179 71)(font "Arial" ))
(line (pt 200 64)(pt 184 64)(line_width 1))
)
(port
(pt 200 80)
(output)
(text "execute" (rect 0 0 38 12)(font "Arial" ))
(text "execute" (rect 141 75 179 87)(font "Arial" ))
(line (pt 200 80)(pt 184 80)(line_width 1))
)
(port
(pt 200 96)
(output)
(text "i2c_w_finish" (rect 0 0 60 12)(font "Arial" ))
(text "i2c_w_finish" (rect 119 91 179 103)(font "Arial" ))
(line (pt 200 96)(pt 184 96)(line_width 1))
)
(port
(pt 200 112)
(output)
(text "rom_addr[6..0]" (rect 0 0 71 12)(font "Arial" ))
(text "rom_addr[6..0]" (rect 108 107 179 119)(font "Arial" ))
(line (pt 200 112)(pt 184 112)(line_width 3))
)
(port
(pt 200 128)
(output)
(text "i2c_data_t[7..0]" (rect 0 0 76 12)(font "Arial" ))
(text "i2c_data_t[7..0]" (rect 103 123 179 135)(font "Arial" ))
(line (pt 200 128)(pt 184 128)(line_width 3))
)
(parameter
"GEN_S"
"32'b00000000000000000000000000000001"
""
)
(parameter
"S_WAIT"
"32'b00000000000000000000000000000010"
""
)
(parameter
"SUBADDR"
"32'b00000000000000000000000000000101"
""
)
(parameter
"SUBADDR_ACK"
"32'b00000000000000000000000000000110"
""
)
(parameter
"DATA"
"32'b00000000000000000000000000000111"
""
)
(parameter
"DATA_ACK"
"32'b00000000000000000000000000001000"
""
)
(parameter
"GEN_P"
"32'b00000000000000000000000000001001"
""
)
(parameter
"P_WAIT"
"32'b00000000000000000000000000001010"
""
)
(parameter
"IDLE"
"32'b00000000000000000000000000001011"
""
)
(parameter
"I2C_W_OK"
"32'b00000000000000000000000000001100"
""
)
(parameter
"HALT"
"32'b00000000000000000000000000001101"
""
)
(parameter
"CREATE_CHIP_RST"
"32'b00000000000000000000000000001110"
""
)
(drawing
(rectangle (rect 16 16 184 144)(line_width 1))
)
(annotation_block (parameter)(rect 248 -272 568 -88))
)
(symbol
(rect 888 64 920 80)
(text "VCC" (rect 7 0 24 9)(font "Arial" (font_size 6)))
(text "inst4" (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 848 336 880 368)
(text "GND" (rect 8 16 25 25)(font "Arial" (font_size 6)))
(text "inst6" (rect 3 21 26 33)(font "Arial" )(invisible))
(port
(pt 16 0)
(output)
(text "1" (rect 18 0 23 12)(font "Courier New" (bold))(invisible))
(text "1" (rect 18 0 23 12)(font "Courier New" (bold))(invisible))
(line (pt 16 8)(pt 16 0)(line_width 1))
)
(drawing
(line (pt 8 8)(pt 16 16)(line_width 1))
(line (pt 16 16)(pt 24 8)(line_width 1))
(line (pt 8 8)(pt 24 8)(line_width 1))
)
)
(symbol
(rect 200 72 296 168)
(text "rst_gen" (rect 5 0 41 12)(font "Arial" ))
(text "inst3" (rect 8 80 31 92)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "clk_i" (rect 0 0 22 12)(font "Arial" ))
(text "clk_i" (rect 21 27 43 39)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 1))
)
(port
(pt 96 32)
(output)
(text "rst_o" (rect 0 0 24 12)(font "Arial" ))
(text "rst_o" (rect 51 27 75 39)(font "Arial" ))
(line (pt 96 32)(pt 80 32)(line_width 1))
)
(drawing
(rectangle (rect 16 16 80 80)(line_width 1))
)
)
(symbol
(rect 648 344 808 424)
(text "SAA_ROM" (rect 48 1 123 17)(font "Arial" (font_size 10)))
(text "inst2" (rect 8 64 31 76)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "address[6..0]" (rect 0 0 75 14)(font "Arial" (font_size 8)))
(text "address[6..0]" (rect 20 26 95 40)(font "Arial" (font_size 8)))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 48)
(input)
(text "clock" (rect 0 0 29 14)(font "Arial" (font_size 8)))
(text "clock" (rect 26 42 55 56)(font "Arial" (font_size 8)))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 160 40)
(output)
(text "q[7..0]" (rect 0 0 35 14)(font "Arial" (font_size 8)))
(text "q[7..0]" (rect 111 34 146 48)(font "Arial" (font_size 8)))
(line (pt 160 40)(pt 144 40)(line_width 3))
)
(drawing
(line (pt 16 16)(pt 144 16)(line_width 1))
(line (pt 144 16)(pt 144 64)(line_width 1))
(line (pt 144 64)(pt 16 64)(line_width 1))
(line (pt 16 64)(pt 16 16)(line_width 1))
(line (pt 16 42)(pt 22 48)(line_width 1))
(line (pt 22 48)(pt 16 54)(line_width 1))
)
)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -