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
RevLine 
[10]1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
[15]9#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
[10]10
[31]11namespace morpheo{
[10]12namespace behavioural {
13namespace generic {
14namespace select {
[15]15namespace select_priority_fixed {
[10]16
[15]17  void Select_Priority_Fixed::allocation (void)
[10]18  {
[15]19    log_printf(FUNC,Select_Priority_Fixed,"allocation","Begin");
[10]20
[31]21#ifdef POSITION
22    _position   = new Position ();
[15]23
[31]24    Entity * entity = _position->set_entity (_name                  ,
25                                             "Select_Priority_Fixed",
26                                             COMBINATORY            );
[41]27   
[31]28    _interfaces = entity->set_interfaces();
29#else
30    _interfaces = new Interfaces();
31#endif
32
[29]33    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
[40]35    Interface_fifo * interface_ = _interfaces->set_interface("", IN  ,WEST, "Generalist interface");
[31]36
[41]37     in_CLOCK        = interface_->set_signal_clk              ("clock" ,1, CLOCK_VHDL_NO);
[31]38     in_NRESET       = interface_->set_signal_in  <Tcontrol_t> ("nreset",1);
[10]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      {
[31]45         in_VAL [i]    = interface_->set_signal_in  <Tcontrol_t> ("val_"+toString(i),1);
[10]46        if (_param._encoding_one_hot)
[31]47        out_ACK [i]    = interface_->set_signal_out <Tcontrol_t> ("ack_"+toString(i),1);
[10]48      }
49
50    if (_param._encoding_compact)
51      {
[31]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);
[10]54      }
[29]55
[10]56    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
57
[31]58#ifdef POSITION
59    _position->generate_file();
60#endif
61
[15]62    log_printf(FUNC,Select_Priority_Fixed,"allocation","End");
[10]63  };
64
[15]65}; // end namespace select_priority_fixed
[10]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.