Last change
on this file since 41 was
41,
checked in by rosiere, 17 years ago
|
Vhdl_Testbench : Modification du testbench. Maintenant complétement encapsuler dans la classe "Interfaces".
Suppression de la class Vhdl_Testbench dans un avenir proche :D
Suppression du répertoire Configuration.old
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifdef VHDL_TESTBENCH |
---|
2 | /* |
---|
3 | * $Id$ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/include/Interface_fifo.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | |
---|
14 | string Interface_fifo::testbench_test (Vhdl * & vhdl, |
---|
15 | string counter_name) |
---|
16 | { |
---|
17 | log_printf(FUNC,Behavioural,"testbench_test","Begin"); |
---|
18 | string test_name; |
---|
19 | |
---|
20 | if (_test_exhaustive == true) |
---|
21 | test_name = Interface::testbench_test(vhdl,counter_name); |
---|
22 | else |
---|
23 | { |
---|
24 | vhdl->set_body(""); |
---|
25 | vhdl->set_body("-- Test partial"); |
---|
26 | vhdl->set_body(""); |
---|
27 | |
---|
28 | test_name = testbench_test_name (vhdl); |
---|
29 | string test_name_ok = testbench_test_ok (vhdl); |
---|
30 | |
---|
31 | if (_list_cycle->empty()== false) |
---|
32 | { |
---|
33 | vhdl->set_body ("with "+counter_name+" select"); |
---|
34 | vhdl->set_body ("\t"+test_name+" <="); |
---|
35 | |
---|
36 | list<uint32_t>::iterator i = _list_cycle->begin(); |
---|
37 | |
---|
38 | while (i != _list_cycle->end()) |
---|
39 | { |
---|
40 | vhdl->set_body ("\t"+test_name_ok+" when "+toString(*i)+","); |
---|
41 | ++i; |
---|
42 | } |
---|
43 | vhdl->set_body ("\t'1' when others;"); |
---|
44 | } |
---|
45 | } |
---|
46 | |
---|
47 | log_printf(FUNC,Behavioural,"testbench_test","End"); |
---|
48 | |
---|
49 | return test_name; |
---|
50 | |
---|
51 | }; |
---|
52 | |
---|
53 | }; // end namespace behavioural |
---|
54 | }; // end namespace morpheo |
---|
55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.