[113] | 1 | #ifdef VHDL |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | * $Id: Vhdl_get_debug.cpp 113 2009-04-14 18:39:12Z rosiere $ |
---|
| 5 | * |
---|
| 6 | * [ Description ] |
---|
| 7 | * |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #include "Behavioural/include/Vhdl.h" |
---|
| 11 | #include "Common/include/Tabulation.h" |
---|
| 12 | #include <sstream> |
---|
| 13 | |
---|
| 14 | namespace morpheo { |
---|
| 15 | namespace behavioural { |
---|
| 16 | |
---|
| 17 | #undef FUNCTION |
---|
| 18 | #define FUNCTION "Vhdl::get_debug" |
---|
| 19 | std::string Vhdl::get_debug (uint32_t depth) |
---|
| 20 | { |
---|
| 21 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 22 | |
---|
| 23 | test_architecture(); |
---|
| 24 | |
---|
| 25 | std::string _return = ""; |
---|
| 26 | |
---|
| 27 | if (_architecture[_name_architecture]._list_debug.size()>0) |
---|
| 28 | { |
---|
| 29 | // if (_port_clock == "") |
---|
| 30 | // throw ERRORMORPHEO(FUNCTION,_("Clock port is not define.\n")); |
---|
| 31 | |
---|
| 32 | std::string tab0=morpheo::tab(depth); |
---|
| 33 | std::string tab1=morpheo::tab(depth+1); |
---|
| 34 | |
---|
| 35 | _return += "\n"; |
---|
| 36 | _return += tab0+"debug: process\n"; |
---|
| 37 | _return += tab0+"begin -- process debug\n"; |
---|
| 38 | _return += get_list(_architecture[_name_architecture]._list_debug,depth+1,"",true); |
---|
| 39 | _return += "\n"; |
---|
| 40 | _return += tab1+"-- wait one period\n"; |
---|
| 41 | _return += tab1+"wait for "+toString(VHDL_TIME_PERIOD)+" "+toString(VHDL_TIME_UNIT)+";\n"; |
---|
| 42 | _return += tab0+"end process debug;\n"; |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
| 46 | |
---|
| 47 | return _return; |
---|
| 48 | }; |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | }; // end namespace behavioural |
---|
| 52 | }; // end namespace morpheo |
---|
| 53 | |
---|
| 54 | #endif |
---|