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
ac822879
Commit
ac822879
authored
Jan 17, 2017
by
Daru13
Browse files
Fixed a few things about optimization
parent
1d615620
Changes
1
Hide whitespace changes
Inline
Side-by-side
cpu/src/alu/utils.mj
View file @
ac822879
...
...
@@ -2,10 +2,11 @@ require utils
(* Égalité *)
(* Inutilisée par l'ALU
equal_ALU(a:[32], b:[32]) = (o) where
o = equal_n<32>(a, b)
end where
*)
(* ------------------------------------------------------------------------- *)
(* Extension de nappes *)
...
...
@@ -61,7 +62,6 @@ end where
(* ------------------------------------------------------------------------- *)
(* Opérations booléennes *)
(*
or_n<n>(a:[n], b:[n]) = (o:[n]) where
if n = 0 then
o = []
...
...
@@ -69,7 +69,6 @@ or_n<n>(a:[n], b:[n]) = (o:[n]) where
o = (a[0] or b[0]).(or_n<n-1>(a[1..], b[1..]))
end if
end where
*)
or_ALU(a:[32], b:[32]) = (o:[32]) where
o = or_n<32>(a, b)
...
...
@@ -180,6 +179,7 @@ end where
(* ------------------------------------------------------------------------- *)
(* Comparaisons*)
(* Inutilisée par l'ALU
(*TODO : changer le calcul pour utiliser la soustraction ?*)
slt_n<n>(a:[n], b:[n]) = (out, fin) where
if n = 1 then
...
...
@@ -196,6 +196,7 @@ slt_ALU(a:[32], b:[32]) = (o) where
(res, fin) = slt_n<31>(a[1..], b[1..]);
o = mux(a[0]^b[0], a[0], res & fin)
end where
*)
(* Inutilisée par l'ALU
slti_ALU(a:[32], c:[16]) = (o) 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