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

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

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

  • Property svn:keywords set to Id
File size: 1.8 KB
RevLine 
[2]1#ifdef VHDL
2
3/*
4 * $Id: Vhdl_set_signal.cpp 113 2009-04-14 18:39:12Z 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");
[113]24
25    test_architecture();
26
27    set_list(_architecture[_name_architecture]._list_signal, "signal "+ name + "\t: " + type);
28   
[43]29    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]30  };
31
[71]32  void Vhdl::set_signal (std::string      name     ,
[93]33                         uint32_t         size     )
[2]34  {
[43]35    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[2]36    set_signal(name,std_logic(size));
[43]37    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]38  }
39
[71]40  void Vhdl::set_signal (std::string      name     ,
41                         std::string      type     ,
42                         std::string      init)
[2]43  {
[43]44    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[113]45
46    test_architecture();
47   
48    _architecture[_name_architecture]._list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init);
49
[43]50    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]51  };
52
[71]53  void Vhdl::set_signal (std::string      name     ,
[2]54                         uint32_t    size     ,
[71]55                         std::string      init     )
[2]56  {
[43]57    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[2]58    set_signal(name,std_logic(size),init);
[43]59    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]60  };
[71]61  void Vhdl::set_signal (std::string      name     ,
[2]62                         uint32_t    size     ,
63                         uint32_t    init     )
64  {
[43]65    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[95]66    set_signal(name,std_logic(size),std_logic_cst(size,init));
[43]67    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]68  };
69
70 
71}; // end namespace behavioural         
72}; // end namespace morpheo             
73
74#endif
Note: See TracBrowser for help on using the repository browser.