summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-08 22:43:54 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-08 22:43:54 +0100
commitbd04128b033c8a623cceca31de072053837ad888 (patch)
treee8bcc0c4d1057e160d097439899b7736f683beb6 /tests
parent7a651609a8f40e8040cffa92f9965df02b0f52cd (diff)
downloadSystDigit-Projet-bd04128b033c8a623cceca31de072053837ad888.tar.gz
SystDigit-Projet-bd04128b033c8a623cceca31de072053837ad888.zip
More optimizations.
Diffstat (limited to 'tests')
-rw-r--r--tests/nadder.mj6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/nadder.mj b/tests/nadder.mj
index c8b0fbe..91caa6d 100644
--- a/tests/nadder.mj
+++ b/tests/nadder.mj
@@ -1,3 +1,5 @@
+const word_size = 8
+
fulladder(a,b,c) = (s, r) where
s = (a ^ b) ^ c;
r = (a & b) + ((a ^ b) & c);
@@ -14,6 +16,6 @@ adder<n>(a:[n], b:[n], c_in) = (o:[n], c_out) where
end if
end where
-main(a:[8], b:[8]) = (o:[8], c) where
- (o, c) = adder<8>(a,b,0)
+main(a:[word_size], b:[word_size]) = (o:[word_size], c) where
+ (o, c) = adder<word_size>(a,b,0)
end where