Ignore:
Timestamp:
Dec 8, 2007, 5:12:36 PM (17 years ago)
Author:
rosiere
Message:

read_queue : systemC et vhdl ok !
queue : quelques petits modif pour avoir une queue de taille 1
nettoyage des fichiers *mkf*

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
Files:
1 added
8 deleted
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp

    r67 r68  
    4242
    4343#ifdef STATISTICS
    44     log_printf(INFO,Queue,FUNCTION,"Allocation of statistics");
    45 
    46     // Allocation of statistics
    47     _stat = new Statistics (static_cast<string>(_name),
    48                             param_statistics          ,
    49                             param);
     44    if (_usage & USE_STATISTICS)
     45      {
     46        log_printf(INFO,Queue,FUNCTION,"Allocation of statistics");
     47       
     48        // Allocation of statistics
     49        _stat = new Statistics (static_cast<string>(_name),
     50                                param_statistics          ,
     51                                param);
     52      }
    5053#endif
    5154
    5255#ifdef VHDL
    53     // generate the vhdl
    54     log_printf(INFO,Queue,FUNCTION,"Generate the vhdl");
    55 
    56     vhdl();
     56    if (_usage & USE_VHDL)
     57      {
     58        // generate the vhdl
     59        log_printf(INFO,Queue,FUNCTION,"Generate the vhdl");
     60       
     61        vhdl();
     62      }
    5763#endif
    5864
    5965#ifdef SYSTEMC
    60 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    61     log_printf(INFO,Queue,FUNCTION,"Method - transition");
    62 
    63     SC_METHOD (transition);
    64     dont_initialize ();
    65     sensitive << (*(in_CLOCK)).pos();
    66 //#endif
    67 
     66    if (_usage & USE_SYSTEMC)
     67      {
     68        log_printf(INFO,Queue,FUNCTION,"Method - transition");
     69       
     70        SC_METHOD (transition);
     71        dont_initialize ();
     72        sensitive << (*(in_CLOCK)).pos();
     73       
    6874# ifdef SYSTEMCASS_SPECIFIC
    69     // List dependency information
     75        // List dependency information
    7076# endif   
    71 
    72     log_printf(INFO,Queue,FUNCTION,"Method - genMoore");
    73 
    74     SC_METHOD (genMoore);
    75     dont_initialize ();
    76     sensitive << (*(in_CLOCK)).neg();
    77 
     77       
     78        log_printf(INFO,Queue,FUNCTION,"Method - genMoore");
     79       
     80        SC_METHOD (genMoore);
     81        dont_initialize ();
     82        sensitive << (*(in_CLOCK)).neg();
     83       
    7884# ifdef SYSTEMCASS_SPECIFIC
    79     // List dependency information
     85        // List dependency information
    8086# endif   
    81 
     87       
    8288#endif
     89      }
    8390    log_printf(FUNC,Queue,FUNCTION,"End");
    8491  };
     
    9198
    9299#ifdef STATISTICS
    93     log_printf(INFO,Queue,FUNCTION,"Generate Statistics file");
    94 
    95     _stat->generate_file(statistics(0));
    96     delete _stat;
     100    if (_usage & USE_STATISTICS)
     101      {
     102        log_printf(INFO,Queue,FUNCTION,"Generate Statistics file");
     103       
     104        _stat->generate_file(statistics(0));
     105        delete _stat;
     106      }
    97107#endif
    98108
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp

    r67 r68  
    2323    log_printf(FUNC,Queue,FUNCTION,"Begin");
    2424
    25     _component   = new Component ();
     25    _component   = new Component (_usage);
    2626
    2727    Entity * entity = _component->set_entity (_name       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp

    r67 r68  
    2020    log_printf(FUNC,Queue,FUNCTION,"Begin");
    2121
    22     delete    in_CLOCK ;
    23     delete    in_NRESET;
    24 
    25     delete    in_INSERT_VAL ;
    26     delete   out_INSERT_ACK ;
    27     delete    in_INSERT_DATA;
    28 
    29     delete   out_RETIRE_VAL ;
    30     delete    in_RETIRE_ACK ;
    31     delete   out_RETIRE_DATA;
    32 
     22    if (_usage & USE_SYSTEMC)
     23      {
     24        delete    in_CLOCK ;
     25        delete    in_NRESET;
     26       
     27        delete    in_INSERT_VAL ;
     28        delete   out_INSERT_ACK ;
     29        delete    in_INSERT_DATA;
     30       
     31        delete   out_RETIRE_VAL ;
     32        delete    in_RETIRE_ACK ;
     33        delete   out_RETIRE_DATA;
     34       
     35      }
    3336    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    3437    delete _queue_control;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_vhdl_body.cpp

    r67 r68  
    6262        if (is_log2(_param->_size_queue) == false)
    6363          vhdl->set_body ("\tconst_PTR_INIT when reg_PTR_READ  = const_PTR_MAX else");
    64         vhdl->set_body ("\treg_PTR_READ +'1';");
     64
     65        if (_param->_size_queue > 2)
     66          vhdl->set_body ("\treg_PTR_READ +'1';");
     67        else
     68          vhdl->set_body ("\tnot reg_PTR_READ;");
    6569      }
    6670    vhdl->set_body ("");
     
    7377        if (is_log2(_param->_size_queue) == false)
    7478          vhdl->set_body ("\tconst_PTR_INIT when reg_PTR_WRITE = const_PTR_MAX else");
    75         vhdl->set_body ("\treg_PTR_WRITE+'1';");
     79        if (_param->_size_queue > 2)
     80          vhdl->set_body ("\treg_PTR_WRITE+'1';");
     81        else
     82          vhdl->set_body ("\tnot reg_PTR_WRITE;");
    7683      }
    7784    vhdl->set_body ("");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed.cpp

    r58 r68  
    4040
    4141#ifdef STATISTICS
    42     log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Allocation of statistics");
    43 
    44     // Allocation of statistics
    45     _stat = new Statistics (static_cast<string>(_name),
    46                             param_statistics          ,
    47                             param);
     42    if (_usage & USE_STATISTICS)
     43      {
     44        log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Allocation of statistics");
     45       
     46        // Allocation of statistics
     47        _stat = new Statistics (static_cast<string>(_name),
     48                                param_statistics          ,
     49                                param);
     50      }
    4851#endif
    4952
Note: See TracChangeset for help on using the changeset viewer.