Changeset 106 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp
- Timestamp:
- Feb 9, 2009, 11:55:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp
r105 r106 275 275 for (uint32_t i=0; i<_param->_nb_context; i++) 276 276 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]))); 278 278 279 279 uint32_t context = rand()%_param->_nb_context; … … 295 295 in_DECOD_EVENT_ADDRESS_EPCR [port]->write(0xdeadbeef); 296 296 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]))); 298 298 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_MSYNC); 299 299 … … 350 350 in_DECOD_EVENT_ADDRESS_EPCR [port]->write(0xdeadbebe); 351 351 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]))); 353 353 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_PSYNC); 354 354 … … 428 428 in_DECOD_EVENT_ADDRESS_EPCR [port]->write(0xdead0300); 429 429 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]))); 431 431 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_CSYNC); 432 432 … … 507 507 in_DECOD_EVENT_ADDRESS_EPCR [port]->write(0xdead0400); 508 508 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]))); 510 510 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_SPR_ACCESS); 511 511 … … 559 559 // in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(context); 560 560 // 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]))); 562 562 // in_BRANCH_COMPLETE_ADDRESS_SRC [port]->write(0x400); 563 563 // in_BRANCH_COMPLETE_ADDRESS_DEST [port]->write(0x500); … … 580 580 581 581 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]))); 583 583 in_BRANCH_EVENT_ADDRESS_SRC [port]->write(0x400); 584 584 in_BRANCH_EVENT_ADDRESS_DEST [port]->write(0x500); … … 649 649 // in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(context); 650 650 // 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]))); 652 652 // in_BRANCH_COMPLETE_ADDRESS_SRC [port]->write(0x600); 653 653 // in_BRANCH_COMPLETE_ADDRESS_DEST [port]->write(0x700); … … 669 669 uint32_t port = context; 670 670 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]))); 672 672 in_BRANCH_EVENT_ADDRESS_SRC [port]->write(0x600); 673 673 in_BRANCH_EVENT_ADDRESS_DEST [port]->write(0x700); … … 736 736 in_DECOD_EVENT_CONTEXT_ID [port]->write(context); 737 737 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]))); 739 739 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_EXCEPTION); 740 740 in_DECOD_EVENT_IS_DELAY_SLOT [port]->write(0); … … 830 830 in_DECOD_EVENT_CONTEXT_ID [port]->write(context); 831 831 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]))); 833 833 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_EXCEPTION); 834 834 in_DECOD_EVENT_IS_DELAY_SLOT [port]->write(1); … … 922 922 in_COMMIT_EVENT_CONTEXT_ID ->write(context); 923 923 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]))); 925 925 in_COMMIT_EVENT_TYPE ->write(EVENT_TYPE_EXCEPTION); 926 926 in_COMMIT_EVENT_IS_DELAY_SLOT ->write(0); … … 1017 1017 in_COMMIT_EVENT_CONTEXT_ID ->write(context); 1018 1018 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]))); 1020 1020 in_COMMIT_EVENT_TYPE ->write(EVENT_TYPE_EXCEPTION); 1021 1021 in_COMMIT_EVENT_IS_DELAY_SLOT ->write(1); … … 1112 1112 in_COMMIT_EVENT_CONTEXT_ID ->write(context); 1113 1113 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]))); 1115 1115 in_COMMIT_EVENT_TYPE ->write(EVENT_TYPE_EXCEPTION); 1116 1116 in_COMMIT_EVENT_IS_DELAY_SLOT ->write(0); … … 1207 1207 in_COMMIT_EVENT_CONTEXT_ID ->write(context); 1208 1208 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]))); 1210 1210 in_COMMIT_EVENT_TYPE ->write(EVENT_TYPE_EXCEPTION); 1211 1211 in_COMMIT_EVENT_IS_DELAY_SLOT ->write(1);
Note: See TracChangeset
for help on using the changeset viewer.