Last change
on this file since 125 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:
924 bytes
|
Line | |
---|
1 | #ifdef VHDL_TESTBENCH |
---|
2 | /* |
---|
3 | * $Id: Signal_get_reset_cycle.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/include/Signal.h" |
---|
10 | |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | |
---|
15 | #undef FUNCTION |
---|
16 | #define FUNCTION "Signal::get_reset_cycle" |
---|
17 | uint32_t Signal::get_reset_cycle (bool active_low) |
---|
18 | { |
---|
19 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
20 | |
---|
21 | uint32_t num = 0; |
---|
22 | uint32_t cpt = 0; |
---|
23 | std::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 | std::list<std::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 | |
---|
42 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
43 | |
---|
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.