Ignore:
Timestamp:
Mar 6, 2007, 3:34:04 PM (18 years ago)
Author:
kane
Message:

1) Ajout d'un "printer" XML pour la configuration de paramètres

2) Fin du composant "Two_Level_Branch_Predictor"

validation * systemc

  • vhdl
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
Files:
4 edited

Legend:

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

    r2 r3  
    2121    for (uint32_t i=0; i<_param._nb_port; i++)
    2222      {
    23         Tdata_t data = PORT_READ(in_COUNTER_DATA [i]);
     23        Tcontrol_t addsub  = PORT_READ(in_COUNTER_ADDSUB [i]);
     24        Tdata_t    data_in = PORT_READ(in_COUNTER_DATA   [i]);
     25        Tdata_t    data_out= data_in;
     26        log_printf(TRACE,Counter,"genMealy","before : %d %s = %d",data_in,((addsub==1)?"++":"--"),data_out);
    2427
    2528        // Staturate counter
    26         if (PORT_READ(in_COUNTER_ADDSUB [i]) == 1)
     29        if (addsub == 1)
    2730          {
    28             if (data < _param._data_max)
    29               data ++;
     31            if (data_out < _param._data_max)
     32              data_out++;
    3033          }
    3134        else
    3235          {
    33             if (data > 0)
    34               data --;
     36            if (data_out > 0)
     37              data_out--;
    3538          }
    3639
    37         PORT_WRITE(out_COUNTER_DATA[i], data);
     40        log_printf(TRACE,Counter,"genMealy","after   : %d %s = %d",data_in,((addsub==1)?"++":"--"),data_out);
     41   
     42        PORT_WRITE(out_COUNTER_DATA[i], data_out);
    3843      }
    3944
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters_print.cpp

    r2 r3  
    77
    88#include "Behavioural/Generic/Counter/include/Parameters.h"
    9 #include <sstream>
     9#include "Behavioural/include/XML.h"
    1010using namespace std;
    1111
     
    2020    log_printf(FUNC,Counter,"print","Begin");
    2121
    22     string tab = string(depth,'\t');
    23     ostringstream msg;
    24     msg << tab << "<counter>" << endl
    25         << tab << "\t<size_data value=\"" << _size_data << "\" />" << endl
    26         << tab << "\t<nb_port   value=\"" << _nb_port   << "\" />" << endl
    27         << tab << "</counter>" << endl;
     22    XML xml ("counter");
     23
     24    xml.balise_open("counter");
     25    xml.  singleton_begin("size_data");
     26    xml.    attribut("value",toString(_size_data));
     27    xml.  singleton_end();
     28    xml.  singleton_begin("nb_port  ");
     29    xml.    attribut("value",toString(_nb_port));
     30    xml.  singleton_end();
     31    xml.balise_close();
    2832
    2933    log_printf(FUNC,Counter,"print","End");
    3034   
    31     return msg.str();
     35    return xml.get_body(depth);
    3236  };
    3337
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_genMealy_read.cpp

    r2 r3  
    2727        if ( PORT_READ(in_READ_ENABLE[i]) == 1)
    2828          {
    29             log_printf(TRACE,Register_File,"genMealy_read","Read  [%d] : Have transaction, Reg[%d] -> %x",i,PORT_READ(in_READ_ADDRESS[i]),REGISTER_READ(reg_DATA[PORT_READ(in_READ_ADDRESS[i])]));
     29            Taddress_t address = PORT_READ(in_READ_ADDRESS[i]);
     30            Tdata_t    data    = REGISTER_READ(reg_DATA[address]);
     31
     32            log_printf(TRACE,Register_File,"genMealy_read","[%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
     33
    3034#ifdef STATISTICS
    3135            _stat_nb_read ++;
    3236#endif   
    3337            // Write in registerFile
    34             PORT_WRITE(out_READ_DATA[i],REGISTER_READ(reg_DATA[PORT_READ(in_READ_ADDRESS[i])]));
     38            PORT_WRITE(out_READ_DATA[i],data);
    3539          }
    3640        else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_transition.cpp

    r2 r3  
    2626        if ( PORT_READ(in_WRITE_ENABLE[i]) == true)
    2727          {
    28             log_printf(TRACE,Register_File,"transition","Write [%d] : Have transaction, Reg[%d] <- %x",i,PORT_READ(in_WRITE_ADDRESS[i]),PORT_READ(in_WRITE_DATA   [i]));
    29            
    3028#ifdef STATISTICS
    3129            _stat_nb_write ++;
     
    3533            Tdata_t    data    = PORT_READ(in_WRITE_DATA   [i]);
    3634           
     35            log_printf(TRACE,Register_File,"transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
     36
    3737            // Write in registerFile
    3838            REGISTER_WRITE(reg_DATA[address],data);
Note: See TracChangeset for help on using the changeset viewer.