Ignore:
Timestamp:
Feb 16, 2009, 9:28:31 PM (15 years ago)
Author:
rosiere
Message:

1) Configuration : instance configuration file : regroup similar instance
2) Configuration : timing default = 0
3) Debug/Commit_unit : Add watch dog timer
4) Issue_queue : Test parameters : add test if type is optionnal
5) Cor_glue : Fix insert index
6) Free_list : remove bank_by_pop (else deadlock)
7) Update Free List : add register to source event

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration
Files:
5 edited

Legend:

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

    r88 r109  
    2525    // Constant
    2626  public   : const std::string _name ;
    27   public   : const std::string _value;
     27  public   :       std::string _value;
    2828  public   :       bool        _use  ;
    2929
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Configuration.cpp

    r100 r109  
    4242    debug_init (fromString<debug_verbosity_t>(_simulator->getParam("debug_level")),
    4343                fromString<double>           (_simulator->getParam("debug_cycle_start")),
    44                 fromString<double>           (_simulator->getParam("debug_cycle_stop")));
     44                fromString<double>           (_simulator->getParam("debug_cycle_stop")),
     45                fromString<double>           (_simulator->getParam("debug_cycle_idle")));
    4546
    4647    log_init(fromString<bool>(_simulator->getParam("debug_have_log_file")),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance_fromInternalStructure.cpp

    r97 r109  
    220220           
    221221            for (uint32_t k=0; k<MAX_OPERATION; ++k)
    222               if (is_type_valid(j) and (j != TYPE_MEMORY))// A functional unit can't execute memory instruction
    223                 {
    224                   _param->_timing [i][j][k]._latence = fromString<uint32_t> (getParam("latence",
    225                                                                                       "functionnal_unit",toString(i).c_str(),
    226                                                                                       "type"            ,toString(j).c_str(),
    227                                                                                       "operation"       ,toString(k).c_str(),
    228                                                                                       ""));
    229                   _param->_timing [i][j][k]._delay   = fromString<uint32_t> (getParam("delay",
    230                                                                                       "functionnal_unit",toString(i).c_str(),
    231                                                                                       "type"            ,toString(j).c_str(),
    232                                                                                       "operation"       ,toString(k).c_str(),
    233                                                                                       ""));
    234                 }
    235               else
    236                 {
    237                   _param->_timing [i][j][k]._latence = 0;
    238                   _param->_timing [i][j][k]._delay   = 0;
    239                 }
     222              {
     223                if (is_type_valid(j) and (j != TYPE_MEMORY))// A functional unit can't execute memory instruction
     224                  {
     225                    _param->_timing [i][j][k]._latence = fromString<uint32_t> (getParam("latence",
     226                                                                                        "functionnal_unit",toString(i).c_str(),
     227                                                                                        "type"            ,toString(j).c_str(),
     228                                                                                        "operation"       ,toString(k).c_str(),
     229                                                                                        ""));
     230                    _param->_timing [i][j][k]._delay   = fromString<uint32_t> (getParam("delay",
     231                                                                                        "functionnal_unit",toString(i).c_str(),
     232                                                                                        "type"            ,toString(j).c_str(),
     233                                                                                        "operation"       ,toString(k).c_str(),
     234                                                                                        ""));
     235                  }
     236                else
     237                  {
     238                    _param->_timing [i][j][k]._latence = 0;
     239                    _param->_timing [i][j][k]._delay   = 0;
     240                  }
     241              }
    240242          }
    241243      }
     
    247249  //log_printf(INFO,Configuration,FUNCTION,_("ICACHE_PORT"));
    248250
    249     _param->_nb_icache_port               = fromString<uint32_t         >(getParam("nb_icache_port"            , ""));
     251    _param->_nb_icache_port             = fromString<uint32_t           >(getParam("nb_icache_port"            , ""));
    250252    _param->_icache_port_priority       = fromString<Tpriority_t        >(getParam("icache_port_priority"      , ""));
    251253    _param->_icache_port_load_balancing = fromString<Tload_balancing_t  >(getParam("icache_port_load_balancing", ""));
     
    512514        getLink_2("link_execute_unit_with_functionnal_unit",toString(i).c_str(), "");
    513515        _param->_link_execute_unit_with_functionnal_unit [i] = pair_dual(fromString<uint32_t>(dest[0]),
    514                                                                         fromString<uint32_t>(dest[1]));
     516                                                                         fromString<uint32_t>(dest[1]));
    515517      }
    516518
     
    519521        getLink_2("link_execute_unit_with_load_store_unit",toString(i).c_str(), "");
    520522        _param->_link_execute_unit_with_load_store_unit [i] = pair_dual(fromString<uint32_t>(dest[0]),
    521                                                                        fromString<uint32_t>(dest[1]));
     523                                                                        fromString<uint32_t>(dest[1]));
    522524
    523525        for (uint32_t j=0; j<_param->_nb_cache_port[i]; ++j)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance_fromXMLLight.cpp

    r88 r109  
    2626
    2727    XMLLightVector<XML_t> vect = xml->getNodes();
    28    
     28
    2929    for (uint32_t i=0; i<vect.size(); ++i)
    3030      {
     
    3333        std::string child_name = child->getName();
    3434
     35//         log_printf(TRACE,Configuration,FUNCTION,"  * child_name : %s",child_name.c_str());
     36
    3537        //--------------------------------------------
    3638        // Child : Parameter
     
    4446            attribute_t  value_name = getAttribute(child,attributes,"name" );
    4547            attribute_t  value      = getAttribute(child,attributes,"value");
     48
     49//             log_printf(TRACE,Configuration,FUNCTION,"    * parameter \"%s\" = %s",value_name.c_str(), value.c_str());
    4650           
    4751            testAttributesEmpty(child,attributes);
     
    7074            attributes_t attributes = child->getAttributes();
    7175            attribute_t  value_name = getAttribute(child,attributes,"name");
     76
     77//             log_printf(TRACE,Configuration,FUNCTION,"    * link  \"%s\"",value_name.c_str());
    7278           
    7379            // Test, must have src or dest (or twice)
     
    8086            attribute_t  value_src  = (have_src )?getAttribute(child,attributes,"src" ):id;
    8187            attribute_t  value_dest = (have_dest)?getAttribute(child,attributes,"dest"):id;
     88
    8289
    8390            testAttributesEmpty(child,attributes);
     
    111118        if (child_name == "timing")
    112119          {
     120//             log_printf(TRACE,Configuration,FUNCTION,"    * timing");
     121
    113122            // Notation :
    114123            //     <timing type="5" operation="8" latence="2"  delay="1" />
     
    183192          }
    184193        //--------------------------------------------
    185         // Child : Other (node)
     194        // Child : Other (component)
    186195        //--------------------------------------------
    187196        else
    188197          {
     198//             log_printf(TRACE,Configuration,FUNCTION,"    * component");
     199
    189200            testSingleton  (child,false);       
    190201           
    191202            attributes_t attributes = child->getAttributes();
    192             attribute_t  value_id   = getAttribute(child,attributes,"id");
     203            attribute_t  value_ids  = getAttribute(child,attributes,"id");
    193204            attribute_t  value_type = child->getName();
    194            
    195             testAttributesEmpty(child,attributes);
    196            
    197             // Create a new component
     205
     206            testAttributesEmpty(child,attributes);
     207
     208            // Test if counter is an parameters
     209            std::string name_counter = "nb_"+value_type;
     210           
    198211            {
    199               Instance_component * param = new Instance_component(value_type, // type
    200                                                                   value_id);
    201              
    202 //            log_printf(TRACE,Configuration,FUNCTION,"%s.%s",value_type.c_str(),value_id.c_str());
    203 //            log_printf(TRACE,Configuration,FUNCTION,"  * %d",((*list_components)[value_type]).size());
    204              
    205               // Test if this id is previously used
    206               if (((*list_components)[value_type]).find(value_id) != ((*list_components)[value_type]).end())
    207                 throw ERRORMORPHEO(FUNCTION,toString(_("A Component \"%s\" with id \"%s\" is previously declared.\n"),value_type.c_str(),value_id.c_str()));
    208              
    209               ((*list_components)[value_type])[value_id] = param;
    210             }
    211            
    212             // Test if counter is an parameters
    213             {
    214               std::string name_counter = "nb_"+value_type;
    215 //            std::cout << name_counter << std::endl;
    216              
    217212              if (list_parameters->find(name_counter) == list_parameters->end())
    218213                {
    219                   // Scearch all occurante of this type
    220                   uint32_t nb_counter = xml->getNodes(value_type).size();
    221 //                std::cout << "  * " << nb_counter << std::endl;
    222                  
    223214                  // Insert in array
    224215                  Parameter_affectation * param = new Parameter_affectation(name_counter, // type
    225                                                                             toString(nb_counter));
    226                  
     216                                                                            "0");
    227217                  // insert parameter
    228218                  (*list_parameters)[name_counter] = param;
     
    230220            }
    231221           
    232             // Recursive function
    233             fromXMLLight (child,
    234                           ((id=="")?value_id:(id+"."+value_id)), // construction of identificator
    235                           ((*list_components)[value_type])[value_id]->_list_parameters,
    236 //                        ((*list_components)[value_type])[value_id]->_list_links,
    237                           list_links,
    238                           ((*list_components)[value_type])[value_id]->_list_components);
     222            size_t index_begin = 0;
     223            while (index_begin != std::string::npos)
     224              {
     225                size_t index_end = value_ids.find_first_of(",",index_begin+1);
     226               
     227                size_t      index_min = (index_begin==0)?index_begin:(index_begin+1);
     228                size_t      index_max = index_end-index_min;
     229                attribute_t value_id  = value_ids.substr(index_min, index_max);
     230
     231//                 log_printf(TRACE,Configuration,FUNCTION,"    * component \"%s\" - %s",value_type.c_str(), value_id.c_str());
     232
     233                index_begin = index_end;
     234
     235                // Create a new component
     236                {
     237                  Instance_component * param = new Instance_component(value_type, // type
     238                                                                      value_id);
     239             
     240//                log_printf(TRACE,Configuration,FUNCTION,"%s.%s",value_type.c_str(),value_id.c_str());
     241//                log_printf(TRACE,Configuration,FUNCTION,"  * %d",((*list_components)[value_type]).size());
     242             
     243                  // Test if this id is previously used
     244                  if (((*list_components)[value_type]).find(value_id) != ((*list_components)[value_type]).end())
     245                    throw ERRORMORPHEO(FUNCTION,toString(_("A Component \"%s\" with id \"%s\" is previously declared.\n"),value_type.c_str(),value_id.c_str()));
     246                 
     247                  ((*list_components)[value_type])[value_id] = param;
     248                }
     249
     250                // Increase occurence counter
     251                {
     252                  (*list_parameters)[name_counter]->_value = toString(fromString<uint32_t>((*list_parameters)[name_counter]->_value)+1);
     253                }
     254               
     255                // Recursive function
     256                fromXMLLight (child,
     257                              ((id=="")?value_id:(id+"."+value_id)), // construction of identificator
     258                              ((*list_components)[value_type])[value_id]->_list_parameters,
     259//                            ((*list_components)[value_type])[value_id]->_list_links,
     260                              list_links,
     261                              ((*list_components)[value_type])[value_id]->_list_components);
     262              }
    239263          }
    240264      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Parameter_affectation.cpp

    r88 r109  
    1717  Parameter_affectation::Parameter_affectation  (std::string name   ,
    1818                                                 std::string value  ):
    19     _name        (name         ),
    20     _value       (value        )
     19    _name        (name         )
    2120  {
    2221    log_begin(Configuration,FUNCTION);
    2322
    24     _use = false;
     23    _value = value;
     24    _use   = false;
    2525
    2626    log_end(Configuration,FUNCTION);
Note: See TracChangeset for help on using the changeset viewer.