Revision b15439da
Added by Arnaud Dieumegard almost 5 years ago
src/tools/importer/main_lustre_importer.ml | ||
---|---|---|
24 | 24 |
|
25 | 25 |
type input = VHDL | None |
26 | 26 |
type output = Stdout | File |
27 |
type mode = GenVHDL | GenMiniVHDL | GenLus | GenAll
|
|
27 |
type mode = GenVHDL | GenMiniVHDL | GenLus |
|
28 | 28 |
|
29 | 29 |
let input_mode = ref None |
30 | 30 |
let output_mode = ref Stdout |
... | ... | |
79 | 79 |
Ok x -> ( |
80 | 80 |
(* Fold Op vhdl_expr_t values *) |
81 | 81 |
let folded = replace_op_expr#vhdl_file_t x in |
82 |
let mini_vhdl = to_mini_vhdl#vhdl_design_file_t folded.design_file in |
|
83 | 82 |
match !mode with |
84 | 83 |
| GenVHDL -> ( |
85 | 84 |
let vhdl_value = show_vhdl_file_t folded in |
86 |
output_result vhdl_value |
|
85 |
output_result vhdl_value; |
|
86 |
() |
|
87 | 87 |
) |
88 | 88 |
| GenMiniVHDL -> ( |
89 |
let mini_vhdl = to_mini_vhdl#vhdl_design_file_t folded.design_file in |
|
89 | 90 |
let mini_vhdl_value = show_mini_vhdl_design_file_t mini_vhdl in |
90 |
output_result mini_vhdl_value |
|
91 |
output_result mini_vhdl_value; |
|
92 |
() |
|
91 | 93 |
) |
92 | 94 |
| GenLus -> () |
93 |
| GenAll -> ( |
|
94 |
let vhdl_value = show_vhdl_file_t folded in |
|
95 |
let mini_vhdl_value = show_mini_vhdl_design_file_t mini_vhdl in |
|
96 |
output_result vhdl_value; |
|
97 |
output_result "===================="; |
|
98 |
output_result mini_vhdl_value |
|
99 |
) |
|
100 | 95 |
) |
101 | 96 |
(* Pretty print lustre value *) |
102 | 97 |
(* Printers.pp_prog std_formatter program; *) |
103 |
| Error e -> failwith (Format.sprintf "Error: %s\n" e);
|
|
98 |
| Error e -> failwith (Format.sprintf "Error: %s\n" e) |
|
104 | 99 |
) |
105 | 100 |
| None -> () |
106 |
|
|
107 |
|
|
108 |
|
Also available in: Unified diff
Update of the command line