📄 i2c_altera.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-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 -112 560 56 576)
(text "INPUT" (rect 133 0 161 10)(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 156 17)(font "Arial" (font_size 6)))
)
(pin
(input)
(rect -88 112 80 128)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "RST" (rect 5 0 26 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 976 640 1144 656)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "PCLK" (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)))
)
(pin
(input)
(rect 976 680 1144 696)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "PDATA[7..0]" (rect 5 0 66 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 976 584 1144 600)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "P_HS" (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)))
)
(pin
(input)
(rect 976 616 1144 632)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "P_VS" (rect 5 0 32 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
(bidir)
(rect 1248 240 1424 256)
(text "BIDIR" (rect 1 0 25 10)(font "Arial" (font_size 6)))
(text "SCL" (rect 90 0 111 12)(font "Arial" ))
(pt 0 8)
(drawing
(line (pt 56 4)(pt 78 4)(line_width 1))
(line (pt 0 8)(pt 52 8)(line_width 1))
(line (pt 56 12)(pt 78 12)(line_width 1))
(line (pt 78 4)(pt 82 8)(line_width 1))
(line (pt 78 12)(pt 82 8)(line_width 1))
(line (pt 56 4)(pt 52 8)(line_width 1))
(line (pt 52 8)(pt 56 12)(line_width 1))
)
(text "VCC" (rect 4 7 24 17)(font "Arial" (font_size 6)))
)
(pin
(bidir)
(rect 1248 224 1424 240)
(text "BIDIR" (rect 1 0 25 10)(font "Arial" (font_size 6)))
(text "SDA" (rect 90 0 112 12)(font "Arial" ))
(pt 0 8)
(drawing
(line (pt 56 4)(pt 78 4)(line_width 1))
(line (pt 0 8)(pt 52 8)(line_width 1))
(line (pt 56 12)(pt 78 12)(line_width 1))
(line (pt 78 4)(pt 82 8)(line_width 1))
(line (pt 78 12)(pt 82 8)(line_width 1))
(line (pt 56 4)(pt 52 8)(line_width 1))
(line (pt 52 8)(pt 56 12)(line_width 1))
)
(text "VCC" (rect 4 7 24 17)(font "Arial" (font_size 6)))
)
(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 27 10)(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 29 26)(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 952 104 1120 328)
(text "I2C" (rect 5 0 22 12)(font "Arial" ))
(text "inst1" (rect 8 208 31 220)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "sysclk" (rect 0 0 33 12)(font "Arial" ))
(text "sysclk" (rect 21 27 54 39)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 1))
)
(port
(pt 0 48)
(input)
(text "clk_en" (rect 0 0 31 12)(font "Arial" ))
(text "clk_en" (rect 21 43 52 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 0 64)
(input)
(text "/reset" (rect 0 0 28 12)(font "Arial" ))
(text "/reset" (rect 21 59 49 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(line_width 1))
)
(port
(pt 0 80)
(input)
(text "Din[7..0]" (rect 0 0 42 12)(font "Arial" ))
(text "Din[7..0]" (rect 21 75 63 87)(font "Arial" ))
(line (pt 0 80)(pt 16 80)(line_width 3))
)
(port
(pt 0 96)
(input)
(text "Ack_tx" (rect 0 0 34 12)(font "Arial" ))
(text "Ack_tx" (rect 21 91 55 103)(font "Arial" ))
(line (pt 0 96)(pt 16 96)(line_width 1))
)
(port
(pt 0 112)
(input)
(text "Cmd_stop" (rect 0 0 50 12)(font "Arial" ))
(text "Cmd_stop" (rect 21 107 71 119)(font "Arial" ))
(line (pt 0 112)(pt 16 112)(line_width 1))
)
(port
(pt 0 128)
(input)
(text "Cmd_start" (rect 0 0 51 12)(font "Arial" ))
(text "Cmd_start" (rect 21 123 72 135)(font "Arial" ))
(line (pt 0 128)(pt 16 128)(line_width 1))
)
(port
(pt 0 144)
(input)
(text "Cmd_send" (rect 0 0 53 12)(font "Arial" ))
(text "Cmd_send" (rect 21 139 74 151)(font "Arial" ))
(line (pt 0 144)(pt 16 144)(line_width 1))
)
(port
(pt 0 160)
(input)
(text "Cmd_receive" (rect 0 0 66 12)(font "Arial" ))
(text "Cmd_receive" (rect 21 155 87 167)(font "Arial" ))
(line (pt 0 160)(pt 16 160)(line_width 1))
)
(port
(pt 0 176)
(input)
(text "Execute" (rect 0 0 40 12)(font "Arial" ))
(text "Execute" (rect 21 171 61 183)(font "Arial" ))
(line (pt 0 176)(pt 16 176)(line_width 1))
)
(port
(pt 168 32)
(output)
(text "Dout[7..0]" (rect 0 0 49 12)(font "Arial" ))
(text "Dout[7..0]" (rect 98 27 147 39)(font "Arial" ))
(line (pt 168 32)(pt 152 32)(line_width 3))
)
(port
(pt 168 48)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -