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

Last change on this file since 95 was 95, checked in by rosiere, 16 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.2 KB
Line 
1#ifdef VHDL
2
3/*
4 * $Id: Vhdl_set_constant.cpp 95 2008-12-16 16:24:26Z 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_constant"
19  void Vhdl::set_constant (std::string      name     ,
20                           std::string      type     ,
21                           std::string      init)
22  {
23    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
24    set_list(_list_type, "constant "+ name+"\t: "+type+"\t:= "+init);
25    log_printf(FUNC,Behavioural,FUNCTION,"End");
26  };
27
28  void Vhdl::set_constant (std::string      name     ,
29                           uint32_t         size     ,
30                           std::string      init)
31  {
32    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
33    set_constant(name,std_logic(size),init);
34    log_printf(FUNC,Behavioural,FUNCTION,"End");
35  };
36
37  void Vhdl::set_constant (std::string name     ,
38                           uint32_t    size     ,
39                           uint32_t    init)
40  {
41    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
42    set_constant(name,std_logic(size),std_logic_cst(size,init));
43    log_printf(FUNC,Behavioural,FUNCTION,"End");
44  };
45 
46}; // end namespace behavioural         
47}; // end namespace morpheo             
48
49#endif
Note: See TracBrowser for help on using the repository browser.