Project

General

Profile

« Previous | Next » 

Revision ec031ed0

Added by Arnaud Dieumegard almost 6 years ago

Added support for declarative items

View differences:

src/tools/importer/vhdl_to_lustre.ml
25 25
let _ = fun (_ : vhdl_case_item_t)  -> () 
26 26
let _ = fun (_ : vhdl_declaration_t)  -> () 
27 27
let _ = fun (_ : vhdl_signal_selection_t)  -> () 
28
let _ = fun (_ : vhdl_declarative_item_t)  -> () 
28 29
let _ = fun (_ : vhdl_signal_condition_t)  -> () 
29 30
let _ = fun (_ : vhdl_conditional_signal_t)  -> () 
30 31
let _ = fun (_ : vhdl_process_t)  -> () 
......
65 66
    method virtual  vhdl_suffix_selection_t : vhdl_suffix_selection_t -> vhdl_suffix_selection_t
66 67
    method virtual  vhdl_declaration_t : vhdl_declaration_t -> vhdl_declaration_t
67 68
    method virtual  vhdl_sequential_stmt_t : vhdl_sequential_stmt_t -> vhdl_sequential_stmt_t
69
    method virtual  vhdl_declarative_item_t : vhdl_declarative_item_t -> vhdl_declarative_item_t
68 70
    method virtual  vhdl_signal_condition_t : vhdl_signal_condition_t -> vhdl_signal_condition_t
69 71
    method virtual  vhdl_cst_val_t : vhdl_cst_val_t -> vhdl_cst_val_t
70 72
    method virtual  vhdl_subprogram_spec_t : vhdl_subprogram_spec_t -> vhdl_subprogram_spec_t
......
382 384
            let stmts = self#list self#vhdl_sequential_stmt_t stmts  in
383 385
            Subprogram { name; kind; spec; decl_part; stmts }
384 386

  
387
    method vhdl_declarative_item_t :
388
      vhdl_declarative_item_t -> vhdl_declarative_item_t=
389
      fun { use_clause; declaration; definition }  ->
390
        let use_clause = self#option self#vhdl_load_t use_clause  in
391
        let declaration = self#option self#vhdl_declaration_t declaration  in
392
        let definition = self#option self#vhdl_definition_t definition  in
393
        { use_clause; declaration; definition }
394

  
385 395
    method vhdl_signal_condition_t : vhdl_signal_condition_t -> vhdl_signal_condition_t=
386 396
      fun { expr; cond }  ->
387 397
        let expr = self#list self#vhdl_expr_t expr  in
......
404 414
        let delay = self#vhdl_expr_t delay  in
405 415
        { postponed; label; lhs; rhs; cond; delay }
406 416

  
407

  
408 417
    method vhdl_process_t : vhdl_process_t -> vhdl_process_t=
409 418
      fun { id; declarations; active_sigs; body }  ->
410 419
        let id = self#vhdl_name_t id  in
411
        let declarations =
412
          self#option (self#list self#vhdl_declaration_t) declarations  in
420
        let declarations = self#list self#vhdl_declarative_item_t declarations  in
413 421
        let active_sigs = self#list self#vhdl_name_t active_sigs  in
414 422
        let body = self#list self#vhdl_sequential_stmt_t body  in
415 423
        { id; declarations; active_sigs; body }
......
476 484
        | Use a -> let a = self#list self#vhdl_name_t a  in Use a
477 485

  
478 486
    method vhdl_architecture_t : vhdl_architecture_t -> vhdl_architecture_t=
479
      fun { name; entity; use_clauses; declarations; body }  ->
487
      fun { name; entity; declarations; body }  ->
480 488
        let name = self#vhdl_name_t name  in
481 489
        let entity = self#vhdl_name_t entity  in
482
        let use_clauses = self#list self#vhdl_load_t use_clauses  in
483
        let declarations = self#list self#vhdl_declaration_t declarations  in
490
        let declarations = self#list self#vhdl_declarative_item_t declarations  in
484 491
        let body = self#list self#vhdl_concurrent_stmt_t body  in
485
        { name; entity; use_clauses; declarations; body }
492
        { name; entity; declarations; body }
486 493

  
487 494
    method vhdl_configuration_t :
488 495
      vhdl_configuration_t -> vhdl_configuration_t= self#unit

Also available in: Unified diff