Last change
on this file since 76 was
76,
checked in by rosiere, 16 years ago
|
Add new component : Read_unit (no tested)
Change functionnal_unit : now use type and operation to execute the good function
Change New_Component's script
|
File size:
1.4 KB
|
Rev | Line | |
---|
[76] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/@DIRECTORY/include/@COMPONENT.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | @NAMESPACE_BEGIN |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | #undef FUNCTION |
---|
| 17 | #define FUNCTION "@COMPONENT::allocation" |
---|
| 18 | void @COMPONENT::allocation ( |
---|
| 19 | #ifdef STATISTICS |
---|
| 20 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 21 | #else |
---|
| 22 | void |
---|
| 23 | #endif |
---|
| 24 | ) |
---|
| 25 | { |
---|
| 26 | log_printf(FUNC,@COMPONENT,FUNCTION,"Begin"); |
---|
| 27 | |
---|
| 28 | _component = new Component (_usage); |
---|
| 29 | |
---|
| 30 | Entity * entity = _component->set_entity (_name |
---|
| 31 | ,"@COMPONENT" |
---|
| 32 | #ifdef POSITION |
---|
| 33 | ,COMBINATORY |
---|
| 34 | #endif |
---|
| 35 | ); |
---|
| 36 | |
---|
| 37 | _interfaces = entity->set_interfaces(); |
---|
| 38 | |
---|
| 39 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 40 | |
---|
| 41 | Interface * interface = _interfaces->set_interface("" |
---|
| 42 | #ifdef POSITION |
---|
| 43 | ,IN |
---|
| 44 | ,SOUTH, |
---|
| 45 | "Generalist interface" |
---|
| 46 | #endif |
---|
| 47 | ); |
---|
| 48 | |
---|
| 49 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
| 50 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
| 51 | |
---|
| 52 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 53 | |
---|
| 54 | #ifdef POSITION |
---|
| 55 | _component->generate_file(); |
---|
| 56 | #endif |
---|
| 57 | |
---|
| 58 | log_printf(FUNC,@COMPONENT,FUNCTION,"End"); |
---|
| 59 | }; |
---|
| 60 | |
---|
| 61 | @NAMESPACE_END |
---|
| 62 | }; // end namespace behavioural |
---|
| 63 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.