Last change
on this file since 45 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:
911 bytes
|
Rev | Line | |
---|
[41] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/include/Interface.h" |
---|
| 10 | #include "Behavioural/include/Entity.h" |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | |
---|
| 15 | string Interface::testbench_test_ok (Vhdl * & vhdl) |
---|
| 16 | { |
---|
| 17 | log_printf(FUNC,Behavioural,"testbench_test_ok","Begin"); |
---|
| 18 | |
---|
| 19 | string test_name = testbench_test_ok_name(vhdl); |
---|
| 20 | |
---|
| 21 | vhdl->set_body(test_name + " <= '1' when true"); |
---|
[42] | 22 | |
---|
[41] | 23 | // set all condition |
---|
| 24 | if (_list_signal->empty()== false) |
---|
| 25 | { |
---|
| 26 | list<Signal*>::iterator i = _list_signal->begin(); |
---|
| 27 | |
---|
| 28 | while (i != _list_signal->end()) |
---|
| 29 | { |
---|
| 30 | (*i)->testbench_test_ok(vhdl); |
---|
| 31 | ++i; |
---|
| 32 | } |
---|
| 33 | } |
---|
[42] | 34 | vhdl->set_body("\telse '0';"); |
---|
[41] | 35 | vhdl->set_body(""); |
---|
| 36 | |
---|
| 37 | log_printf(FUNC,Behavioural,"testbench_test_ok","End"); |
---|
| 38 | |
---|
| 39 | return test_name; |
---|
| 40 | }; |
---|
| 41 | |
---|
| 42 | }; // end namespace behavioural |
---|
| 43 | }; // end namespace morpheo |
---|
| 44 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.