Ignore:
Timestamp:
May 23, 2007, 6:17:08 PM (17 years ago)
Author:
rosiere
Message:

Changement de classes de gestions des Interfaces.

-> simplification pour les déclarations de ports, application pour le composant Select_Priority_Fixed.
-> !!! essayer de supprimer la redondance dans les fichierx xxx_vhdl_testbench_transition.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_port.cpp

    r15 r29  
    99#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
    1010
    11 #ifdef VHDL_TESTBENCH
    12 # define VHDL_SET_PORT(name,direction,size) do {vhdl.set_port (name,direction,size); _vhdl_testbench->set_port (name,direction,size);} while (0)
    13 #else
    14 # define VHDL_SET_PORT(name,direction,size)     vhdl.set_port (name,direction,size)
    15 #endif
    16 
    17 namespace morpheo                    {
     11namespace morpheo {
    1812namespace behavioural {
    1913namespace generic {
     
    2115namespace select_priority_fixed {
    2216
    23 
    24   void Select_Priority_Fixed::vhdl_port (Vhdl & vhdl)
     17  void Select_Priority_Fixed::vhdl_port (Vhdl * & vhdl)
    2518  {
    2619    log_printf(FUNC,Select_Priority_Fixed,"vhdl_port","Begin");
    2720
    28     vhdl.set_port (" in_CLOCK ", IN, 1);
    29     VHDL_SET_PORT (" in_NRESET", IN, 1);
    30        
    31     for (uint32_t i=0; i<_param._nb_entity; i++)
    32       {
    33         VHDL_SET_PORT (" in_VAL_"+toString(i) , IN, 1);
    34         if (_param._encoding_one_hot)
    35         VHDL_SET_PORT ("out_ACK_"+toString(i) ,OUT, 1);
    36       }
    37     if (_param._encoding_compact)
    38       {
    39     VHDL_SET_PORT ("out_ENTITY    ",OUT,_param._size_entity);
    40     VHDL_SET_PORT ("out_ENTITY_ACK",OUT,1);
    41       }
    42     log_printf(FUNC,Select_Priority_Fixed,"vhdl_port","End");
     21#ifdef VHDL
     22    interfaces->set_port(vhdl);
     23#endif
     24#ifdef VHDL_TESTBENCH
     25    interfaces->set_port(_vhdl_testbench);                     
     26   _vhdl_testbench->set_clock    ("in_CLOCK",true);
     27#endif   
     28
     29   log_printf(FUNC,Select_Priority_Fixed,"vhdl_port","End");
    4330  };
    4431
Note: See TracChangeset for help on using the changeset viewer.