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.4 KB
|
Rev | Line | |
---|
[2] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | * $Id$ |
---|
| 5 | * |
---|
| 6 | * [ Description ] |
---|
| 7 | * |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #include "Behavioural/include/Vhdl_Testbench.h" |
---|
| 11 | #include "Include/ErrorMorpheo.h" |
---|
| 12 | |
---|
| 13 | namespace morpheo { |
---|
| 14 | namespace behavioural { |
---|
| 15 | |
---|
[41] | 16 | // void Vhdl_Testbench::generate_file (void) |
---|
| 17 | // { |
---|
| 18 | // _vhdl->set_library_work (_name + "_Pack"); |
---|
[2] | 19 | |
---|
[41] | 20 | // if (_size_input == 0) |
---|
| 21 | // throw (ErrorMorpheo ("No input for the test bench.")); |
---|
| 22 | // if (_size_output == 0) |
---|
| 23 | // throw (ErrorMorpheo ("No output for the test bench.")); |
---|
[2] | 24 | |
---|
[41] | 25 | // // Only 2 signals and a variable |
---|
| 26 | // _vhdl->set_signal ("testbench_input" ,std_logic(_size_input )); |
---|
| 27 | // _vhdl->set_signal ("testbench_output" ,std_logic(_size_output)); |
---|
| 28 | // _vhdl->set_signal ("testbench_test" ,std_logic(_size_output)); |
---|
| 29 | // _vhdl->set_signal ("testbench_must_test" ,std_logic(1)); |
---|
| 30 | // _vhdl->set_signal ("testbench_counter" ,"natural","0"); |
---|
[2] | 31 | |
---|
[41] | 32 | // uint32_t counter = get_input (); |
---|
| 33 | // get_output (); |
---|
| 34 | // get_test (); |
---|
| 35 | // get_label (); |
---|
[2] | 36 | |
---|
[41] | 37 | // // if (counter == get_output ()) |
---|
| 38 | // // throw (ErrorMorpheo ("The number of input is different of number of output.")); |
---|
[2] | 39 | |
---|
[41] | 40 | // generate_instance (); |
---|
| 41 | // generate_process_clock (counter); |
---|
[2] | 42 | |
---|
[41] | 43 | // _vhdl->generate_file(false, true); |
---|
| 44 | // }; |
---|
[2] | 45 | |
---|
| 46 | }; // end namespace behavioural |
---|
| 47 | }; // end namespace morpheo |
---|
| 48 | |
---|
| 49 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.