diff options
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 |