source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp @ 113

Last change on this file since 113 was 113, checked in by rosiere, 15 years ago

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

  • Property svn:keywords set to Id
File size: 1.8 KB
RevLine 
[2]1/*
2 * $Id: Counter_allocation.cpp 113 2009-04-14 18:39:12Z rosiere $
3 *
[88]4 * [ Description ]
[2]5 *
6 */
7
8#include "Behavioural/Generic/Counter/include/Counter.h"
[112]9#include "Behavioural/include/Allocation.h"
[2]10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace counter {
15
16  void Counter::allocation (void)
17  {
18    log_printf(FUNC,Counter,"allocation","Begin");
19
[82]20    _component   = new Component (_usage);
[42]21
22    Entity * entity = _component->set_entity (_name     
[113]23                                             ,_param->_type
[42]24#ifdef POSITION
25                                             ,COMBINATORY
[2]26#endif
[42]27                                              );
[2]28   
[42]29    _interfaces = entity->set_interfaces();
[2]30
[88]31    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[42]32    {
33      Interface * interface = _interfaces->set_interface(""
34#ifdef POSITION
35                                                         , IN 
36                                                         , SOUTH
[112]37                                                         , _("Generalist interface")
[42]38#endif
39                                                         );
40     
41      in_CLOCK              = interface->set_signal_clk              ("clock" ,1,CLOCK_VHDL_NO);
42      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_NO);
43    }
[2]44
[88]45    // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[112]46    {
[113]47      ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param->_nb_port);
[42]48           
[113]49      ALLOC1_SIGNAL_IN ( in_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param->_size_data);
[112]50      ALLOC1_SIGNAL_IN ( in_COUNTER_ADDSUB,"addsub",Tcontrol_t,1                );
[113]51      ALLOC1_SIGNAL_OUT(out_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param->_size_data);
[88]52
[113]53      ALLOC1_INTERFACE_END(_param->_nb_port);
[112]54    }
55   
[42]56#ifdef POSITION
[88]57     if (usage_is_set(_usage,USE_POSITION))
58       _component->generate_file();
[42]59#endif
[2]60
[88]61    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
[2]62    log_printf(FUNC,Counter,"allocation","End");
63  };
64
65}; // end namespace counter
66}; // end namespace generic
67
68}; // end namespace behavioural
69}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.