2022-04-07 18:43:21 +02:00

1412 lines
33 KiB
Plaintext
Executable File

/*
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-2007 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 from 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 -168 56 -152)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "reset_n" (rect 9 0 45 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 -144 144 24 160)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "rddata[31..0]" (rect 9 0 71 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 -112 -184 56 -168)
(text "INPUT" (rect 133 0 161 10)(font "Arial" (font_size 6)))
(text "clk" (rect 9 0 23 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 1232 360 1408 376)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "wrdata[31..0]" (rect 90 0 153 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 1240 0 1416 16)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "address[15..0]" (rect 90 0 160 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 1240 -88 1416 -72)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "write" (rect 90 0 112 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 1240 -104 1416 -88)
(text "OUTPUT" (rect 1 0 39 10)(font "Arial" (font_size 6)))
(text "read" (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 904 120 992 232)
(text "ALU" (rect 5 0 29 14)(font "Arial" (font_size 8)))
(text "alu_0" (rect 8 96 33 108)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "a[31..0]" (rect 0 0 42 14)(font "Arial" (font_size 8)))
(text "A" (rect 8 16 17 30)(font "Arial" (font_size 8)))
(line (pt 0 32)(pt 24 32)(line_width 3))
)
(port
(pt 0 80)
(input)
(text "b[31..0]" (rect 0 0 42 14)(font "Arial" (font_size 8)))
(text "B" (rect 8 64 16 78)(font "Arial" (font_size 8)))
(line (pt 0 80)(pt 24 80)(line_width 3))
)
(port
(pt 48 0)
(input)
(text "op[5..0]" (rect 0 0 42 14)(font "Arial" (font_size 8)))
(text "OP" (rect 56 8 70 24)(font "Arial" (font_size 8))(vertical))
(line (pt 48 0)(pt 48 32)(line_width 3))
)
(port
(pt 88 56)
(output)
(text "s[31..0]" (rect -48 0 -6 14)(font "Arial" (font_size 8)))
(text "S" (rect 72 40 80 54)(font "Arial" (font_size 8)))
(line (pt 88 56)(pt 64 56)(line_width 3))
)
(drawing
(line (pt 24 48)(pt 40 56)(line_width 1))
(line (pt 40 56)(pt 24 64)(line_width 1))
(line (pt 24 64)(pt 24 96)(line_width 1))
(line (pt 24 48)(pt 24 16)(line_width 1))
(line (pt 64 72)(pt 64 40)(line_width 1))
(line (pt 64 40)(pt 24 16)(line_width 1))
(line (pt 64 72)(pt 24 96)(line_width 1))
)
)
(symbol
(rect 600 120 752 264)
(text "register_file" (rect 5 0 62 12)(font "Arial" ))
(text "register_file_0" (rect 8 128 77 140)(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 "aa[4..0]" (rect 0 0 37 12)(font "Arial" ))
(text "aa[4..0]" (rect 21 43 58 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 3))
)
(port
(pt 0 64)
(input)
(text "ab[4..0]" (rect 0 0 37 12)(font "Arial" ))
(text "ab[4..0]" (rect 21 59 58 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(line_width 3))
)
(port
(pt 0 80)
(input)
(text "aw[4..0]" (rect 0 0 38 12)(font "Arial" ))
(text "aw[4..0]" (rect 21 75 59 87)(font "Arial" ))
(line (pt 0 80)(pt 16 80)(line_width 3))
)
(port
(pt 0 96)
(input)
(text "wren" (rect 0 0 22 12)(font "Arial" ))
(text "wren" (rect 21 91 43 103)(font "Arial" ))
(line (pt 0 96)(pt 16 96)(line_width 1))
)
(port
(pt 0 112)
(input)
(text "wrdata[31..0]" (rect 0 0 63 12)(font "Arial" ))
(text "wrdata[31..0]" (rect 21 107 84 119)(font "Arial" ))
(line (pt 0 112)(pt 16 112)(line_width 3))
)
(port
(pt 152 32)
(output)
(text "a[31..0]" (rect 0 0 37 12)(font "Arial" ))
(text "a[31..0]" (rect 94 27 131 39)(font "Arial" ))
(line (pt 152 32)(pt 136 32)(line_width 3))
)
(port
(pt 152 96)
(output)
(text "b[31..0]" (rect 0 0 37 12)(font "Arial" ))
(text "b[31..0]" (rect 94 91 131 103)(font "Arial" ))
(line (pt 152 96)(pt 136 96)(line_width 3))
)
(drawing
(rectangle (rect 16 16 136 128)(line_width 1))
)
)
(symbol
(rect 24 88 136 184)
(text "IR" (rect 5 0 16 12)(font "Arial" ))
(text "IR_0" (rect 8 80 31 92)(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 "enable" (rect 0 0 31 12)(font "Arial" ))
(text "enable" (rect 21 43 52 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 0 64)
(input)
(text "D[31..0]" (rect 0 0 40 12)(font "Arial" ))
(text "D[31..0]" (rect 21 59 61 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(line_width 3))
)
(port
(pt 112 32)
(output)
(text "Q[31..0]" (rect -24 0 16 12)(font "Arial" ))
(text "Q[31..0]" (rect 51 27 91 39)(font "Arial" ))
(line (pt 112 32)(pt 96 32)(line_width 3))
)
(drawing
(rectangle (rect 16 16 96 80)(line_width 1))
)
)
(symbol
(rect 808 -184 968 -8)
(text "PC" (rect 5 0 20 12)(font "Arial" ))
(text "PC_0" (rect 8 160 35 172)(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 "reset_n" (rect 0 0 36 12)(font "Arial" ))
(text "reset_n" (rect 21 43 57 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 0 64)
(input)
(text "en" (rect 0 0 11 12)(font "Arial" ))
(text "en" (rect 21 59 32 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(line_width 1))
)
(port
(pt 0 80)
(input)
(text "sel_a" (rect 0 0 25 12)(font "Arial" ))
(text "sel_a" (rect 21 75 46 87)(font "Arial" ))
(line (pt 0 80)(pt 16 80)(line_width 1))
)
(port
(pt 0 96)
(input)
(text "sel_imm" (rect 0 0 41 12)(font "Arial" ))
(text "sel_imm" (rect 21 91 62 103)(font "Arial" ))
(line (pt 0 96)(pt 16 96)(line_width 1))
)
(port
(pt 0 112)
(input)
(text "add_imm" (rect 0 0 44 12)(font "Arial" ))
(text "add_imm" (rect 21 107 65 119)(font "Arial" ))
(line (pt 0 112)(pt 16 112)(line_width 1))
)
(port
(pt 0 128)
(input)
(text "imm[15..0]" (rect 0 0 53 12)(font "Arial" ))
(text "imm[15..0]" (rect 21 123 74 135)(font "Arial" ))
(line (pt 0 128)(pt 16 128)(line_width 3))
)
(port
(pt 0 144)
(input)
(text "a[15..0]" (rect 0 0 37 12)(font "Arial" ))
(text "a[15..0]" (rect 21 139 58 151)(font "Arial" ))
(line (pt 0 144)(pt 16 144)(line_width 3))
)
(port
(pt 160 88)
(output)
(text "addr[31..0]" (rect 0 0 53 12)(font "Arial" ))
(text "addr[31..0]" (rect 86 83 139 95)(font "Arial" ))
(line (pt 160 88)(pt 144 88)(line_width 3))
)
(drawing
(rectangle (rect 16 16 144 160)(line_width 1))
)
)
(symbol
(rect 824 152 880 248)
(text "mux2x32" (rect 0 0 44 12)(font "Arial" ))
(text "mux_b" (rect 0 80 33 92)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "i0[31..0]" (rect 0 0 40 12)(font "Arial" ))
(text "0" (rect 24 32 29 44)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 64)
(input)
(text "i1[31..0]" (rect 0 0 40 12)(font "Arial" ))
(text "1" (rect 24 56 29 68)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(color 0 128 255)(line_width 3))
)
(port
(pt 32 96)
(input)
(text "sel" (rect 0 0 14 12)(font "Arial" ))
(text "sel" (rect 40 72 52 86)(font "Arial" )(vertical))
(line (pt 32 72)(pt 32 96)(color 0 128 255)(line_width 1))
)
(port
(pt 56 48)
(output)
(text "o[31..0]" (rect -120 0 -83 12)(font "Arial" ))
(text "O" (rect 48 32 56 44)(font "Arial" )(invisible))
(line (pt 56 48)(pt 40 48)(line_width 3))
)
(drawing
(line (pt 16 16)(pt 40 32)(line_width 1))
(line (pt 16 80)(pt 40 64)(line_width 1))
(line (pt 16 16)(pt 16 80)(line_width 1))
(line (pt 40 32)(pt 40 64)(line_width 1))
)
)
(symbol
(rect 1136 144 1192 240)
(text "mux2x32" (rect 0 0 44 12)(font "Arial" ))
(text "mux_data" (rect 0 80 48 92)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "i0[31..0]" (rect 0 0 40 12)(font "Arial" ))
(text "0" (rect 24 32 29 44)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 64)
(input)
(text "i1[31..0]" (rect 0 0 40 12)(font "Arial" ))
(text "1" (rect 24 56 29 68)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(color 0 128 255)(line_width 3))
)
(port
(pt 32 96)
(input)
(text "sel" (rect 0 0 14 12)(font "Arial" ))
(text "sel" (rect 40 72 52 86)(font "Arial" )(vertical))
(line (pt 32 72)(pt 32 96)(color 0 128 255)(line_width 1))
)
(port
(pt 56 48)
(output)
(text "o[31..0]" (rect -120 0 -83 12)(font "Arial" ))
(text "O" (rect 48 32 56 44)(font "Arial" )(invisible))
(line (pt 56 48)(pt 40 48)(line_width 3))
)
(drawing
(line (pt 16 16)(pt 40 32)(line_width 1))
(line (pt 16 80)(pt 40 64)(line_width 1))
(line (pt 16 16)(pt 16 80)(line_width 1))
(line (pt 40 32)(pt 40 64)(line_width 1))
)
)
(symbol
(rect 440 152 496 248)
(text "mux2x5" (rect 0 0 38 12)(font "Arial" ))
(text "mux_aw" (rect 0 80 40 92)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "i0[4..0]" (rect 0 0 34 12)(font "Arial" ))
(text "0" (rect 24 32 29 44)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 64)
(input)
(text "i1[4..0]" (rect 0 0 34 12)(font "Arial" ))
(text "1" (rect 24 56 29 68)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(color 0 128 255)(line_width 3))
)
(port
(pt 32 96)
(input)
(text "sel" (rect 0 0 14 12)(font "Arial" ))
(text "sel" (rect 40 72 52 86)(font "Arial" )(vertical))
(line (pt 32 72)(pt 32 96)(color 0 128 255)(line_width 1))
)
(port
(pt 56 48)
(output)
(text "o[4..0]" (rect -120 0 -89 12)(font "Arial" ))
(text "O" (rect 48 32 56 44)(font "Arial" )(invisible))
(line (pt 56 48)(pt 40 48)(line_width 3))
)
(drawing
(line (pt 16 16)(pt 40 32)(line_width 1))
(line (pt 16 80)(pt 40 64)(line_width 1))
(line (pt 16 16)(pt 16 80)(line_width 1))
(line (pt 40 32)(pt 40 64)(line_width 1))
)
)
(symbol
(rect 1088 -40 1144 56)
(text "mux2x16" (rect 0 0 44 12)(font "Arial" ))
(text "mux_addr" (rect 0 80 48 92)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "i0[15..0]" (rect 0 0 40 12)(font "Arial" ))
(text "0" (rect 24 32 29 44)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 64)
(input)
(text "i1[15..0]" (rect 0 0 40 12)(font "Arial" ))
(text "1" (rect 24 56 29 68)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(color 0 128 255)(line_width 3))
)
(port
(pt 32 96)
(input)
(text "sel" (rect 0 0 14 12)(font "Arial" ))
(text "sel" (rect 40 72 52 86)(font "Arial" )(vertical))
(line (pt 32 72)(pt 32 96)(color 0 128 255)(line_width 1))
)
(port
(pt 56 48)
(output)
(text "o[15..0]" (rect -120 0 -83 12)(font "Arial" ))
(text "O" (rect 48 32 56 44)(font "Arial" )(invisible))
(line (pt 56 48)(pt 40 48)(line_width 3))
)
(drawing
(line (pt 16 16)(pt 40 32)(line_width 1))
(line (pt 16 80)(pt 40 64)(line_width 1))
(line (pt 16 16)(pt 16 80)(line_width 1))
(line (pt 40 32)(pt 40 64)(line_width 1))
)
)
(symbol
(rect 256 184 288 200)
(text "VCC" (rect 7 0 27 10)(font "Arial" (font_size 6)))
(text "inst" (rect 3 5 20 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 328 136 384 232)
(text "mux2x5" (rect 0 0 38 12)(font "Arial" ))
(text "mux_ra" (rect 0 80 36 92)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "i0[4..0]" (rect 0 0 34 12)(font "Arial" ))
(text "0" (rect 24 32 29 44)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 64)
(input)
(text "i1[4..0]" (rect 0 0 34 12)(font "Arial" ))
(text "1" (rect 24 56 29 68)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(color 0 128 255)(line_width 3))
)
(port
(pt 32 96)
(input)
(text "sel" (rect 0 0 14 12)(font "Arial" ))
(text "sel" (rect 40 72 52 86)(font "Arial" )(vertical))
(line (pt 32 72)(pt 32 96)(color 0 128 255)(line_width 1))
)
(port
(pt 56 48)
(output)
(text "o[4..0]" (rect -120 0 -89 12)(font "Arial" ))
(text "O" (rect 48 32 56 44)(font "Arial" )(invisible))
(line (pt 56 48)(pt 40 48)(line_width 3))
)
(drawing
(line (pt 16 16)(pt 40 32)(line_width 1))
(line (pt 16 80)(pt 40 64)(line_width 1))
(line (pt 16 16)(pt 16 80)(line_width 1))
(line (pt 40 32)(pt 40 64)(line_width 1))
)
)
(symbol
(rect 1040 192 1096 288)
(text "mux2x32" (rect 0 0 44 12)(font "Arial" ))
(text "mux_mem" (rect 0 80 51 92)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "i0[31..0]" (rect 0 0 40 12)(font "Arial" ))
(text "0" (rect 24 32 29 44)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 64)
(input)
(text "i1[31..0]" (rect 0 0 40 12)(font "Arial" ))
(text "1" (rect 24 56 29 68)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(color 0 128 255)(line_width 3))
)
(port
(pt 32 96)
(input)
(text "sel" (rect 0 0 14 12)(font "Arial" ))
(text "sel" (rect 40 72 52 86)(font "Arial" )(vertical))
(line (pt 32 72)(pt 32 96)(color 0 128 255)(line_width 1))
)
(port
(pt 56 48)
(output)
(text "o[31..0]" (rect -120 0 -83 12)(font "Arial" ))
(text "O" (rect 48 32 56 44)(font "Arial" )(invisible))
(line (pt 56 48)(pt 40 48)(line_width 3))
)
(drawing
(line (pt 16 16)(pt 40 32)(line_width 1))
(line (pt 16 80)(pt 40 64)(line_width 1))
(line (pt 16 16)(pt 16 80)(line_width 1))
(line (pt 40 32)(pt 40 64)(line_width 1))
)
)
(symbol
(rect 520 -192 584 -144)
(text "AND2" (rect 1 0 25 10)(font "Arial" (font_size 6)))
(text "branch_and" (rect 3 37 59 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 14 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 14 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 42 24)(pt 64 24)(line_width 1))
)
(drawing
(line (pt 14 12)(pt 30 12)(line_width 1))
(line (pt 14 37)(pt 31 37)(line_width 1))
(line (pt 14 12)(pt 14 37)(line_width 1))
(arc (pt 31 37)(pt 30 12)(rect 18 12 43 37)(line_width 1))
)
)
(symbol
(rect 600 -144 664 -96)
(text "OR2" (rect 1 0 19 10)(font "Arial" (font_size 6)))
(text "or_pc_en" (rect 3 37 47 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 48 24)(pt 64 24)(line_width 1))
)
(drawing
(line (pt 14 36)(pt 25 36)(line_width 1))
(line (pt 14 13)(pt 25 13)(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))
)
)
(symbol
(rect 1144 240 1192 304)
(text "OR2" (rect 0 45 10 63)(font "Arial" (font_size 6))(vertical))
(text "pc_or_mem" (rect 37 4 49 61)(font "Arial" )(vertical))
(port
(pt 32 64)
(input)
(text "IN2" (rect 2 23 19 35)(font "Courier New" (bold))(invisible))
(text "IN2" (rect 23 45 35 62)(font "Courier New" (bold))(vertical)(invisible))
(line (pt 32 64)(pt 32 49)(line_width 1))
)
(port
(pt 16 64)
(input)
(text "IN1" (rect 2 7 19 19)(font "Courier New" (bold))(invisible))
(text "IN1" (rect 7 45 19 62)(font "Courier New" (bold))(vertical)(invisible))
(line (pt 16 64)(pt 16 49)(line_width 1))
)
(port
(pt 24 0)
(output)
(text "OUT" (rect 48 15 65 27)(font "Courier New" (bold))(invisible))
(text "OUT" (rect 15 -1 27 16)(font "Courier New" (bold))(vertical)(invisible))
(line (pt 24 16)(pt 24 0)(line_width 1))
)
(drawing
(line (pt 36 50)(pt 36 39)(line_width 1))
(line (pt 13 50)(pt 13 39)(line_width 1))
(arc (pt 29 57)(pt 19 57)(rect 8 45 41 78)(line_width 1))
(arc (pt 24 15)(pt 13 39)(rect 13 7 76 70)(line_width 1))
(arc (pt 35 39)(pt 24 15)(rect -27 7 36 70)(line_width 1))
)
(rotate90)
)
(symbol
(rect 568 24 752 104)
(text "extend" (rect 5 0 38 12)(font "Arial" ))
(text "extend_0" (rect 8 64 52 76)(font "Arial" ))
(port
(pt 0 32)
(input)
(text "imm16[15..0]" (rect 0 0 64 12)(font "Arial" ))
(text "imm16[15..0]" (rect 21 27 85 39)(font "Arial" ))
(line (pt 0 32)(pt 16 32)(line_width 3))
)
(port
(pt 0 48)
(input)
(text "signed" (rect 0 0 31 12)(font "Arial" ))
(text "signed" (rect 21 43 52 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 184 32)
(output)
(text "imm32[31..0]" (rect 0 0 64 12)(font "Arial" ))
(text "imm32[31..0]" (rect 99 27 163 39)(font "Arial" ))
(line (pt 184 32)(pt 168 32)(line_width 3))
)
(drawing
(rectangle (rect 16 16 168 64)(line_width 1))
)
)
(symbol
(rect 240 -208 400 112)
(text "controller" (rect 5 0 49 12)(font "Arial" ))
(text "controller_0" (rect 8 304 64 316)(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 "reset_n" (rect 0 0 36 12)(font "Arial" ))
(text "reset_n" (rect 21 43 57 55)(font "Arial" ))
(line (pt 0 48)(pt 16 48)(line_width 1))
)
(port
(pt 0 64)
(input)
(text "op[5..0]" (rect 0 0 37 12)(font "Arial" ))
(text "op[5..0]" (rect 21 59 58 71)(font "Arial" ))
(line (pt 0 64)(pt 16 64)(line_width 3))
)
(port
(pt 0 80)
(input)
(text "opx[5..0]" (rect 0 0 43 12)(font "Arial" ))
(text "opx[5..0]" (rect 21 75 64 87)(font "Arial" ))
(line (pt 0 80)(pt 16 80)(line_width 3))
)
(port
(pt 160 32)
(output)
(text "branch_op" (rect 0 0 50 12)(font "Arial" ))
(text "branch_op" (rect 89 27 139 39)(font "Arial" ))
(line (pt 160 32)(pt 144 32)(line_width 1))
)
(port
(pt 160 48)
(output)
(text "imm_signed" (rect 0 0 59 12)(font "Arial" ))
(text "imm_signed" (rect 80 43 139 55)(font "Arial" ))
(line (pt 160 48)(pt 144 48)(line_width 1))
)
(port
(pt 160 64)
(output)
(text "ir_en" (rect 0 0 23 12)(font "Arial" ))
(text "ir_en" (rect 116 59 139 71)(font "Arial" ))
(line (pt 160 64)(pt 144 64)(line_width 1))
)
(port
(pt 160 80)
(output)
(text "pc_add_imm" (rect 0 0 62 12)(font "Arial" ))
(text "pc_add_imm" (rect 77 75 139 87)(font "Arial" ))
(line (pt 160 80)(pt 144 80)(line_width 1))
)
(port
(pt 160 96)
(output)
(text "pc_en" (rect 0 0 29 12)(font "Arial" ))
(text "pc_en" (rect 110 91 139 103)(font "Arial" ))
(line (pt 160 96)(pt 144 96)(line_width 1))
)
(port
(pt 160 112)
(output)
(text "pc_sel_a" (rect 0 0 43 12)(font "Arial" ))
(text "pc_sel_a" (rect 96 107 139 119)(font "Arial" ))
(line (pt 160 112)(pt 144 112)(line_width 1))
)
(port
(pt 160 128)
(output)
(text "pc_sel_imm" (rect 0 0 59 12)(font "Arial" ))
(text "pc_sel_imm" (rect 80 123 139 135)(font "Arial" ))
(line (pt 160 128)(pt 144 128)(line_width 1))
)
(port
(pt 160 144)
(output)
(text "rf_wren" (rect 0 0 36 12)(font "Arial" ))
(text "rf_wren" (rect 103 139 139 151)(font "Arial" ))
(line (pt 160 144)(pt 144 144)(line_width 1))
)
(port
(pt 160 160)
(output)
(text "sel_addr" (rect 0 0 41 12)(font "Arial" ))
(text "sel_addr" (rect 98 155 139 167)(font "Arial" ))
(line (pt 160 160)(pt 144 160)(line_width 1))
)
(port
(pt 160 176)
(output)
(text "sel_b" (rect 0 0 25 12)(font "Arial" ))
(text "sel_b" (rect 114 171 139 183)(font "Arial" ))
(line (pt 160 176)(pt 144 176)(line_width 1))
)
(port
(pt 160 192)
(output)
(text "sel_mem" (rect 0 0 44 12)(font "Arial" ))
(text "sel_mem" (rect 95 187 139 199)(font "Arial" ))
(line (pt 160 192)(pt 144 192)(line_width 1))
)
(port
(pt 160 208)
(output)
(text "sel_pc" (rect 0 0 31 12)(font "Arial" ))
(text "sel_pc" (rect 108 203 139 215)(font "Arial" ))
(line (pt 160 208)(pt 144 208)(line_width 1))
)
(port
(pt 160 224)
(output)
(text "sel_ra" (rect 0 0 29 12)(font "Arial" ))
(text "sel_ra" (rect 110 219 139 231)(font "Arial" ))
(line (pt 160 224)(pt 144 224)(line_width 1))
)
(port
(pt 160 240)
(output)
(text "sel_rC" (rect 0 0 31 12)(font "Arial" ))
(text "sel_rC" (rect 108 235 139 247)(font "Arial" ))
(line (pt 160 240)(pt 144 240)(line_width 1))
)
(port
(pt 160 272)
(output)
(text "write" (rect 0 0 22 12)(font "Arial" ))
(text "write" (rect 117 267 139 279)(font "Arial" ))
(line (pt 160 272)(pt 144 272)(line_width 1))
)
(port
(pt 160 288)
(output)
(text "op_alu[5..0]" (rect 0 0 57 12)(font "Arial" ))
(text "op_alu[5..0]" (rect 82 283 139 295)(font "Arial" ))
(line (pt 160 288)(pt 144 288)(line_width 3))
)
(port
(pt 160 256)
(output)
(text "read" (rect 110 248 135 262)(font "Arial" (font_size 8)))
(text "read" (rect 118 248 139 260)(font "Arial" ))
(line (pt 160 256)(pt 144 256)(line_width 1))
)
(drawing
(rectangle (rect 16 16 144 304)(line_width 1))
)
)
(connector
(text "op_b[31..0]" (rect 881 184 936 196)(font "Arial" ))
(pt 880 200)
(pt 904 200)
(bus)
)
(connector
(text "clk" (rect 576 136 590 148)(font "Arial" ))
(pt 544 152)
(pt 600 152)
)
(connector
(text "rf_wren" (rect 560 200 596 212)(font "Arial" ))
(pt 544 216)
(pt 600 216)
)
(connector
(text "op_alu[5..0]" (rect 936 55 948 112)(font "Arial" )(vertical))
(pt 952 56)
(pt 952 120)
(bus)
)
(connector
(pt 600 232)
(pt 584 232)
(bus)
)
(connector
(pt 584 232)
(pt 584 352)
(bus)
)
(connector
(text "rddata[31..0]" (rect 984 240 1046 252)(font "Arial" ))
(pt 1040 256)
(pt 976 256)
(bus)
)
(connector
(pt 1008 224)
(pt 1040 224)
(bus)
)
(connector
(pt 1096 240)
(pt 1112 240)
(bus)
)
(connector
(pt 1112 208)
(pt 1136 208)
(bus)
)
(connector
(pt 1112 240)
(pt 1112 208)
(bus)
)
(connector
(pt 584 352)
(pt 1208 352)
(bus)
)
(connector
(pt 1192 192)
(pt 1208 192)
(bus)
)
(connector
(text "aw[4..0]" (rect 504 184 542 196)(font "Arial" ))
(pt 600 200)
(pt 496 200)
(bus)
)
(connector
(text "instr[21..17]" (rect 392 216 451 228)(font "Arial" ))
(pt 400 216)
(pt 440 216)
(bus)
)
(connector
(pt 384 184)
(pt 440 184)
(bus)
)
(connector
(text "ra[4..0]" (rect 294 184 329 196)(font "Arial" ))
(pt 272 200)
(pt 328 200)
(bus)
)
(connector
(pt 1208 192)
(pt 1208 352)
(bus)
)
(connector
(pt 1160 304)
(pt 1160 312)
)
(connector
(pt 1160 312)
(pt 1072 312)
)
(connector
(text "sel_mem" (rect 1055 287 1067 331)(font "Arial" )(vertical))
(pt 1072 288)
(pt 1072 312)
)
(connector
(pt 1072 312)
(pt 1072 328)
)
(connector
(text "sel_b" (rect 840 250 852 275)(font "Arial" )(vertical))
(pt 856 280)
(pt 856 248)
)
(connector
(text "sel_pc" (rect 1160 309 1172 340)(font "Arial" )(vertical))
(pt 1176 336)
(pt 1176 304)
)
(connector
(text "sel_rC" (rect 455 255 467 286)(font "Arial" )(vertical))
(pt 472 248)
(pt 472 312)
)
(connector
(text "sel_ra" (rect 344 231 356 260)(font "Arial" )(vertical))
(pt 360 232)
(pt 360 280)
)
(connector
(text "instr[26..22]" (rect 272 152 331 164)(font "Arial" ))
(pt 216 168)
(pt 328 168)
(bus)
)
(connector
(text "instr[21..6]" (rect 512 40 565 52)(font "Arial" ))
(pt 504 56)
(pt 568 56)
(bus)
)
(connector
(pt 216 120)
(pt 216 168)
(bus)
)
(connector
(pt 400 216)
(pt 400 120)
(bus)
)
(connector
(pt 216 120)
(pt 400 120)
(bus)
)
(connector
(pt 400 120)
(pt 504 120)
(bus)
)
(connector
(text "imm_signed" (rect 512 56 571 68)(font "Arial" ))
(pt 528 72)
(pt 568 72)
)
(connector
(text "instr[26..22]" (rect 544 168 603 180)(font "Arial" ))
(pt 504 184)
(pt 600 184)
(bus)
)
(connector
(text "instr[31..27]" (rect 544 152 603 164)(font "Arial" ))
(pt 504 168)
(pt 600 168)
(bus)
)
(connector
(pt 504 120)
(pt 504 168)
(bus)
)
(connector
(pt 504 168)
(pt 504 184)
(bus)
)
(connector
(text "alu_res[15..0]" (rect 1024 8 1091 20)(font "Arial" ))
(pt 1040 24)
(pt 1088 24)
(bus)
)
(connector
(pt 1040 176)
(pt 1040 24)
(bus)
)
(connector
(text "sel_addr" (rect 1102 56 1114 97)(font "Arial" )(vertical))
(pt 1120 56)
(pt 1120 96)
)
(connector
(pt 992 176)
(pt 1040 176)
(bus)
)
(connector
(text "alu_res[31..0]" (rect 1057 160 1124 172)(font "Arial" ))
(pt 1040 176)
(pt 1136 176)
(bus)
)
(connector
(text "pc_addr[15..0]" (rect 1022 -24 1092 -12)(font "Arial" ))
(pt 1008 -8)
(pt 1088 -8)
(bus)
)
(connector
(text "pc_addr[31..0]" (rect 976 -112 1046 -100)(font "Arial" ))
(pt 1008 -96)
(pt 968 -96)
(bus)
)
(connector
(pt 504 -56)
(pt 504 56)
(bus)
)
(connector
(pt 504 56)
(pt 504 120)
(bus)
)
(connector
(pt 1008 -96)
(pt 1008 -8)
(bus)
)
(connector
(pt 1008 -8)
(pt 1008 224)
(bus)
)
(connector
(text "clk" (rect 786 -168 800 -156)(font "Arial" ))
(pt 752 -152)
(pt 808 -152)
)
(connector
(text "reset_n" (rect 768 -152 804 -140)(font "Arial" ))
(pt 752 -136)
(pt 808 -136)
)
(connector
(text "pc_sel_a" (rect 768 -120 811 -108)(font "Arial" ))
(pt 752 -104)
(pt 808 -104)
)
(connector
(text "pc_sel_imm" (rect 752 -104 811 -92)(font "Arial" ))
(pt 752 -88)
(pt 808 -88)
)
(connector
(text "pc_add_imm" (rect 752 -88 814 -76)(font "Arial" ))
(pt 752 -72)
(pt 808 -72)
)
(connector
(text "instr[21..6]" (rect 760 -72 813 -60)(font "Arial" ))
(pt 504 -56)
(pt 808 -56)
(bus)
)
(connector
(pt 792 152)
(pt 792 -40)
(bus)
)
(connector
(text "a[15..0]" (rect 768 -56 805 -44)(font "Arial" ))
(pt 808 -40)
(pt 792 -40)
(bus)
)
(connector
(text "a[31..0]" (rect 756 136 793 148)(font "Arial" ))
(pt 752 152)
(pt 792 152)
(bus)
)
(connector
(pt 792 152)
(pt 904 152)
(bus)
)
(connector
(pt 824 184)
(pt 768 184)
(bus)
)
(connector
(pt 768 184)
(pt 768 56)
(bus)
)
(connector
(text "imm[31..0]" (rect 757 40 810 52)(font "Arial" ))
(pt 752 56)
(pt 768 56)
(bus)
)
(connector
(pt 1144 8)
(pt 1240 8)
(bus)
)
(connector
(pt 768 368)
(pt 1232 368)
(bus)
)
(connector
(pt 768 216)
(pt 768 368)
(bus)
)
(connector
(pt 752 216)
(pt 768 216)
(bus)
)
(connector
(text "b[31..0]" (rect 757 200 794 212)(font "Arial" ))
(pt 768 216)
(pt 824 216)
(bus)
)
(connector
(text "write" (rect 1200 -96 1222 -84)(font "Arial" ))
(pt 1240 -80)
(pt 1192 -80)
)
(connector
(text "branch_taken" (rect 588 -184 654 -172)(font "Arial" ))
(pt 584 -168)
(pt 592 -168)
)
(connector
(pt 592 -128)
(pt 600 -128)
)
(connector
(pt 592 -168)
(pt 592 -128)
)
(connector
(text "sel_mem" (rect 408 -32 452 -20)(font "Arial" ))
(pt 400 -16)
(pt 456 -16)
)
(connector
(text "ir_en" (rect 408 -160 431 -148)(font "Arial" ))
(pt 400 -144)
(pt 456 -144)
)
(connector
(text "rf_wren" (rect 408 -80 444 -68)(font "Arial" ))
(pt 400 -64)
(pt 456 -64)
)
(connector
(text "sel_addr" (rect 408 -64 449 -52)(font "Arial" ))
(pt 400 -48)
(pt 456 -48)
)
(connector
(text "sel_b" (rect 408 -48 433 -36)(font "Arial" ))
(pt 400 -32)
(pt 456 -32)
)
(connector
(text "pc_sel_a" (rect 408 -112 451 -100)(font "Arial" ))
(pt 400 -96)
(pt 456 -96)
)
(connector
(text "pc_sel_imm" (rect 408 -96 467 -84)(font "Arial" ))
(pt 400 -80)
(pt 456 -80)
)
(connector
(text "pc_add_imm" (rect 408 -144 470 -132)(font "Arial" ))
(pt 400 -128)
(pt 456 -128)
)
(connector
(text "sel_ra" (rect 408 0 437 12)(font "Arial" ))
(pt 400 16)
(pt 456 16)
)
(connector
(text "sel_rC" (rect 408 16 439 28)(font "Arial" ))
(pt 400 32)
(pt 456 32)
)
(connector
(text "sel_pc" (rect 408 -16 439 -4)(font "Arial" ))
(pt 456 0)
(pt 400 0)
)
(connector
(text "imm_signed" (rect 408 -176 467 -164)(font "Arial" ))
(pt 400 -160)
(pt 456 -160)
)
(connector
(text "pc_en" (rect 672 -136 701 -124)(font "Arial" ))
(pt 808 -120)
(pt 664 -120)
)
(connector
(pt 56 -176)
(pt 240 -176)
)
(connector
(pt 56 -160)
(pt 240 -160)
)
(connector
(text "branch_op" (rect 408 -192 458 -180)(font "Arial" ))
(pt 400 -176)
(pt 520 -176)
)
(connector
(text "alu_res[0]" (rect 474 -176 522 -164)(font "Arial" ))
(pt 488 -160)
(pt 520 -160)
)
(connector
(text "pc_wren" (rect 408 -128 448 -116)(font "Arial" ))
(pt 400 -112)
(pt 600 -112)
)
(connector
(pt 176 120)
(pt 176 -144)
(bus)
)
(connector
(pt 192 120)
(pt 192 -128)
(bus)
)
(connector
(text "instr[5..0]" (rect 192 -160 239 -148)(font "Arial" ))
(pt 240 -144)
(pt 176 -144)
(bus)
)
(connector
(text "instr[16..11]" (rect 192 -144 251 -132)(font "Arial" ))
(pt 240 -128)
(pt 192 -128)
(bus)
)
(connector
(pt 192 120)
(pt 216 120)
(bus)
)
(connector
(text "instr[31..0]" (rect 144 104 197 116)(font "Arial" ))
(pt 136 120)
(pt 176 120)
(bus)
)
(connector
(pt 176 120)
(pt 192 120)
(bus)
)
(connector
(text "clk" (rect 0 104 14 116)(font "Arial" ))
(pt -8 120)
(pt 24 120)
)
(connector
(text "ir_en" (rect 0 120 23 132)(font "Arial" ))
(pt -8 136)
(pt 24 136)
)
(connector
(text "read" (rect 1200 -112 1221 -100)(font "Arial" ))
(pt 1240 -96)
(pt 1192 -96)
)
(connector
(text "op_alu[5..0]" (rect 400 80 457 92)(font "Arial" ))
(pt 400 80)
(pt 456 80)
(bus)
)
(connector
(text "write" (rect 408 48 430 60)(font "Arial" ))
(pt 456 64)
(pt 400 64)
)
(connector
(text "read" (rect 408 32 429 44)(font "Arial" ))
(pt 456 48)
(pt 400 48)
)
(junction (pt 768 216))
(junction (pt 1040 176))
(junction (pt 1072 312))
(junction (pt 504 56))
(junction (pt 216 120))
(junction (pt 400 120))
(junction (pt 504 120))
(junction (pt 504 168))
(junction (pt 1008 -8))
(junction (pt 792 152))
(junction (pt 176 120))
(junction (pt 192 120))