summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-09 15:41:00 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-09 15:41:00 +0100
commitaca9d65df0a04d5161ec3485659bbb974b802fb0 (patch)
tree45d05ef7da5056d70762402b9131b869029511e4
parent0839961de3373553b104f069652df021cf54aebd (diff)
parenta15092ed1951c5abca63faae715736bbee187913 (diff)
downloadSystDigit-Projet-aca9d65df0a04d5161ec3485659bbb974b802fb0.tar.gz
SystDigit-Projet-aca9d65df0a04d5161ec3485659bbb974b802fb0.zip
Merge branch 'master' of drakkar.ens.fr:/users/13/info/auvolat/boulot/SystDigit-Projet
-rw-r--r--sched/netlist_dumb.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/sched/netlist_dumb.ml b/sched/netlist_dumb.ml
index 89f7edf..f16f763 100644
--- a/sched/netlist_dumb.ml
+++ b/sched/netlist_dumb.ml
@@ -14,8 +14,8 @@ type var_id = int
type const_val = bool array
(* keep type binop from netlist_ast *)
-type reg_var = { dest : var_id; source : var_id }
-type ram_var = { dest : var_id;
+type reg_var = { reg_dest : var_id; source : var_id }
+type ram_var = { ram_dest : var_id;
addr_size : int; word_size : int;
read_addr : var_id; write_enable : var_id;
write_addr : var_id; data : var_id }
@@ -117,7 +117,7 @@ let make_program_dumb p =
match eq with
| Ereg(x) ->
{
- dest = var_id n;
+ reg_dest = var_id n;
source = var_id x;
}::regs, eqs
| _ -> regs, (n, eq)::eqs)
@@ -129,7 +129,7 @@ let make_program_dumb p =
match eq with
| Eram(asz, wsz, ra, we, wa, d) ->
{
- dest = var_id n;
+ ram_dest = var_id n;
addr_size = asz;
word_size = wsz;
read_addr = arg_id ra;
@@ -203,11 +203,11 @@ let print_dumb_program oc p =
(* print register list *)
fprintf ff "%d\n" (List.length p.d_regs);
List.iter (fun (r: reg_var) ->
- fprintf ff "%d %d\n" r.dest r.source) p.d_regs;
+ fprintf ff "%d %d\n" r.reg_dest r.source) p.d_regs;
(* print ram list *)
fprintf ff "%d\n" (List.length p.d_rams);
List.iter (fun r -> fprintf ff "%d %d %d %d %d %d %d\n"
- r.dest r.addr_size r.word_size r.read_addr r.write_enable
+ r.ram_dest r.addr_size r.word_size r.read_addr r.write_enable
r.write_addr r.data) p.d_rams;
(* print equation list *)
fprintf ff "%d\n" (List.length p.d_eqs);