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

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#ifdef VHDL
2
3/*
4 * $Id: Vhdl_set_signal.cpp 81 2008-04-15 18:40:01Z rosiere $
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/include/Vhdl.h"
11
12#include <sstream>
13
14namespace morpheo              {
15namespace behavioural          {
16 
17#undef  FUNCTION
18#define FUNCTION "Vhdl::set_signal"
19
20  void Vhdl::set_signal (std::string      name     ,
21                         std::string      type     )
22  {
23    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
24    set_list(_list_signal, "signal "+ name + "\t: " + type);
25    log_printf(FUNC,Behavioural,FUNCTION,"End");
26  };
27
28  void Vhdl::set_signal (std::string      name     ,
29                         uint32_t    size     )
30  {
31    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
32    set_signal(name,std_logic(size));
33    log_printf(FUNC,Behavioural,FUNCTION,"End");
34  }
35
36  void Vhdl::set_signal (std::string      name     ,
37                         std::string      type     ,
38                         std::string      init)
39  {
40    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
41    _list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init);
42    log_printf(FUNC,Behavioural,FUNCTION,"End");
43  };
44
45  void Vhdl::set_signal (std::string      name     ,
46                         uint32_t    size     ,
47                         std::string      init     )
48  {
49    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
50    set_signal(name,std_logic(size),init);
51    log_printf(FUNC,Behavioural,FUNCTION,"End");
52  };
53  void Vhdl::set_signal (std::string      name     ,
54                         uint32_t    size     ,
55                         uint32_t    init     )
56  {
57    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
58    set_signal(name,std_logic(size),std_logic_conv(size,init));
59    log_printf(FUNC,Behavioural,FUNCTION,"End");
60  };
61
62 
63}; // end namespace behavioural         
64}; // end namespace morpheo             
65
66#endif
Note: See TracBrowser for help on using the repository browser.