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
e78fc4c3
Commit
e78fc4c3
authored
Jan 15, 2017
by
Martin Pépin
Browse files
Fix reg_write flag
parent
2bc3d031
Changes
3
Hide whitespace changes
Inline
Side-by-side
cpu/src/control.mj
View file @
e78fc4c3
...
...
@@ -69,10 +69,7 @@ control(instruction:[6],
Faux pour les sauts (j, jr, jal), branchements (beq, bne) et
pour multiplication et division (mult, div) *)
reg_write = (not(instruction[0] or instruction[1] or instruction[2])
and ((instruction[3] and not(instruction[4])) (* beq, bne *)
or (not(instruction[3]) and instruction[4])) (* j, jal *)
) or (not(funct[0]) and funct[2]); (* jr, mult, div *)
reg_write = not(jump or branch or (funct[2] and not funct[0]));
(* write_pc à 1 => entrée du banc de registre issue de PC
Uniquement utilisé pour l'instruction jal *)
...
...
test/cpu/alu.in
View file @
e78fc4c3
...
...
@@ -19,9 +19,6 @@
00000000000000000001000110011100
00000000000000001001011000001010
0111
00000000000000000001000110011100
00000000000000000000000000000011
1100
00000000000000000001000110011100
00000000000000000000000000000011
1000
00000000000000000000000000000000
11111111111111111111111111111111
1111
test/cpu/alu.out
View file @
e78fc4c3
...
...
@@ -12,7 +12,5 @@
11111111111111110110100001100001
0
00000000000000001000011110010110
0
00000000000000000000001000110011
0
00000000000000001000110011100000
1
00000000000000000000000000000000
Write
Preview
Supports
Markdown
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