cpu_lab.bdf
来自「vhdl代码实现8位cpu功能」· BDF 代码 · 共 530 行
BDF
530 行
/*
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 -88 128 80 144)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "reset" (rect 5 0 29 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 -144 160 -96 176))
)
(pin
(input)
(rect -88 144 80 160)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "clock" (rect 5 0 30 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 -160 192 -112 208))
)
(pin
(output)
(rect 544 160 751 176)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "M_address[11..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 544 128 720 144)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "Write_Read" (rect 90 0 147 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 544 144 745 160)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "M_data_out[7..0]" (rect 90 0 172 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 544 224 720 240)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "R2out[7..0]" (rect 90 0 145 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 720 248 768 360))
)
(pin
(output)
(rect 544 240 720 256)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "R3out[7..0]" (rect 90 0 145 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 840 152 888 264))
)
(pin
(output)
(rect 544 208 720 224)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "R1out[7..0]" (rect 90 0 145 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 720 232 768 344))
)
(pin
(output)
(rect 544 192 720 208)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "R0out[7..0]" (rect 90 0 145 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 720 216 768 328))
)
(pin
(output)
(rect 544 288 720 304)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "overflow" (rect 90 0 132 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 544 272 720 288)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "status2[2..0]" (rect 90 0 152 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 720 288 768 336))
)
(pin
(output)
(rect 544 256 720 272)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "PCout[4..0]" (rect 90 0 146 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 776 288 816 360))
)
(pin
(output)
(rect 824 408 1016 424)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "M_q[7..0]" (rect 90 0 136 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 152 104 368 328)
(text "cpu" (rect 5 0 22 12)(font "Arial" ))
(text "inst" (rect 8 208 25 220)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "reset" (rect 0 0 24 12)(font "Arial" ))
(text "reset" (rect 21 27 45 39)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 1))
)
(port
(pt 0 48)
(input)
(text "clock" (rect 0 0 25 12)(font "Arial" ))
(text "clock" (rect 21 43 46 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 0 64)
(input)
(text "M_data_in[7..0]" (rect 0 0 75 12)(font "Arial" ))
(text "M_data_in[7..0]" (rect 21 59 96 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(line_width 3))
)
(port
(pt 216 32)
(output)
(text "Write_Read" (rect 0 0 57 12)(font "Arial" ))
(text "Write_Read" (rect 138 27 195 39)(font "Arial" ))
(line (pt 216 32)(pt 200 32)(line_width 1))
)
(port
(pt 216 48)
(output)
(text "M_data_out[7..0]" (rect 0 0 82 12)(font "Arial" ))
(text "M_data_out[7..0]" (rect 113 43 195 55)(font "Arial" ))
(line (pt 216 48)(pt 200 48)(line_width 3))
)
(port
(pt 216 64)
(output)
(text "M_address[11..0]" (rect 0 0 84 12)(font "Arial" ))
(text "M_address[11..0]" (rect 111 59 195 71)(font "Arial" ))
(line (pt 216 64)(pt 200 64)(line_width 3))
)
(port
(pt 216 192)
(output)
(text "overflow" (rect 0 0 42 12)(font "Arial" ))
(text "overflow" (rect 153 187 195 199)(font "Arial" ))
(line (pt 216 192)(pt 200 192)(line_width 1))
)
(port
(pt 216 96)
(output)
(text "R0out[7..0]" (rect 0 0 55 12)(font "Arial" ))
(text "R0out[7..0]" (rect 140 91 195 103)(font "Arial" ))
(line (pt 216 96)(pt 200 96)(line_width 3))
)
(port
(pt 216 112)
(output)
(text "R1out[7..0]" (rect 0 0 55 12)(font "Arial" ))
(text "R1out[7..0]" (rect 140 107 195 119)(font "Arial" ))
(line (pt 216 112)(pt 200 112)(line_width 3))
)
(port
(pt 216 128)
(output)
(text "R2out[7..0]" (rect 0 0 55 12)(font "Arial" ))
(text "R2out[7..0]" (rect 140 123 195 135)(font "Arial" ))
(line (pt 216 128)(pt 200 128)(line_width 3))
)
(port
(pt 216 144)
(output)
(text "R3out[7..0]" (rect 0 0 55 12)(font "Arial" ))
(text "R3out[7..0]" (rect 140 139 195 151)(font "Arial" ))
(line (pt 216 144)(pt 200 144)(line_width 3))
)
(port
(pt 216 160)
(output)
(text "PCout[4..0]" (rect 0 0 56 12)(font "Arial" ))
(text "PCout[4..0]" (rect 139 155 195 167)(font "Arial" ))
(line (pt 216 160)(pt 200 160)(line_width 3))
)
(port
(pt 216 176)
(output)
(text "status2[2..0]" (rect 0 0 62 12)(font "Arial" ))
(text "status2[2..0]" (rect 133 171 195 183)(font "Arial" ))
(line (pt 216 176)(pt 200 176)(line_width 3))
)
(drawing
(rectangle (rect 16 16 200 208)(line_width 1))
)
)
(symbol
(rect 552 384 712 504)
(text "lpm_ram_dq0" (rect 41 1 133 17)(font "Arial" (font_size 10)))
(text "inst1" (rect 8 104 31 116)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "data[7..0]" (rect 0 0 53 14)(font "Arial" (font_size 8)))
(text "data[7..0]" (rect 20 26 73 40)(font "Arial" (font_size 8)))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 56)
(input)
(text "we" (rect 0 0 18 14)(font "Arial" (font_size 8)))
(text "we" (rect 20 50 38 64)(font "Arial" (font_size 8)))
(line (pt 0 56)(pt 16 56)(line_width 1))
)
(port
(pt 0 88)
(input)
(text "inclock" (rect 0 0 38 14)(font "Arial" (font_size 8)))
(text "inclock" (rect 26 82 64 96)(font "Arial" (font_size 8)))
(line (pt 0 88)(pt 16 88)(line_width 1))
)
(port
(pt 0 72)
(input)
(text "address[11..0]" (rect 0 0 82 14)(font "Arial" (font_size 8)))
(text "address[11..0]" (rect 20 66 102 80)(font "Arial" (font_size 8)))
(line (pt 0 72)(pt 16 72)(line_width 3))
)
(port
(pt 160 32)
(output)
(text "q[7..0]" (rect 0 0 35 14)(font "Arial" (font_size 8)))
(text "q[7..0]" (rect 111 26 146 40)(font "Arial" (font_size 8)))
(line (pt 160 32)(pt 144 32)(line_width 3))
)
(drawing
(line (pt 16 16)(pt 144 16)(line_width 1))
(line (pt 144 16)(pt 144 104)(line_width 1))
(line (pt 144 104)(pt 16 104)(line_width 1))
(line (pt 16 104)(pt 16 16)(line_width 1))
(line (pt 16 82)(pt 22 88)(line_width 1))
(line (pt 22 88)(pt 16 94)(line_width 1))
)
)
(connector
(pt 368 200)
(pt 544 200)
(bus)
)
(connector
(pt 368 216)
(pt 544 216)
(bus)
)
(connector
(pt 368 232)
(pt 544 232)
(bus)
)
(connector
(pt 368 248)
(pt 544 248)
(bus)
)
(connector
(pt 368 264)
(pt 544 264)
(bus)
)
(connector
(pt 368 280)
(pt 544 280)
(bus)
)
(connector
(pt 368 296)
(pt 544 296)
)
(connector
(pt 80 136)
(pt 152 136)
)
(connector
(pt 368 136)
(pt 488 136)
)
(connector
(pt 488 136)
(pt 544 136)
)
(connector
(pt 368 168)
(pt 448 168)
(bus)
)
(connector
(pt 448 168)
(pt 544 168)
(bus)
)
(connector
(pt 152 168)
(pt 120 168)
(bus)
)
(connector
(pt 120 168)
(pt 120 528)
(bus)
)
(connector
(pt 120 528)
(pt 760 528)
(bus)
)
(connector
(pt 760 528)
(pt 760 416)
(bus)
)
(connector
(pt 96 152)
(pt 96 472)
)
(connector
(pt 96 472)
(pt 552 472)
)
(connector
(pt 80 152)
(pt 96 152)
)
(connector
(pt 96 152)
(pt 152 152)
)
(connector
(pt 712 416)
(pt 760 416)
(bus)
)
(connector
(pt 760 416)
(pt 824 416)
(bus)
)
(connector
(pt 520 152)
(pt 520 416)
(bus)
)
(connector
(pt 368 152)
(pt 520 152)
(bus)
)
(connector
(pt 520 152)
(pt 544 152)
(bus)
)
(connector
(pt 448 456)
(pt 552 456)
(bus)
)
(connector
(pt 448 168)
(pt 448 456)
(bus)
)
(connector
(pt 488 136)
(pt 488 440)
)
(connector
(pt 488 440)
(pt 552 440)
)
(connector
(pt 520 416)
(pt 552 416)
(bus)
)
(junction (pt 488 136))
(junction (pt 448 168))
(junction (pt 96 152))
(junction (pt 760 416))
(junction (pt 520 152))
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?