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, 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.7 KB
RevLine 
[2]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"
[95]11#include "Common/include/ToBase2.h"
[2]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     ,
[93]29                         uint32_t         size     )
[2]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");
[95]58    set_signal(name,std_logic(size),std_logic_cst(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.