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
8d276101
Commit
8d276101
authored
Jan 14, 2017
by
Martin Pépin
Browse files
Fix main, fix typo
parent
d93a7b80
Changes
2
Hide whitespace changes
Inline
Side-by-side
cpu/src/alu/main.mj
View file @
8d276101
...
...
@@ -21,7 +21,7 @@ ALU(input1:[32], input2:[32], alu_control:[4], alu_op:[3], use_shamt,
mux(alu_control[1], (* Case logical shift *) (*TODO : optimiser use_shamt ?*)
mux(use_shamt,
shift_by_shamt_ALU(input1, shamt, 1, alu_control[3]),
shift
:
_by_reg_ALU(input1, input2, 1, alu_control[3])
shift_by_reg_ALU(input1, input2, 1, alu_control[3])
),
mux(use_shamt, (* Case logical shift left *)
...
...
cpu/src/main.mj
View file @
8d276101
...
...
@@ -31,8 +31,13 @@ main (b) = (instruction:[word], syscall, ctrl:[2]) where
(* Processing the calculi *)
imm = extand_const_n<16,16>(instruction[16..31]);
alu_input_2 = mux_n<word>(
use_shamt,
extand_left_n<5,word-5>(instruction[21..25]),
mux_n<word>(alu_src, imm, read_data2)
)
(alu_zero, alu_result) = ALU<word>(read_data1,
mux_n<word>(alu_src, imm, read_data2),
alu_input_2,
alu_ctrl);
(* Reading/writing RAM *)
...
...
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