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

Last change on this file since 41 was 41, checked in by rosiere, 17 years ago

Vhdl_Testbench : Modification du testbench. Maintenant complétement encapsuler dans la classe "Interfaces".
Suppression de la class Vhdl_Testbench dans un avenir proche :D
Suppression du répertoire Configuration.old

File size: 2.0 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.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#ifdef POSITION
22    _position   = new Position ();
23
24    Entity * entity = _position->set_entity (_name                  ,
25                                             "Select_Priority_Fixed",
26                                             COMBINATORY            );
27   
28    _interfaces = entity->set_interfaces();
29#else
30    _interfaces = new Interfaces();
31#endif
32
33    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
35    Interface_fifo * interface_ = _interfaces->set_interface("", IN  ,WEST, "Generalist interface");
36
37     in_CLOCK        = interface_->set_signal_clk              ("clock" ,1, CLOCK_VHDL_NO);
38     in_NRESET       = interface_->set_signal_in  <Tcontrol_t> ("nreset",1);
39     in_VAL          = new SC_IN (Tcontrol_t)           * [_param._nb_entity];
40    if (_param._encoding_one_hot)
41    out_ACK          = new SC_OUT(Tcontrol_t)           * [_param._nb_entity];
42
43    for (uint32_t i=0; i<_param._nb_entity; i++)
44      {
45         in_VAL [i]    = interface_->set_signal_in  <Tcontrol_t> ("val_"+toString(i),1);
46        if (_param._encoding_one_hot)
47        out_ACK [i]    = interface_->set_signal_out <Tcontrol_t> ("ack_"+toString(i),1);
48      }
49
50    if (_param._encoding_compact)
51      {
52        out_ENTITY     = interface_->set_signal_out <Tentity_t > ("entity"    , _param._size_entity);
53        out_ENTITY_ACK = interface_->set_signal_out <Tcontrol_t> ("entity_ack", 1);
54      }
55
56    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
57
58#ifdef POSITION
59    _position->generate_file();
60#endif
61
62    log_printf(FUNC,Select_Priority_Fixed,"allocation","End");
63  };
64
65}; // end namespace select_priority_fixed
66}; // end namespace select
67}; // end namespace generic
68}; // end namespace behavioural
69}; // end namespace morpheo             
70#endif
Note: See TracBrowser for help on using the repository browser.