Last change
on this file since 122 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
File size:
1005 bytes
|
Rev | Line | |
---|
[42] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | /* |
---|
| 3 | * $Id: Interfaces_get_reset.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/include/Interfaces.h" |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | |
---|
[43] | 15 | #undef FUNCTION |
---|
| 16 | #define FUNCTION "Interfaces::get_reset" |
---|
[42] | 17 | Signal * Interfaces::get_reset (void) |
---|
| 18 | { |
---|
[43] | 19 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 20 | |
---|
[42] | 21 | Signal * reset = NULL; |
---|
| 22 | |
---|
| 23 | if (not _list_interface->empty()) |
---|
| 24 | { |
---|
[75] | 25 | std::list<Interface_fifo*>::iterator i = _list_interface->begin(); |
---|
[42] | 26 | |
---|
| 27 | while (i != _list_interface->end()) |
---|
| 28 | { |
---|
| 29 | Signal * sig = (*i)->get_reset (); |
---|
| 30 | |
---|
| 31 | if (sig != NULL) |
---|
| 32 | { |
---|
| 33 | if (reset != NULL) |
---|
| 34 | throw ErrorMorpheo ("<Interfaces.get_reset> : find too many reset."); |
---|
| 35 | reset = sig; |
---|
| 36 | } |
---|
| 37 | ++i; |
---|
| 38 | } |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | if (reset == NULL) |
---|
| 42 | throw ErrorMorpheo ("<Interfaces.get_reset> : no reset find."); |
---|
| 43 | |
---|
[43] | 44 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
| 45 | |
---|
[42] | 46 | return reset; |
---|
| 47 | }; |
---|
| 48 | |
---|
| 49 | }; // end namespace behavioural |
---|
| 50 | }; // end namespace morpheo |
---|
| 51 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.