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:
3b7b9be
)
Add a duplication hardware model.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Thu, 29 Jan 2009 15:48:03 +0000
(16:48 +0100)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Thu, 29 Jan 2009 15:48:03 +0000
(16:48 +0100)
Adders.hs
patch
|
blob
|
history
diff --git
a/Adders.hs
b/Adders.hs
index ec486e60afdb2e1f276a87a4b2336cd326f4ad84..03f04101ff9c72612bea6e4ab5030bc8b9fc2eda 100644
(file)
--- a/
Adders.hs
+++ b/
Adders.hs
@@
-22,6
+22,10
@@
inv a = hwnot a
invinv :: Bit -> Bit
invinv a = hwnot (hwnot a)
+-- Not really an adder either, but a slightly more complex example
+dup :: Bit -> (Bit, Bit)
+dup a = (a, a)
+
-- Combinatoric stateless no-carry adder
-- A -> B -> S
no_carry_adder :: (Bit, Bit) -> Bit