Last change
on this file since 49 was
43,
checked in by rosiere, 17 years ago
|
Modif mineur : ajout d'info de débug
Release non stable
|
File size:
909 bytes
|
Rev | Line | |
---|
[42] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/include/Signal.h" |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | |
---|
[43] | 15 | #undef FUNCTION |
---|
| 16 | #define FUNCTION "Signal::get_reset_cycle" |
---|
[42] | 17 | uint32_t Signal::get_reset_cycle (bool active_low) |
---|
| 18 | { |
---|
[43] | 19 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 20 | |
---|
[42] | 21 | uint32_t num = 0; |
---|
| 22 | uint32_t cpt = 0; |
---|
| 23 | string cmp = (active_low==true)?"0":"1"; |
---|
| 24 | |
---|
| 25 | if ((_presence_port == RESET_VHDL_YES) or |
---|
| 26 | (_presence_port == RESET_VHDL_NO )) |
---|
| 27 | { |
---|
| 28 | if (_list_value->empty()== false) |
---|
| 29 | { |
---|
| 30 | list<string>::iterator i = _list_value->begin(); |
---|
| 31 | |
---|
| 32 | while (i != _list_value->end()) |
---|
| 33 | { |
---|
| 34 | if ((*i) == cmp) |
---|
| 35 | num = cpt; |
---|
| 36 | cpt ++; |
---|
| 37 | ++i; |
---|
| 38 | } |
---|
| 39 | } |
---|
| 40 | } |
---|
| 41 | |
---|
[43] | 42 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
| 43 | |
---|
[42] | 44 | return num; |
---|
| 45 | }; |
---|
| 46 | |
---|
| 47 | }; // end namespace behavioural |
---|
| 48 | }; // end namespace morpheo |
---|
| 49 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.