Last change
on this file since 131 was
116,
checked in by moulu, 15 years ago
|
1) added a generic multiplier (systemC isn't working with 8bits)
2) added a partial functionnal unit vhdl.
|
-
Property svn:keywords set to
Id
|
File size:
949 bytes
|
Rev | Line | |
---|
[112] | 1 | #ifdef VHDL |
---|
| 2 | /* |
---|
| 3 | * $Id: Multiplier_vhdl.cpp 116 2009-04-30 13:51:41Z moulu $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/Multiplier/include/Multiplier.h" |
---|
| 10 | #include "Behavioural/include/Vhdl.h" |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | namespace generic { |
---|
| 15 | namespace multiplier { |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | #undef FUNCTION |
---|
| 19 | #define FUNCTION "Multiplier::vhdl" |
---|
| 20 | void Multiplier::vhdl (void) |
---|
| 21 | { |
---|
| 22 | log_begin(Multiplier,FUNCTION); |
---|
| 23 | |
---|
| 24 | Vhdl * vhdl = new Vhdl (_name); |
---|
| 25 | |
---|
| 26 | _interfaces->set_port(vhdl); |
---|
| 27 | _component->vhdl_instance(vhdl); |
---|
| 28 | |
---|
[116] | 29 | // default architecture |
---|
[112] | 30 | vhdl_declaration (vhdl); |
---|
| 31 | vhdl_body (vhdl); |
---|
| 32 | |
---|
[116] | 33 | // Xilinx architecture |
---|
| 34 | vhdl->set_architecture("xilinx"); |
---|
| 35 | vhdl_xilinx_declaration (vhdl); |
---|
| 36 | vhdl_xilinx_body (vhdl); |
---|
| 37 | |
---|
[112] | 38 | vhdl->generate_file(); |
---|
| 39 | |
---|
| 40 | delete vhdl; |
---|
| 41 | |
---|
| 42 | log_end(Multiplier,FUNCTION); |
---|
| 43 | }; |
---|
| 44 | |
---|
| 45 | }; // end namespace multiplier |
---|
| 46 | }; // end namespace generic |
---|
| 47 | |
---|
| 48 | }; // end namespace behavioural |
---|
| 49 | }; // end namespace morpheo |
---|
| 50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.