summaryrefslogtreecommitdiff
path: root/simul/main.ml
diff options
context:
space:
mode:
Diffstat (limited to 'simul/main.ml')
-rw-r--r--simul/main.ml60
1 files changed, 29 insertions, 31 deletions
diff --git a/simul/main.ml b/simul/main.ml
index 4c9a243..a772c69 100644
--- a/simul/main.ml
+++ b/simul/main.ml
@@ -27,37 +27,35 @@ let _ =
try
let pathfile = open_in pathfilename in
let paths = LexerPaths.read pathfile in
-
- Hashtbl.iter (fun path _ ->
- print_log ("Path : " ^ path);
- let files = Sys.readdir path in
- for i = 0 to Array.length files - 1 do
- if estXNL files.(i) then begin
- Compil.regCircuit (Reader.parse_file (path ^ files.(i)));
- print_log ("Loaded : " ^ path ^ files.(i))
- end
- done
- ) paths;
- let nameCircuit = ref "" in
- Arg.parse opts (fun str -> nameCircuit := str) "";
- if !nameCircuit = "" then
- failwith "Argument manquant : nom du circuit à compiler.";
- let schMain = Compil.findSchema (!nameCircuit) in
- let schMain2 = delesscheme schMain in
- Printf.fprintf stderr "Compilation : %f\n" (Sys.time());
- let t = Compil.completeGraphe
- schMain2 ""
- Imap.empty
- Imap.empty in
- Printf.fprintf stderr "Tritopo %f\n" (Sys.time());
- let t = Compil.triTopo t in
- Printf.fprintf stderr "Fin %f\n" (Sys.time());
- Compil.cbGenereCode
- t
- (simap_to_ismap schMain.entrees)
- (simap_to_ismap schMain.sorties)
- !nameGen
- !audit;
+
+ Hashtbl.iter (fun path _ ->
+ print_log ("Path : " ^ path);
+ let files = Sys.readdir path in
+ for i = 0 to Array.length files - 1 do
+ if estXNL files.(i) then begin
+ Compil.regCircuit (Reader.parse_file (path ^ files.(i)));
+ print_log ("Loaded : " ^ path ^ files.(i))
+ end
+ done
+ ) paths;
+ let nameCircuit = ref "" in
+ Arg.parse opts (fun str -> nameCircuit := str) "";
+ if !nameCircuit = "" then
+ failwith "Argument manquant : nom du circuit à compiler.";
+ let schMain = Compil.findSchema (!nameCircuit) in
+ let schMain2 = delesscheme schMain in
+ Printf.fprintf stderr "Compilation : %f\n" (Sys.time());
+ let t = Compil.completeGraphe schMain2 "" Imap.empty Imap.empty in
+ let t = Bus.match_bus t in
+ Printf.fprintf stderr "Tritopo %f\n" (Sys.time());
+ let t = Compil.triTopo t in
+ Printf.fprintf stderr "Fin %f\n" (Sys.time());
+ Compil.cbGenereCode
+ t
+ (simap_to_ismap schMain.entrees)
+ (simap_to_ismap schMain.sorties)
+ !nameGen
+ !audit;
with
|a -> print_logs (); raise a