Last change
on this file since 47 was
42,
checked in by rosiere, 17 years ago
|
Modification des classes d'encapsulation des interfaces :
- gère les signaux à écrire dans le vhdl
- les traces pour le testbench
- la génération des vhdl structurelles
-> test sur la Pattern History Table
|
File size:
1.1 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 | Signal * Interface::find_signal (string name) |
---|
15 | { |
---|
16 | log_printf(FUNC,Behavioural,"find_signal","Begin"); |
---|
17 | |
---|
18 | list<Signal*>::iterator i = _list_signal->begin(); |
---|
19 | Signal * sig = NULL; |
---|
20 | if (_list_signal->empty() == false) |
---|
21 | { |
---|
22 | while (i != _list_signal->end()) |
---|
23 | { |
---|
24 | if ((*i)->get_name() == name) |
---|
25 | { |
---|
26 | sig = (*i); |
---|
27 | break; |
---|
28 | } |
---|
29 | ++i; |
---|
30 | } |
---|
31 | } |
---|
32 | |
---|
33 | log_printf(FUNC,Behavioural,"find_signal","End"); |
---|
34 | |
---|
35 | return sig; |
---|
36 | }; |
---|
37 | |
---|
38 | bool Interface::find_signal (Signal * signal) |
---|
39 | { |
---|
40 | log_printf(FUNC,Behavioural,"find_signal","Begin"); |
---|
41 | |
---|
42 | bool find = false; |
---|
43 | list<Signal*>::iterator i = _list_signal->begin(); |
---|
44 | if (_list_signal->empty() == false) |
---|
45 | { |
---|
46 | while (i != _list_signal->end()) |
---|
47 | { |
---|
48 | if ( (*i) == signal) |
---|
49 | { |
---|
50 | find = true; |
---|
51 | break; |
---|
52 | } |
---|
53 | ++i; |
---|
54 | } |
---|
55 | } |
---|
56 | |
---|
57 | log_printf(FUNC,Behavioural,"find_signal","End"); |
---|
58 | |
---|
59 | return find; |
---|
60 | }; |
---|
61 | |
---|
62 | }; // end namespace behavioural |
---|
63 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.