Project

General

Profile

Revision 248eb65e src/tools/importer/vhdl_to_lustre.ml

View differences:

src/tools/importer/vhdl_to_lustre.ml
4 4

  
5 5
let _ = fun (_ : vhdl_cst_val_t)  -> () 
6 6
let _ = fun (_ : vhdl_type_t)  -> () 
7
let _ = fun (_ : vhdl_element_declaration_t)  -> () 
7 8
let _ = fun (_ : vhdl_subtype_indication_t)  -> () 
8 9
let _ = fun (_ : vhdl_discrete_range_t)  -> () 
9 10
let _ = fun (_ : vhdl_constraint_t)  -> () 
......
55 56
    method virtual  vhdl_port_t : vhdl_port_t -> vhdl_port_t
56 57
    method virtual  vhdl_expr_t : vhdl_expr_t -> vhdl_expr_t
57 58
    method virtual  vhdl_port_mode_t : vhdl_port_mode_t -> vhdl_port_mode_t
59
    method virtual  vhdl_element_declaration_t : vhdl_element_declaration_t -> vhdl_element_declaration_t
58 60
    method virtual  vhdl_subtype_indication_t : vhdl_subtype_indication_t -> vhdl_subtype_indication_t
59 61
    method virtual  vhdl_conditional_signal_t : vhdl_conditional_signal_t -> vhdl_conditional_signal_t
60 62
    method virtual  vhdl_process_t : vhdl_process_t -> vhdl_process_t
......
96 98
            let b = self#int b  in let c = self#int c  in Range (a, b, c)
97 99
        | Bit_vector (a,b) ->
98 100
            let a = self#int a  in let b = self#int b  in Bit_vector (a, b)
99
        | Array (a,b,c) ->
100
            let a = self#int a  in
101
            let b = self#int b  in
102
            let c = self#vhdl_type_t c  in Array (a, b, c)
103
        | Enumerated a -> let a = self#list self#string a  in Enumerated a
101
        | Array { indexes; const; definition } ->
102
            let indexes = self#list self#vhdl_name_t indexes  in
103
            let const = self#option self#vhdl_constraint_t const  in
104
            let definition = self#vhdl_subtype_indication_t definition  in
105
            Array { indexes; const; definition }
106
        | Record a ->
107
            let a = self#list self#vhdl_element_declaration_t a  in Record a
108
        | Enumerated a ->
109
            let a = self#list self#vhdl_name_t a  in Enumerated a
104 110
        | Void  -> Void
111
    method vhdl_element_declaration_t :
112
      vhdl_element_declaration_t -> vhdl_element_declaration_t=
113
      fun { names; definition }  ->
114
        let names = self#list self#vhdl_name_t names  in
115
        let definition = self#vhdl_subtype_indication_t definition  in
116
        { names; definition }
105 117
    method vhdl_subtype_indication_t :
106 118
      vhdl_subtype_indication_t -> vhdl_subtype_indication_t=
107 119
      fun { name; functionName; const }  ->
......
444 456
        { name; generics; ports; declaration; stmts }
445 457

  
446 458
    method vhdl_package_t : vhdl_package_t -> vhdl_package_t=
447
      fun { name; shared_defs }  ->
459
      fun { name; shared_defs; shared_decls }  ->
448 460
        let name = self#vhdl_name_t name  in
449 461
        let shared_defs = self#list self#vhdl_definition_t shared_defs  in
450
        { name; shared_defs }
462
        let shared_decls = self#list self#vhdl_declaration_t shared_decls  in
463
        { name; shared_defs; shared_decls }
451 464

  
452 465
    method vhdl_load_t : vhdl_load_t -> vhdl_load_t=
453 466
      fun x  ->

Also available in: Unified diff