Thanks for the comments. I make the magic breakpoint work but I have a
follow-up question.
I check the system.C and found this piece of code:
system_breakpoint( void *data, conf_object_t *cpu, integer_t parameter )
{
if ( parameter != 4UL << 16 ) {
// ignore all transaction completion calls
/* sprintf( system_t::inst->m_sim_message_buffer,
"other breakpoint (ignoring) 0x%llx", parameter );
*/
//cout << "system_breakpoint called" << endl;
// MAGIC breakpoints get intercepted here. Opal currently does not do
anything special here
return;
}
//currently IGNORE the system_breakpoint (parameter = 0x4000)...
#if 0
ERROR_OUT("system_t::system_breakpoint REACHED param[ 0x%x ]\n",
parameter);
sprintf( system_t::inst->m_sim_message_buffer,
"magic breakpoint reached" );
HALT_SIMULATION;
return;
#endif
}
I changed #if 0 ==> #if 1 then seems the system_breakpoint is enabled and
my toy program will stop at the right place. Just curious why
system_breakpoint is ignored in the original code? Thanks...
Best regards,
Xuan Qi
PHD Student
Department of Computer Science
The University of Texas at San Antonio
On Mon, 10 Mar 2008, Dan Gibson wrote:
While the loop appears simple, Luke could be right in his observation
that 100000 instructions may not be enough. In particular, I am unsure of
the implementation of fabs() -- if it calls a dynamically-linked library
then it could take quite some time! Try calling fabs() before the first
magic call, just to be sure.
Regards,
Dan
Luke Yen wrote:
The opal0.sim-step command takes as argument number of processor
instructions to execute, so 100000 might be insufficient for the
processor to reach the second breakpoint.
Also check whether the breakpoint is caught inside Opal's magic
instruction callback handler, in opal/system/system.C. Grep for
system_breakpoint() and insert some print statements.
Luke
On Mon, 10 Mar 2008, Xuan Qi wrote:
Hi everyone,
I am testing the magic breakpoint on my target machine. I use the a simple
program which is provided at $GEMS/opal/benchmark/float.C. The main part
of it is:
......
/* -- 4 == Do_Breakpoint */
RUBY_MAGIC_CALL( 4 );
for (int i = 0; i < numTrials; i++) {
result_s = ((float32) fabs( pos1_s )) * value_s ;
result_s = ((float32) fabs( neg1_s )) * value_s ;
result_d = (fabs( pos1_d )) * value_d ;
result_d = (fabs( neg1_d )) * value_d ;
}
/* -- 4 == Do_Breakpoint */
RUBY_MAGIC_CALL( 4 );
......
And I use the following script to test the magic breakpoints:
read-configuration sarek-2core.conf
cpu-switch-time 1
instruction-fetch-mode instruction-fetch-trace
istc-disable
dstc-disable
magic-break-enable
load-module ruby
ruby0.setparam g_NUM_PROCESSORS 2
ruby0.setparam g_MEMORY_SIZE_BYTES 536870912
ruby0.setparam g_PROCS_PER_CHIP 2
ruby0.setparam g_NUM_MEMORIES 1
ruby0.setparam NUMBER_OF_VIRTUAL_NETWORKS 6
ruby0.init
@conf.con0.input = "cd ALP/MPGenc/verify\n";
@conf.con0.input = "./float 5\n";
c
echo "first breakpoint"
load-module opal
opal0.init
opal0.sim-start "output_2core.opal"
opal0.sim-step 100000
Simulation will stop at first magic breakpoint and load opal module. But
when opal drives simulation, it won't catch the second magic breakpoint.
Am I missing something? Thank you...
Best regards,
Xuan Qi
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.
--
http://www.cs.wisc.edu/~gibson [esc]:wq!
|