projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0082f01
)
Add stateful alu (with empty state).
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Thu, 19 Feb 2009 10:24:01 +0000
(11:24 +0100)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Thu, 19 Feb 2009 10:24:01 +0000
(11:24 +0100)
Alu.hs
patch
|
blob
|
history
diff --git
a/Alu.hs
b/Alu.hs
index 78c5afcfe5504c8747aeb314d45511b4a79a8cc2..f26bb831b45f85526d7b9b3f23ad9e70445bc0fd 100644
(file)
--- a/
Alu.hs
+++ b/
Alu.hs
@@
-51,6
+51,10
@@
alu :: AluOp -> Bit -> Bit -> Bit
alu High a b = a `hwand` b
alu Low a b = a `hwor` b
+salu :: AluOp -> Bit -> Bit -> () -> ((), Bit)
+salu High a b s = (s, a `hwand` b)
+salu Low a b s = (s, a `hwor` b)
+
type ExecState = (RegisterBankState, Bit, Bit)
exec :: (RegAddr, Bit, AluOp) -> ExecState -> (ExecState, ())