Project

General

Profile

Revision 3ca452f3

View differences:

src/tools/importer/main_lustre_importer.ml
1
(* An application that loads json provided input and produces Lustre
2

  
3
Usage:
4
lustrei -vhdl myvhdl.json 
5
lustrei -scade myscademodel.json 
6
  will produce a lustre file that can be compiled and analyzed
7

  
8
VHDL is handled in a double way: as a backend and as an import language
9
In a first step, lustrei -vhdl -print myvhdl.json shall print the VHDL model in stdout
10

  
11
 *)
12

  
13
open Vhdl_ast
14
open Vhdl_test
15
       
16
let _ =
17
(*
18
  (* Load model with Yojson *)
19
  let json = xx in
20

  
21
  (* Create VHDL values *)
22
  let vhdl : vhdl_design_t = xxxx json in
23

  
24
  (* Printing result *)
25
  Format.printf "Loaded VHDL:@.%a@." pp_vhdl_design vhdl
26
 *)
27

  
28
  let vhdl = design1 in
29
  Format.printf "Loaded VHDL:@.%a@." pp_vhdl_design vhdl;
30
  ()

Also available in: Unified diff