source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_instance.cpp @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 754 bytes
Line 
1#ifdef VHDL_TESTBENCH
2
3/*
4 * $Id$
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/include/Vhdl_Testbench.h"
11
12namespace morpheo              {
13namespace behavioural          {
14
15  void Vhdl_Testbench::generate_instance (void)
16  {
17    _vhdl->set_body("");
18    _vhdl->set_body("instance_"+_name+" : "+_name);
19    _vhdl->set_body("port map (");
20   
21    list<string>::iterator i   = _list_port.begin();
22    if (i != _list_port.end())
23      {
24        _vhdl->set_body("\t "+*i+"\t=>\t"+*i);
25        ++i;
26      }
27    while (i != _list_port.end())
28      {
29        _vhdl->set_body("\t,"+*i+"\t=>\t"+*i);
30        ++i;
31      }
32    _vhdl->set_body("         );");
33  };
34
35}; // end namespace behavioural         
36}; // end namespace morpheo             
37
38#endif
Note: See TracBrowser for help on using the repository browser.