source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp @ 112

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

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1/*
2 * $Id: Select_Priority_Fixed_allocation.cpp 112 2009-03-18 22:36:26Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo{
12namespace behavioural {
13namespace generic {
14namespace select {
15namespace select_priority_fixed {
16
17  void Select_Priority_Fixed::allocation (void)
18  {
19    log_printf(FUNC,Select_Priority_Fixed,"allocation","Begin");
20
21    _component   = new Component (_usage);
22
23    Entity * entity = _component->set_entity (_name                 
24                                             ,"Select_Priority_Fixed"
25#ifdef POSITION
26                                             ,COMBINATORY           
27#endif
28                                              );
29   
30    _interfaces = entity->set_interfaces();
31
32    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
34    Interface_fifo * interface = _interfaces->set_interface(""
35#ifdef POSITION
36                                                            ,IN 
37                                                            ,WEST
38                                                            ,_("Generalist interface")
39#endif
40                                                            );
41
42     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_NO);
43     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_NO);
44     
45     {
46       ALLOC1_INTERFACE_BEGIN("",IN,SOUTH,_("select interface"),_param->_nb_entity);
47
48       ALLOC1_SIGNAL_IN ( in_VAL       ,"val"       ,Tcontrol_t,1);
49       if (_param->_encoding_one_hot)
50       ALLOC1_SIGNAL_OUT(out_ACK       ,"ack"       ,Tcontrol_t,1);
51
52       ALLOC1_INTERFACE_END(_param->_nb_entity);
53     }
54
55     if (_param->_encoding_compact)
56     {
57       ALLOC0_INTERFACE_BEGIN("",OUT,SOUTH,_("select interface"));
58
59       ALLOC0_SIGNAL_OUT(out_ENTITY    ,"entity"    ,Tentity_t ,_param->_size_entity);
60       ALLOC0_SIGNAL_OUT(out_ENTITY_ACK,"entity_ack",Tcontrol_t,1);
61
62       ALLOC0_INTERFACE_END();
63     }
64
65    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
66
67#ifdef POSITION
68    if (usage_is_set(_usage,USE_POSITION))
69      _component->generate_file();
70#endif
71
72    log_printf(FUNC,Select_Priority_Fixed,"allocation","End");
73  };
74
75}; // end namespace select_priority_fixed
76}; // end namespace select
77}; // end namespace generic
78}; // end namespace behavioural
79}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.