source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.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.4 KB
RevLine 
[2]1#ifdef VHDL
2
3/*
4 * $Id: Vhdl_set_body.cpp 113 2009-04-14 18:39:12Z rosiere $
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/include/Vhdl.h"
[94]11#include "Common/include/Tabulation.h"
[2]12#include <sstream>
13
14namespace morpheo              {
15namespace behavioural          {
16 
[43]17#undef  FUNCTION
18#define FUNCTION "Vhdl::set_body"
[88]19  void Vhdl::set_body (std::string text)
[2]20  {
[43]21    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[94]22    set_body(0, text);
[43]23    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]24  };
[94]25
26#undef  FUNCTION
27#define FUNCTION "Vhdl::set_body"
28  void Vhdl::set_body (uint32_t depth,
29                       std::string text)
30  {
31    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[113]32
33    test_architecture();
34
35    set_list(_architecture[_name_architecture]._list_body, morpheo::tab(depth)+text);
[94]36    log_printf(FUNC,Behavioural,FUNCTION,"End");
37  };
[2]38 
[88]39#undef  FUNCTION
40#define FUNCTION "Vhdl::set_body"
[94]41  void Vhdl::set_body (uint32_t depth,
42                       Vhdl * vhdl)
[88]43  {
44    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[113]45
46    test_architecture();
[88]47   
[94]48    std::string tab=morpheo::tab(depth);
49
[113]50    for (std::list<std::string>::iterator it=vhdl->_architecture[_name_architecture]._list_body.begin();
51         it!=vhdl->_architecture[_name_architecture]._list_body.end();
[88]52         ++it)
[113]53      set_list(_architecture[_name_architecture]._list_body,tab+*it);
[88]54
55    log_printf(FUNC,Behavioural,FUNCTION,"End");
56  };
57 
[2]58}; // end namespace behavioural         
59}; // end namespace morpheo             
60
61#endif
Note: See TracBrowser for help on using the repository browser.