Ignore:
Timestamp:
Feb 9, 2009, 11:55:26 PM (15 years ago)
Author:
rosiere
Message:

1) RAT : Fix bug when update and event in same cycle
2) Context State : Compute depth
3) Load Store Unit : In check logic, translate all access in little endian. More easy to check
4) UFPT : End Event

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/main.cpp

    r98 r106  
    1717  err (_(" * nb_decod_unit                                 (uint32_t)\n"));
    1818  err (_(" * nb_inst_branch_complete                       (uint32_t)\n"));
    19   err (_(" * size_depth                    [nb_context]    (uint32_t)\n"));
     19  err (_(" * nb_inst_branch_speculated     [nb_context]    (uint32_t)\n"));
    2020  err (_(" * size_general_data                             (uint32_t)\n"));
    2121  err (_(" * size_inst_decod               [nb_decod_unit] (uint32_t)\n"));
     
    4848    usage (argc, argv);
    4949
    50   uint32_t * _size_depth                    = new uint32_t [_nb_context];
     50  uint32_t * _nb_inst_branch_speculated     = new uint32_t [_nb_context];
    5151  for (uint32_t i=0; i<_nb_context; i++)
    52     _size_depth [i] = fromString<uint32_t>(argv[x++]);
     52    _nb_inst_branch_speculated [i] = fromString<uint32_t>(argv[x++]);
    5353
    5454  uint32_t   _size_general_data = fromString<uint32_t>(argv[x++]);
     
    6969         _nb_decod_unit                ,
    7070         _nb_inst_branch_complete      ,
    71          _size_depth                   ,
     71         _nb_inst_branch_speculated    ,
    7272         _size_general_data            ,
    7373         _size_inst_decod              ,
     
    8787    }
    8888
    89   delete [] _size_depth;                   
     89  delete [] _nb_inst_branch_speculated;                   
    9090  delete [] _size_inst_decod;             
    9191  delete [] _link_context_to_decod_unit;   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp

    r105 r106  
    275275      for (uint32_t i=0; i<_param->_nb_context; i++)
    276276        if (_param->_have_port_depth)
    277           in_DEPTH_MIN  [i]->write((_param->_array_size_depth[i]==0)?0:(i%_param->_array_size_depth[i]));
     277          in_DEPTH_MIN  [i]->write((log2(_param->_nb_inst_branch_speculated[i])==0)?0:(i%log2(_param->_nb_inst_branch_speculated[i])));
    278278     
    279279      uint32_t context    = rand()%_param->_nb_context;
     
    295295          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdeadbeef);
    296296          if (_param->_have_port_depth)
    297           in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     297          in_DECOD_EVENT_DEPTH         [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context+1)%log2(_param->_nb_inst_branch_speculated[context])));
    298298          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_MSYNC);
    299299         
     
    350350          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdeadbebe);
    351351          if (_param->_have_port_depth)
    352           in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     352          in_DECOD_EVENT_DEPTH         [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context+1)%log2(_param->_nb_inst_branch_speculated[context])));
    353353          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_PSYNC);
    354354         
     
    428428          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdead0300);
    429429          if (_param->_have_port_depth)
    430           in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     430          in_DECOD_EVENT_DEPTH         [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context+1)%log2(_param->_nb_inst_branch_speculated[context])));
    431431          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_CSYNC);
    432432         
     
    507507          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdead0400);
    508508          if (_param->_have_port_depth)
    509           in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     509          in_DECOD_EVENT_DEPTH         [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context+1)%log2(_param->_nb_inst_branch_speculated[context])));
    510510          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_SPR_ACCESS);
    511511         
     
    559559//        in_BRANCH_COMPLETE_CONTEXT_ID       [port]->write(context);
    560560//        if (_param->_have_port_depth)
    561 //        in_BRANCH_COMPLETE_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     561//        in_BRANCH_COMPLETE_DEPTH            [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context+1)%log2(_param->_nb_inst_branch_speculated[context])));
    562562//        in_BRANCH_COMPLETE_ADDRESS_SRC      [port]->write(0x400);
    563563//        in_BRANCH_COMPLETE_ADDRESS_DEST     [port]->write(0x500);
     
    580580         
    581581          if (_param->_have_port_depth)
    582           in_BRANCH_EVENT_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     582          in_BRANCH_EVENT_DEPTH            [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context+1)%log2(_param->_nb_inst_branch_speculated[context])));
    583583          in_BRANCH_EVENT_ADDRESS_SRC      [port]->write(0x400);
    584584          in_BRANCH_EVENT_ADDRESS_DEST     [port]->write(0x500);
     
    649649//        in_BRANCH_COMPLETE_CONTEXT_ID       [port]->write(context);
    650650//        if (_param->_have_port_depth)
    651 //        in_BRANCH_COMPLETE_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     651//        in_BRANCH_COMPLETE_DEPTH            [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context+1)%log2(_param->_nb_inst_branch_speculated[context])));
    652652//        in_BRANCH_COMPLETE_ADDRESS_SRC      [port]->write(0x600);
    653653//        in_BRANCH_COMPLETE_ADDRESS_DEST     [port]->write(0x700);
     
    669669          uint32_t port = context;
    670670         
    671           in_BRANCH_EVENT_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     671          in_BRANCH_EVENT_DEPTH            [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context+1)%log2(_param->_nb_inst_branch_speculated[context])));
    672672          in_BRANCH_EVENT_ADDRESS_SRC      [port]->write(0x600);
    673673          in_BRANCH_EVENT_ADDRESS_DEST     [port]->write(0x700);
     
    736736          in_DECOD_EVENT_CONTEXT_ID       [port]->write(context);
    737737          if (_param->_have_port_depth)
    738           in_DECOD_EVENT_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     738          in_DECOD_EVENT_DEPTH            [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context)%log2(_param->_nb_inst_branch_speculated[context])));
    739739          in_DECOD_EVENT_TYPE             [port]->write(EVENT_TYPE_EXCEPTION);
    740740          in_DECOD_EVENT_IS_DELAY_SLOT    [port]->write(0);
     
    830830          in_DECOD_EVENT_CONTEXT_ID       [port]->write(context);
    831831          if (_param->_have_port_depth)
    832           in_DECOD_EVENT_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     832          in_DECOD_EVENT_DEPTH            [port]->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context)%log2(_param->_nb_inst_branch_speculated[context])));
    833833          in_DECOD_EVENT_TYPE             [port]->write(EVENT_TYPE_EXCEPTION);
    834834          in_DECOD_EVENT_IS_DELAY_SLOT    [port]->write(1);
     
    922922          in_COMMIT_EVENT_CONTEXT_ID       ->write(context);
    923923          if (_param->_have_port_depth)
    924           in_COMMIT_EVENT_DEPTH            ->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     924          in_COMMIT_EVENT_DEPTH            ->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context)%log2(_param->_nb_inst_branch_speculated[context])));
    925925          in_COMMIT_EVENT_TYPE             ->write(EVENT_TYPE_EXCEPTION);
    926926          in_COMMIT_EVENT_IS_DELAY_SLOT    ->write(0);
     
    10171017          in_COMMIT_EVENT_CONTEXT_ID       ->write(context);
    10181018          if (_param->_have_port_depth)
    1019           in_COMMIT_EVENT_DEPTH            ->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     1019          in_COMMIT_EVENT_DEPTH            ->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context)%log2(_param->_nb_inst_branch_speculated[context])));
    10201020          in_COMMIT_EVENT_TYPE             ->write(EVENT_TYPE_EXCEPTION);
    10211021          in_COMMIT_EVENT_IS_DELAY_SLOT    ->write(1);
     
    11121112          in_COMMIT_EVENT_CONTEXT_ID       ->write(context);
    11131113          if (_param->_have_port_depth)
    1114           in_COMMIT_EVENT_DEPTH            ->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     1114          in_COMMIT_EVENT_DEPTH            ->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context)%log2(_param->_nb_inst_branch_speculated[context])));
    11151115          in_COMMIT_EVENT_TYPE             ->write(EVENT_TYPE_EXCEPTION);
    11161116          in_COMMIT_EVENT_IS_DELAY_SLOT    ->write(0);
     
    12071207          in_COMMIT_EVENT_CONTEXT_ID       ->write(context);
    12081208          if (_param->_have_port_depth)
    1209           in_COMMIT_EVENT_DEPTH            ->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     1209          in_COMMIT_EVENT_DEPTH            ->write((log2(_param->_nb_inst_branch_speculated[context])==0)?0:((context)%log2(_param->_nb_inst_branch_speculated[context])));
    12101210          in_COMMIT_EVENT_TYPE             ->write(EVENT_TYPE_EXCEPTION);
    12111211          in_COMMIT_EVENT_IS_DELAY_SLOT    ->write(1);
Note: See TracChangeset for help on using the changeset viewer.