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
RevLine 
[2]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 
[43]17#undef  FUNCTION
18#define FUNCTION "Vhdl::set_signal"
19
[71]20  void Vhdl::set_signal (std::string      name     ,
21                         std::string      type     )
[2]22  {
[43]23    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[2]24    set_list(_list_signal, "signal "+ name + "\t: " + type);
[43]25    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]26  };
27
[71]28  void Vhdl::set_signal (std::string      name     ,
[2]29                         uint32_t    size     )
30  {
[43]31    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[2]32    set_signal(name,std_logic(size));
[43]33    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]34  }
35
[71]36  void Vhdl::set_signal (std::string      name     ,
37                         std::string      type     ,
38                         std::string      init)
[2]39  {
[43]40    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[2]41    _list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init);
[43]42    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]43  };
44
[71]45  void Vhdl::set_signal (std::string      name     ,
[2]46                         uint32_t    size     ,
[71]47                         std::string      init     )
[2]48  {
[43]49    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[2]50    set_signal(name,std_logic(size),init);
[43]51    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]52  };
[71]53  void Vhdl::set_signal (std::string      name     ,
[2]54                         uint32_t    size     ,
55                         uint32_t    init     )
56  {
[43]57    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[2]58    set_signal(name,std_logic(size),std_logic_conv(size,init));
[43]59    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]60  };
61
62 
63}; // end namespace behavioural         
64}; // end namespace morpheo             
65
66#endif
Note: See TracBrowser for help on using the repository browser.