Ignore:
Timestamp:
Sep 28, 2007, 2:58:08 PM (17 years ago)
Author:
rosiere
Message:
  • VHDL - RegisterFile_Multi_Banked (only partial_crossbar)
  • SystemC - modif Component, interface and co -> ajout du type Tusage_T pour instancier un coposant mais ne demander que le VHDL ou le systemC.
  • Séminaire interne
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h

    r44 r57  
    2525#include "Common/include/ErrorMorpheo.h"
    2626#include "Common/include/Debug.h"
     27#include "Behavioural/include/Usage.h"
    2728
    2829using namespace std;
     
    3839  protected : const direction_t     _direction    ;
    3940  protected : const localisation_t  _localisation ;
     41#endif
     42  protected : const Tusage_t        _usage;
     43
     44#ifdef POSITION
    4045  protected :       string          _comment      ;
    4146#endif
     
    5964                                                          ,localisation_t localisation
    6065#endif
     66                                                          ,Tusage_t       usage=USE_ALL
    6167                                                          );
    6268
     
    97103
    98104      Signal    * sig  = set_signal (name, IN , size, presence_port);
    99       sc_in_clk * port = new sc_in_clk (sig->_name.c_str());
    100 
    101       sig->alloc<bool> (static_cast<void *>(port));
     105      sc_in_clk * port;
     106
     107      if (_usage & USE_SYSTEMC)
     108        {
     109          port = new sc_in_clk (sig->_name.c_str());
     110          sig->alloc<bool> (static_cast<void *>(port));
     111        }
     112      else
     113        {
     114          port = NULL;
     115        }
    102116
    103117      log_printf(FUNC,Behavioural,"set_signal_clk","End");
     
    118132
    119133      Signal    * sig  = set_signal (name, IN , size, presence_port);
    120       sc_in <T> * port = new sc_in <T> (sig->_name.c_str());
    121 
    122       sig->alloc<T> (static_cast<void *>(port));
     134      sc_in <T> * port;
     135
     136      if (_usage & USE_SYSTEMC)
     137        {
     138          port = new sc_in <T> (sig->_name.c_str());
     139          sig->alloc<T> (static_cast<void *>(port));
     140        }
     141      else
     142        {
     143          port = NULL;
     144        }
    123145
    124146      log_printf(FUNC,Behavioural,"set_signal_in","End");
     
    139161
    140162      Signal * sig = set_signal (name, OUT , size, presence_port);
    141       sc_out <T> * port = new sc_out <T> (sig->_name.c_str());
    142 
    143       sig->alloc<T> (static_cast<void *>(port));
     163      sc_out <T> * port;
     164
     165      if (_usage & USE_SYSTEMC)
     166        {
     167          port = new sc_out <T> (sig->_name.c_str());
     168          sig->alloc<T> (static_cast<void *>(port));
     169        }
     170      else
     171        {
     172          port = NULL;
     173        }
    144174
    145175      log_printf(FUNC,Behavioural,"set_signal_out","End");
     
    155185
    156186      Signal * sig = set_signal (name, INTERNAL , size, PORT_VHDL_NO_TESTBENCH_NO);
    157       sc_signal <T> * port = new sc_signal <T> (sig->_name.c_str());
    158 
    159       sig->alloc<T> (static_cast<void *>(port));
     187      sc_signal <T> * port;
     188
     189      if (_usage & USE_SYSTEMC)
     190        {
     191          port = new sc_signal <T> (sig->_name.c_str());
     192          sig->alloc<T> (static_cast<void *>(port));
     193        }
     194      else
     195        {
     196          port = NULL;
     197        }
    160198
    161199      log_printf(FUNC,Behavioural,"set_signal_internal","End");
Note: See TracChangeset for help on using the changeset viewer.