Last change
on this file since 107 was
94,
checked in by rosiere, 16 years ago
|
Update document on Vhdl generation.
|
-
Property svn:keywords set to
Id
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2] | 1 | #ifdef VHDL |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | * $Id: Vhdl_get_architecture.cpp 94 2008-12-15 11:04:03Z rosiere $ |
---|
| 5 | * |
---|
[94] | 6 | * [ Description ] |
---|
[2] | 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_architecture" |
---|
[71] | 20 | std::string Vhdl::get_architecture (uint32_t depth , |
---|
| 21 | std::string name , |
---|
| 22 | std::string entity_name) |
---|
[2] | 23 | { |
---|
[43] | 24 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 25 | |
---|
[94] | 26 | std::string tab = morpheo::tab(depth); |
---|
[71] | 27 | std::ostringstream text; |
---|
[2] | 28 | |
---|
[71] | 29 | text << tab << "architecture " << name << " of " << entity_name << " is" << std::endl |
---|
| 30 | << tab << get_type (depth+1) << std::endl |
---|
| 31 | << tab << get_signal (depth+1) << std::endl |
---|
| 32 | << tab << get_alias (depth+1) << std::endl |
---|
| 33 | << tab << "begin" << std::endl |
---|
| 34 | << tab << get_body (depth+1) << std::endl |
---|
| 35 | << tab << "end " << name << ";" << std::endl; |
---|
[2] | 36 | |
---|
[43] | 37 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
| 38 | |
---|
[2] | 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.