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

Last change on this file since 95 was 95, checked in by rosiere, 15 years ago

1) Update Prediction Table - New architecture (systemC) done (and tested) -> need change interface in top level
2) Change documentation on VHDL generation
3) Change VHDL constant (case std_logic and std_logic_vector)

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1#ifdef VHDL
2
3/*
4 * $Id: Vhdl_set_signal.cpp 95 2008-12-16 16:24:26Z rosiere $
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/include/Vhdl.h"
11#include "Common/include/ToBase2.h"
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_cst(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.