diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-01-02 15:47:08 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-01-02 15:47:08 +0100 |
commit | 721c62c977635b6ca716d965c8b84837a3d7b215 (patch) | |
tree | 243c1a925fa3995b5b281c99c5fbd7839978b1c3 /cpu/cpu.ml | |
parent | 6268a3d0f92df7be461da6f8474fa7a62e628fe3 (diff) | |
download | SystDigit-Projet-721c62c977635b6ca716d965c8b84837a3d7b215.tar.gz SystDigit-Projet-721c62c977635b6ca716d965c8b84837a3d7b215.zip |
Memorizing CPU : summs all the entries
Diffstat (limited to 'cpu/cpu.ml')
-rw-r--r-- | cpu/cpu.ml | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2,7 +2,14 @@ open Netlist_gen (* Dumb CPU that just does an 8-bit addition *) +let sumz n i = + let rec res = + let aux = reg n in + fun () -> fst (Alu.nadder n i (aux res) (value "0")) () + in + res + let p = -main_2_2 (fun a b -> Alu.nadder 8 a b (value "0")) 8 8 + main_1_1 (sumz 8) 8 let () = Netlist_proc.print stdout p |