source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_entity.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1#ifdef VHDL
2
3/*
4 * $Id: Vhdl_get_entity.cpp 81 2008-04-15 18:40:01Z 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::get_entity"
19  std::string Vhdl::get_entity(uint32_t depth,
20                               std::string   name)
21  {
22    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
23
24    std::string        tab = std::string(depth,'\t');
25    std::ostringstream text;
26
27    text <<                                      std::endl
28         << tab << "entity " << name << " is" << std::endl;
29   
30    if (_list_port.empty() == false)
31      text << tab << "\tport ("                 << std::endl
32           << tab << get_port(depth+1)          << std::endl
33           << tab << "\t     );"                << std::endl;
34   
35    text << tab << "end " << name << ";"      << std::endl;
36   
37    log_printf(FUNC,Behavioural,FUNCTION,"End");
38     
39    return text.str();
40  };
41 
42}; // end namespace behavioural         
43}; // end namespace morpheo             
44
45#endif
Note: See TracBrowser for help on using the repository browser.