Last change
on this file since 84 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:
1013 bytes
|
Line | |
---|
1 | #ifdef VHDL |
---|
2 | |
---|
3 | /* |
---|
4 | * $Id: Vhdl_get_component.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 | |
---|
14 | namespace morpheo { |
---|
15 | namespace behavioural { |
---|
16 | |
---|
17 | #undef FUNCTION |
---|
18 | #define FUNCTION "Vhdl::get_component" |
---|
19 | std::string Vhdl::get_component(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 << "component " << name << std::endl; |
---|
29 | if (_list_port.empty() == false) |
---|
30 | text << tab << "\tport (" << std::endl |
---|
31 | << tab << get_port(depth+1) << std::endl |
---|
32 | << tab << "\t );" << std::endl; |
---|
33 | text << tab << "end component;" << std::endl; |
---|
34 | |
---|
35 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
36 | return text.str(); |
---|
37 | }; |
---|
38 | |
---|
39 | }; // end namespace behavioural |
---|
40 | }; // end namespace morpheo |
---|
41 | |
---|
42 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.