source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp @ 43

Last change on this file since 43 was 43, checked in by rosiere, 17 years ago

Modif mineur : ajout d'info de débug

Release non stable

File size: 1.6 KB
Line 
1#ifdef VHDL
2
3/*
4 * $Id$
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/include/Vhdl.h"
11
12#include <sstream>
13using namespace std;
14
15namespace morpheo              {
16namespace behavioural          {
17 
18#undef  FUNCTION
19#define FUNCTION "Vhdl::set_signal"
20
21  void Vhdl::set_signal (string      name     ,
22                         string      type     )
23  {
24    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
25    set_list(_list_signal, "signal "+ name + "\t: " + type);
26    log_printf(FUNC,Behavioural,FUNCTION,"End");
27  };
28
29  void Vhdl::set_signal (string      name     ,
30                         uint32_t    size     )
31  {
32    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
33    set_signal(name,std_logic(size));
34    log_printf(FUNC,Behavioural,FUNCTION,"End");
35  }
36
37  void Vhdl::set_signal (string      name     ,
38                         string      type     ,
39                         string      init)
40  {
41    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
42    _list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init);
43    log_printf(FUNC,Behavioural,FUNCTION,"End");
44  };
45
46  void Vhdl::set_signal (string      name     ,
47                         uint32_t    size     ,
48                         string      init     )
49  {
50    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
51    set_signal(name,std_logic(size),init);
52    log_printf(FUNC,Behavioural,FUNCTION,"End");
53  };
54  void Vhdl::set_signal (string      name     ,
55                         uint32_t    size     ,
56                         uint32_t    init     )
57  {
58    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
59    set_signal(name,std_logic(size),std_logic_conv(size,init));
60    log_printf(FUNC,Behavioural,FUNCTION,"End");
61  };
62
63 
64}; // end namespace behavioural         
65}; // end namespace morpheo             
66
67#endif
Note: See TracBrowser for help on using the repository browser.