Ignore:
Timestamp:
May 28, 2007, 10:38:18 PM (17 years ago)
Author:
rosiere
Message:

Class Position qui encapsule la génération des fichiers de positions

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/configuration.cfg

    r29 r31  
    11Select_Priority_Fixed
    2 16      16      *2      # nb_entity
    3 0       0       +1      # encoding_one_hot
     22       16      *2      # nb_entity
     30       1       +1      # encoding_one_hot
    441       1       +1      # encoding_compact
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h

    r29 r31  
    1919#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h"
    2020#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Types.h"
     21#ifdef POSITION
     22#include "Behavioural/include/Position.h"
     23#else
    2124#include "Behavioural/include/Interfaces.h"
     25#endif
    2226
    2327#ifdef STATISTICS
     
    6266#endif
    6367
    64   private   : Interfaces                     * interfaces;
     68#ifdef POSITION
     69  private   : Position                       * _position;
     70#endif
     71
     72  private   : Interfaces                     * _interfaces;
    6573
    6674#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp

    r29 r31  
    99#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
    1010
    11 namespace morpheo                    {
     11namespace morpheo{
    1212namespace behavioural {
    1313namespace generic {
     
    2121    log_printf(FUNC,Select_Priority_Fixed,"allocation","Begin");
    2222
    23     interfaces = new Interfaces;
     23#ifdef POSITION
     24    _position   = new Position ();
     25
     26    Entity * entity = _position->set_entity (_name                  ,
     27                                             "Select_Priority_Fixed",
     28                                             COMBINATORY            );
     29
     30    _interfaces = entity->set_interfaces();
     31#else
     32    _interfaces = new Interfaces();
     33#endif
    2434
    2535    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    26     Interface interface_ ("", IN, WEST);
    27    
    28     in_CLOCK        = interface_.set_signal_clk              ("clock" ,1, PORT_VHDL_YES_TESTBENCH_NO);
    29     in_NRESET       = interface_.set_signal_in  <Tcontrol_t> ("nreset",1);
    3036
     37    Interface * interface_ = _interfaces->set_interface(""  ,
     38                                                        IN  ,
     39                                                        WEST,
     40                                                        "...");
     41
     42     in_CLOCK        = interface_->set_signal_clk              ("clock" ,1, PORT_VHDL_YES_TESTBENCH_NO);
     43     in_NRESET       = interface_->set_signal_in  <Tcontrol_t> ("nreset",1);
    3144     in_VAL          = new SC_IN (Tcontrol_t)           * [_param._nb_entity];
    3245    if (_param._encoding_one_hot)
     
    3548    for (uint32_t i=0; i<_param._nb_entity; i++)
    3649      {
    37          in_VAL [i]    = interface_.set_signal_in  <Tcontrol_t> ("val_"+toString(i),1);
     50         in_VAL [i]    = interface_->set_signal_in  <Tcontrol_t> ("val_"+toString(i),1);
    3851        if (_param._encoding_one_hot)
    39         out_ACK [i]    = interface_.set_signal_out <Tcontrol_t> ("ack_"+toString(i),1);
     52        out_ACK [i]    = interface_->set_signal_out <Tcontrol_t> ("ack_"+toString(i),1);
    4053      }
    4154
    4255    if (_param._encoding_compact)
    4356      {
    44         out_ENTITY     = interface_.set_signal_out <Tentity_t > ("entity"    , _param._size_entity);
    45         out_ENTITY_ACK = interface_.set_signal_out <Tcontrol_t> ("entity_ack", 1);
     57        out_ENTITY     = interface_->set_signal_out <Tentity_t > ("entity"    , _param._size_entity);
     58        out_ENTITY_ACK = interface_->set_signal_out <Tcontrol_t> ("entity_ack", 1);
    4659      }
    4760
    4861    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     62
     63#ifdef POSITION
     64    _position->generate_file();
     65#endif
    4966
    5067    log_printf(FUNC,Select_Priority_Fixed,"allocation","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp

    r29 r31  
    4040    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    4141
    42     delete interfaces;
    43 
     42#ifdef POSITION
     43    delete _position;
     44#else
     45    delete _interfaces;
     46#endif
    4447    log_printf(FUNC,Select_Priority_Fixed,"deallocation","End");
    4548  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_port.cpp

    r29 r31  
    2020
    2121#ifdef VHDL
    22     interfaces->set_port(vhdl);
     22    _interfaces->set_port(vhdl);
    2323#endif
    2424#ifdef VHDL_TESTBENCH
    25     interfaces->set_port(_vhdl_testbench);                     
     25    _interfaces->set_port(_vhdl_testbench);                     
    2626   _vhdl_testbench->set_clock    ("in_CLOCK",true);
    2727#endif   
Note: See TracChangeset for help on using the changeset viewer.