Ignore:
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

    r29 r15  
    99#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
    1010
    11 namespace morpheo {
     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
     17namespace morpheo                    {
    1218namespace behavioural {
    1319namespace generic {
     
    1521namespace select_priority_fixed {
    1622
    17   void Select_Priority_Fixed::vhdl_port (Vhdl * & vhdl)
     23
     24  void Select_Priority_Fixed::vhdl_port (Vhdl & vhdl)
    1825  {
    1926    log_printf(FUNC,Select_Priority_Fixed,"vhdl_port","Begin");
    2027
    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");
     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");
    3043  };
    3144
Note: See TracChangeset for help on using the changeset viewer.