Last change
on this file since 102 was
94,
checked in by rosiere, 16 years ago
|
Update document on Vhdl generation.
|
-
Property svn:keywords set to
Id
|
File size:
1.0 KB
|
Rev | Line | |
---|
[2] | 1 | #ifdef VHDL |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | * $Id: Vhdl_get_component.cpp 94 2008-12-15 11:04:03Z rosiere $ |
---|
| 5 | * |
---|
| 6 | * [ Description ] |
---|
| 7 | * |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #include "Behavioural/include/Vhdl.h" |
---|
[94] | 11 | #include "Common/include/Tabulation.h" |
---|
[2] | 12 | |
---|
| 13 | #include <sstream> |
---|
| 14 | |
---|
| 15 | namespace morpheo { |
---|
| 16 | namespace behavioural { |
---|
| 17 | |
---|
[43] | 18 | #undef FUNCTION |
---|
| 19 | #define FUNCTION "Vhdl::get_component" |
---|
[71] | 20 | std::string Vhdl::get_component(uint32_t depth, |
---|
| 21 | std::string name) |
---|
[2] | 22 | { |
---|
[43] | 23 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 24 | |
---|
[94] | 25 | std::string tab = morpheo::tab(depth); |
---|
[71] | 26 | std::ostringstream text; |
---|
[2] | 27 | |
---|
[71] | 28 | text << std::endl |
---|
| 29 | << tab << "component " << name << std::endl; |
---|
[2] | 30 | if (_list_port.empty() == false) |
---|
[71] | 31 | text << tab << "\tport (" << std::endl |
---|
| 32 | << tab << get_port(depth+1) << std::endl |
---|
| 33 | << tab << "\t );" << std::endl; |
---|
| 34 | text << tab << "end component;" << std::endl; |
---|
| 35 | |
---|
[43] | 36 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
[2] | 37 | return text.str(); |
---|
| 38 | }; |
---|
| 39 | |
---|
| 40 | }; // end namespace behavioural |
---|
| 41 | }; // end namespace morpheo |
---|
| 42 | |
---|
| 43 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.