Last change
on this file since 134 was
113,
checked in by rosiere, 15 years ago
|
1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile
|
-
Property svn:keywords set to
Id
|
File size:
1.5 KB
|
Rev | Line | |
---|
[88] | 1 | #ifdef VHDL_TESTBENCH |
---|
| 2 | #ifdef VHDL_TESTBENCH_ASSERT |
---|
| 3 | /* |
---|
| 4 | * $Id: Interface_fifo_testbench_assert.cpp 113 2009-04-14 18:39:12Z rosiere $ |
---|
| 5 | * |
---|
| 6 | * [ Description ] |
---|
| 7 | * |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #include "Behavioural/include/Interface_fifo.h" |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | |
---|
| 15 | #undef FUNCTION |
---|
| 16 | #define FUNCTION "Interface_fifo::testbench_assert" |
---|
| 17 | void Interface_fifo::testbench_assert (Vhdl * & vhdl, |
---|
| 18 | std::string counter_name) |
---|
| 19 | { |
---|
| 20 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 21 | |
---|
| 22 | if (not _test_exhaustive) |
---|
| 23 | if (_list_cycle->empty()== false) |
---|
| 24 | { |
---|
| 25 | std::string test_name = Interface::testbench_test_name(vhdl); |
---|
| 26 | |
---|
| 27 | vhdl->set_body(""); |
---|
| 28 | vhdl->set_body("-- Interface \""+_name+"\""); |
---|
| 29 | vhdl->set_body(""); |
---|
| 30 | |
---|
| 31 | uint32_t j = 0; |
---|
| 32 | std::list<uint32_t>::iterator i = _list_cycle->begin(); |
---|
| 33 | |
---|
| 34 | while (i != _list_cycle->end()) |
---|
| 35 | { |
---|
[113] | 36 | vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK *****\" severity "+toString(VHDL_SEVERITY_NOTE)+";"); |
---|
| 37 | vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity "+toString(VHDL_SEVERITY_NOTE)+";"); |
---|
[88] | 38 | j++; |
---|
| 39 | ++i; |
---|
| 40 | } |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
| 44 | }; |
---|
| 45 | |
---|
| 46 | }; // end namespace behavioural |
---|
| 47 | }; // end namespace morpheo |
---|
| 48 | #endif |
---|
| 49 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.