source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_body.cpp @ 41

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