#ifdef VHDL_TESTBENCH #ifdef VHDL_TESTBENCH_ASSERT /* * $Id: Interface_fifo_testbench_assert.cpp 88 2008-12-10 18:31:39Z rosiere $ * * [ Description ] * */ #include "Behavioural/include/Interface_fifo.h" namespace morpheo { namespace behavioural { #undef FUNCTION #define FUNCTION "Interface_fifo::testbench_assert" void Interface_fifo::testbench_assert (Vhdl * & vhdl, std::string counter_name) { log_printf(FUNC,Behavioural,FUNCTION,"Begin"); if (not _test_exhaustive) if (_list_cycle->empty()== false) { std::string test_name = Interface::testbench_test_name(vhdl); vhdl->set_body(""); vhdl->set_body("-- Interface \""+_name+"\""); vhdl->set_body(""); uint32_t j = 0; std::list::iterator i = _list_cycle->begin(); while (i != _list_cycle->end()) { vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK *****\" severity NOTE;"); vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity NOTE;"); j++; ++i; } vhdl->set_body(""); } log_printf(FUNC,Behavioural,FUNCTION,"End"); }; }; // end namespace behavioural }; // end namespace morpheo #endif #endif