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
|
Line | |
---|
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 | { |
---|
16 | log_printf(FUNC,Behavioural,"get_signal","Begin"); |
---|
17 | |
---|
18 | uint32_t depth = 0; |
---|
19 | string separator = ",\n"; |
---|
20 | bool last_separator = false; |
---|
21 | |
---|
22 | |
---|
23 | list<Signal*>::iterator i = _list_signal->begin(); |
---|
24 | bool empty = _list_signal->empty(); |
---|
25 | |
---|
26 | string tab = string(depth,'\t'); |
---|
27 | ostringstream text; |
---|
28 | |
---|
29 | if (not empty) |
---|
30 | { |
---|
31 | // First |
---|
32 | if (i != _list_signal->end()) |
---|
33 | { |
---|
34 | text << tab << **i; |
---|
35 | ++i; |
---|
36 | } |
---|
37 | |
---|
38 | while (i != _list_signal->end()) |
---|
39 | { |
---|
40 | text << separator; |
---|
41 | text << tab << **i; |
---|
42 | ++i; |
---|
43 | } |
---|
44 | if (last_separator) |
---|
45 | text << separator; |
---|
46 | } |
---|
47 | |
---|
48 | log_printf(FUNC,Behavioural,"get_signal","End"); |
---|
49 | |
---|
50 | return text.str(); |
---|
51 | }; |
---|
52 | |
---|
53 | }; // end namespace behavioural |
---|
54 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.