summaryrefslogtreecommitdiff
path: root/cpu/netlist_gen.ml
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-07 15:07:22 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-07 15:07:22 +0100
commitd9f8744ea219fb04057059cdcbf7162534c63852 (patch)
tree9c1c2d0fa9011bd656d1eae7bbee6db954b3adfe /cpu/netlist_gen.ml
parentc8a30baeb18756f2cc246de6a575943fcf9b7ed4 (diff)
downloadSystDigit-Projet-d9f8744ea219fb04057059cdcbf7162534c63852.tar.gz
SystDigit-Projet-d9f8744ea219fb04057059cdcbf7162534c63852.zip
Document.
Diffstat (limited to 'cpu/netlist_gen.ml')
-rw-r--r--cpu/netlist_gen.ml9
1 files changed, 3 insertions, 6 deletions
diff --git a/cpu/netlist_gen.ml b/cpu/netlist_gen.ml
index 1aad452..016c595 100644
--- a/cpu/netlist_gen.ml
+++ b/cpu/netlist_gen.ml
@@ -16,9 +16,8 @@ let add p id eq size =
assert (not (Env.mem id p.p_vars)
|| (Env.find id p.p_vars = size));
assert (not (List.mem_assoc id p.p_eqs));
- { p_eqs = (id, eq)::p.p_eqs;
- p_inputs = p.p_inputs;
- p_outputs = p.p_outputs;
+ { p with
+ p_eqs = (id, eq)::p.p_eqs;
p_vars = Env.add id size p.p_vars }
let get id =
@@ -195,9 +194,7 @@ let program entries outputs =
p, outputs)
(p, []) outputs
in
- { p_inputs = p.p_inputs;
- p_eqs = p.p_eqs;
- p_vars = p.p_vars;
+ { p with
p_outputs = List.rev outputs }