projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the arguments of the alu function curried.
[matthijs/master-project/cλash.git]
/
Adders.hs
diff --git
a/Adders.hs
b/Adders.hs
index b09b98fdc4b43823fc13325f9887a7ea7f6cf260..10590fa7c765736ced0e4cf166160687c4ff2fd1 100644
(file)
--- a/
Adders.hs
+++ b/
Adders.hs
@@
-31,6
+31,13
@@
invinv a = hwnot (hwnot a)
dup :: Bit -> (Bit, Bit)
dup a = (a, a)
dup :: Bit -> (Bit, Bit)
dup a = (a, a)
+-- Not really an adder either, but a simple stateful example (D-flipflop)
+dff :: Bit -> Bit -> (Bit, Bit)
+dff d s = (s', q)
+ where
+ q = s
+ s' = d
+
-- Combinatoric stateless no-carry adder
-- A -> B -> S
no_carry_adder :: (Bit, Bit) -> Bit
-- Combinatoric stateless no-carry adder
-- A -> B -> S
no_carry_adder :: (Bit, Bit) -> Bit