Last change
on this file since 40 was
40,
checked in by rosiere, 17 years ago
|
Interface et Signal, c'est deux classes enregistres la valeurs des signaux à chaque cycle ... étape préparatoire avan le changement de la classe Vhdl_Testbench
|
File size:
1.0 KB
|
Rev | Line | |
---|
[29] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/Interface.h" |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | |
---|
| 14 | string Interface::get_signal (void) |
---|
| 15 | { |
---|
[38] | 16 | log_printf(FUNC,Behavioural,"get_signal","Begin"); |
---|
[40] | 17 | |
---|
[29] | 18 | uint32_t depth = 0; |
---|
| 19 | string separator = ",\n"; |
---|
| 20 | bool last_separator = false; |
---|
| 21 | |
---|
| 22 | |
---|
[38] | 23 | list<Signal*>::iterator i = _list_signal->begin(); |
---|
[31] | 24 | bool empty = _list_signal->empty(); |
---|
[29] | 25 | |
---|
| 26 | string tab = string(depth,'\t'); |
---|
| 27 | ostringstream text; |
---|
| 28 | |
---|
| 29 | if (not empty) |
---|
| 30 | { |
---|
| 31 | // First |
---|
[31] | 32 | if (i != _list_signal->end()) |
---|
[29] | 33 | { |
---|
[38] | 34 | text << tab << **i; |
---|
[29] | 35 | ++i; |
---|
| 36 | } |
---|
| 37 | |
---|
[31] | 38 | while (i != _list_signal->end()) |
---|
[29] | 39 | { |
---|
| 40 | text << separator; |
---|
[38] | 41 | text << tab << **i; |
---|
[29] | 42 | ++i; |
---|
| 43 | } |
---|
| 44 | if (last_separator) |
---|
| 45 | text << separator; |
---|
| 46 | } |
---|
| 47 | |
---|
[38] | 48 | log_printf(FUNC,Behavioural,"get_signal","End"); |
---|
| 49 | |
---|
[29] | 50 | return text.str(); |
---|
| 51 | }; |
---|
| 52 | |
---|
| 53 | }; // end namespace behavioural |
---|
| 54 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.