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 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace 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.