diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-01-14 17:34:02 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-01-14 17:34:02 +0100 |
commit | 036b6ba1caae40b439670c031a162a6fde7461ec (patch) | |
tree | 3826129be2a8fd3d0d21a5483cdce157b9d5a909 /cpu | |
parent | 0eaeee0945dfd931ba83ffe0280f422dc09dd99b (diff) | |
download | SystDigit-Projet-036b6ba1caae40b439670c031a162a6fde7461ec.tar.gz SystDigit-Projet-036b6ba1caae40b439670c031a162a6fde7461ec.zip |
Changes...
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/alu.ml | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -18,7 +18,10 @@ let rec eq_c n v c = (* v is a value, c is a constant *) if n = 1 then if c = 1 then v else not v else - (eq_c 1 (v ** 0) (c mod 2)) ^& (eq_c (n-1) (v % (1, n-1)) (c/2)) + if c mod 2 = 1 then + mux (v ** 0) (const "0") (eq_c (n-1) (v % (1, n-1)) (c/2)) + else + mux (v ** 0) (eq_c (n-1) (v % (1, n-1)) (c/2)) (const "0") let rec all1 n x = if n = 1 then |