Last change
on this file since 61 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.3 KB
|
Rev | Line | |
---|
[41] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/include/Interfaces.h" |
---|
| 10 | #include "Behavioural/include/Entity.h" |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | |
---|
| 15 | string Interfaces::testbench_body (Vhdl * & vhdl, |
---|
[42] | 16 | string counter_name, |
---|
| 17 | string reset_name ) |
---|
[41] | 18 | { |
---|
| 19 | log_printf(FUNC,Behavioural,"testbench_body","Begin"); |
---|
| 20 | |
---|
| 21 | string test = "'1'"; |
---|
| 22 | string test_name = "test"; |
---|
| 23 | vhdl->set_signal(test_name,1); |
---|
| 24 | |
---|
| 25 | if (_list_interface->empty()== false) |
---|
| 26 | { |
---|
| 27 | list<Interface_fifo*>::iterator i = _list_interface->begin(); |
---|
| 28 | |
---|
| 29 | while (i != _list_interface->end()) |
---|
| 30 | { |
---|
[42] | 31 | (*i)->testbench_body(vhdl, counter_name, reset_name); |
---|
| 32 | string str = (*i)->testbench_test(vhdl, counter_name, reset_name); |
---|
[41] | 33 | |
---|
| 34 | test += " and "+str; |
---|
| 35 | ++i; |
---|
| 36 | } |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | vhdl->set_body(""); |
---|
| 40 | vhdl->set_body("------------------------------------------------------"); |
---|
| 41 | vhdl->set_body("-- Test"); |
---|
| 42 | vhdl->set_body("------------------------------------------------------"); |
---|
| 43 | vhdl->set_body(""); |
---|
| 44 | vhdl->set_body(test_name + " <= "+test+";"); |
---|
| 45 | vhdl->set_body(""); |
---|
| 46 | |
---|
| 47 | log_printf(FUNC,Behavioural,"testbench_body","End"); |
---|
| 48 | |
---|
| 49 | return test_name; |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | }; // end namespace behavioural |
---|
| 53 | }; // end namespace morpheo |
---|
| 54 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.