source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_vhdl.cpp @ 116

Last change on this file since 116 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: 2.2 KB
Line 
1#ifdef VHDL
2/*
3 * $Id: Functionnal_unit_vhdl.cpp 116 2009-04-30 13:51:41Z moulu $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h"
10#include "Behavioural/include/Vhdl.h"
11#include "Behavioural/Generic/Shifter/include/Shifter.h"
12
13namespace morpheo                    {
14namespace behavioural {
15namespace core {
16namespace multi_execute_loop {
17namespace execute_loop {
18namespace multi_execute_unit {
19namespace execute_unit {
20namespace functionnal_unit {
21
22
23#undef  FUNCTION
24#define FUNCTION "Functionnal_unit::vhdl"
25  void Functionnal_unit::vhdl (void)
26  {
27    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
28
29    morpheo::behavioural::generic::shifter::Parameters * param_shifter;
30   
31    param_shifter = new morpheo::behavioural::generic::shifter::Parameters
32      (
33       _param->_size_general_data,     // size_data
34       1,                     // nb_port
35       0,                     // shift_value
36       generic::shifter::external_rotate,       // rotate
37       generic::shifter::external_direction,    // direction
38       generic::shifter::external_carry,         // carry
39       false                 // type_completion_bool
40       );
41 
42    morpheo::behavioural::generic::shifter::Shifter      * shifter;
43
44    std::string shifter_name = _name + "_shifter";
45    shifter = new morpheo::behavioural::generic::shifter::Shifter
46      (shifter_name.c_str()
47#ifdef STATISTICS
48       ,NULL
49#endif
50       ,param_shifter
51       ,USE_VHDL);
52   
53    _component->set_component(shifter->_component
54#ifdef POSITION
55                              , 50, 50, 50, 50
56#endif
57                              , INSTANCE_LIBRARY
58                              );
59
60    Vhdl * vhdl = new Vhdl (_name);
61
62    _interfaces->set_port(vhdl);
63    _component->vhdl_instance(vhdl);
64
65    vhdl_declaration (vhdl);
66    vhdl_body        (vhdl);
67
68    vhdl->generate_file();
69
70    delete vhdl;
71
72    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
73  };
74
75}; // end namespace functionnal_unit
76}; // end namespace execute_unit
77}; // end namespace multi_execute_unit
78}; // end namespace execute_loop
79}; // end namespace multi_execute_loop
80}; // end namespace core
81
82}; // end namespace behavioural
83}; // end namespace morpheo             
84#endif
Note: See TracBrowser for help on using the repository browser.