source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 818 bytes
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  void Vhdl::set_constant (string      name     ,
19                           string      type     ,
20                           string      init)
21  {
22    set_list(_list_type, "constant "+ name+"\t: "+type+"\t:= "+init);
23  };
24
25  void Vhdl::set_constant (string      name     ,
26                           uint32_t    size     ,
27                           string      init)
28  {
29    set_constant(name,std_logic(size),init);
30  };
31
32  void Vhdl::set_constant (string      name     ,
33                           uint32_t    size     ,
34                           uint32_t    init)
35  {
36    set_constant(name,std_logic(size),std_logic_conv(size,init));
37  };
38 
39}; // end namespace behavioural         
40}; // end namespace morpheo             
41
42#endif
Note: See TracBrowser for help on using the repository browser.