Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Pepin
sysdig
Commits
9c7640bc
Commit
9c7640bc
authored
Jan 14, 2017
by
Noémie Fong
Browse files
Simplify some branches of mux tree
parent
77d01ef8
Changes
1
Hide whitespace changes
Inline
Side-by-side
cpu/src/alu/main.mj
View file @
9c7640bc
...
...
@@ -19,16 +19,9 @@ ALU(input1:[32], input2:[32], alu_control:[4], alu_op:[3], use_shamt,
), (*TODO*)
mux(alu_control[1], (* Case logical shift *) (*TODO : optimiser use_shamt ?*)
mux(alu_control[3], (* If 1 then arith shift right, else shift right*)
mux(use_shamt,
shift_by_shamt_ALU(input1, shamt, 1, 1),
shift:_by_reg_ALU(input1, input2, 1, 1)
),
mux(use_shamt,
shift_by_shamt_ALU(input1, shamt, 1, 0),
shift_by_reg_ALU(input1, input2, 1, 0)
)
mux(use_shamt,
shift_by_shamt_ALU(input1, shamt, 1, alu_control[3]),
shift:_by_reg_ALU(input1, input2, 1, alu_control[3])
),
mux(use_shamt, (* Case logical shift left *)
...
...
@@ -38,7 +31,7 @@ ALU(input1:[32], input2:[32], alu_control:[4], alu_op:[3], use_shamt,
)
),
mux(alu_control[1], (*if 1 then logical else a
i
rhtmetical *)
mux(alu_control[1], (*if 1 then logical else ar
i
htmetical *)
mux(alu_control[2],
mux(alu_control[3],
xor_ALU(input1, input2),
...
...
@@ -58,16 +51,13 @@ ALU(input1:[32], input2:[32], alu_control:[4], alu_op:[3], use_shamt,
zero_n<32>()
),
mux(alu_control[3],
add_ALU(input1, input2, 1),
add_ALU(input1, input2, 0)
)
add_ALU(input1, input2, alu_control[3]),
)
)
)
),
),
(*TODO : opérations pas format R *)
zero_n<32>()
);
);
alu_zero = equal_zero_n<32>(result);
end where
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment