summaryrefslogtreecommitdiff
path: root/sched/main.ml
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-05 18:29:27 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-05 18:29:27 +0100
commit244a51086c20dbd937dd21f1eb9c4b74acc5a3c9 (patch)
treeef79030aff1f61801f10f7407325076adc6be10a /sched/main.ml
parent07b7563e0748b1aff6f4d28b0172095b2fdcdfcc (diff)
downloadSystDigit-Projet-244a51086c20dbd937dd21f1eb9c4b74acc5a3c9.tar.gz
SystDigit-Projet-244a51086c20dbd937dd21f1eb9c4b74acc5a3c9.zip
More simplifcation passes...
Diffstat (limited to 'sched/main.ml')
-rw-r--r--sched/main.ml14
1 files changed, 12 insertions, 2 deletions
diff --git a/sched/main.ml b/sched/main.ml
index a2a4d3b..1b4b9d8 100644
--- a/sched/main.ml
+++ b/sched/main.ml
@@ -8,10 +8,13 @@ let compile filename =
let p = Netlist.read_file filename in
let out_name = (Filename.chop_suffix filename ".net") ^ "_sch.net" in
let dumb_out_name = (Filename.chop_suffix filename ".net") ^ ".dumb" in
- let q = ref p in
+ let out_opt_name = (Filename.chop_suffix filename ".net") ^ "_sch_opt.net" in
+ let dumb_opt_out_name = (Filename.chop_suffix filename ".net") ^ "_opt.dumb" in
+ let q, q_opt = ref p, ref p in
begin try
- q := (Simplify.simplify (Scheduler.schedule p))
+ q := Scheduler.schedule p;
+ q_opt := Simplify.simplify p
with
| Scheduler.Combinational_cycle ->
Format.eprintf "The netlist has a combinatory cycle.@.";
@@ -25,6 +28,13 @@ let compile filename =
Netlist_printer.print_dumb_program dumb_out !q;
close_out dumb_out;
+ let out_opt = open_out out_opt_name in
+ Netlist_printer.print_program out_opt !q_opt;
+ close_out out_opt;
+ let dumb_opt_out = open_out dumb_opt_out_name in
+ Netlist_printer.print_dumb_program dumb_opt_out !q_opt;
+ close_out dumb_opt_out;
+
if !simulate then (
let simulator =
if !number_steps = -1 then