Project

General

Profile

Revision a33a345a src/tools/importer/main_lustre_importer.ml

View differences:

src/tools/importer/main_lustre_importer.ml
18 18
open Mini_vhdl_ast_pp
19 19
open Vhdl_ast_pp
20 20
open Vhdl_ast_yojson
21
open Mini_vhdl_check
21 22
open Printf
22 23
open Printers
23 24
open Format
24 25

  
25 26
type input = VHDL | None
26 27
type output = Stdout | File
27
type mode = GenVHDL | GenMiniVHDL | GenLus
28
type mode = GenVHDL | GenMiniVHDL | GenLus | Check
28 29

  
29 30
let input_mode = ref None
30 31
let output_mode = ref Stdout
......
45 46
  "-vhdl", Arg.Unit (fun _ -> set_input_mode VHDL), " parse VHDL Json as input";
46 47
  "-print", Arg.Unit (fun _ -> set_output_mode Stdout), " print the output to stdout";
47 48
  "-o", Arg.String set_output_file_name, "<file>  prints the output to file";
49
  "-check", Arg.Unit (fun _ -> set_mode Check), " checks VHDL model correction";
48 50
  "-gen_vhdl", Arg.Unit (fun _ -> set_mode GenVHDL), " generate VHDL model";
49 51
  "-gen_minivhdl", Arg.Unit (fun _ -> set_mode GenMiniVHDL), " generate MiniVHDL model";
50 52
  "-gen_lustre", Arg.Unit (fun _ -> set_mode GenLus), " generate lustre model (does nothing)"
......
91 93
          output_result mini_vhdl_value;
92 94
          ()
93 95
        )
96
        | Check -> (
97
          let mini_vhdl = to_mini_vhdl#vhdl_design_file_t folded.design_file in
98
          check_mini_vhdl to_mini_vhdl#get_db to_mini_vhdl#to_string_vhdl_name_t
99
        )
94 100
        | GenLus -> (
95 101
          let mini_vhdl = to_mini_vhdl#vhdl_design_file_t folded.design_file in
96 102
          let program = to_lustre#mini_vhdl_design_file_t mini_vhdl in

Also available in: Unified diff