Re: [Gems-users] Register a SIMICS hap call back


Date: Thu, 22 Jun 2006 09:40:11 -0500
From: Dan Gibson <degibson@xxxxxxxx>
Subject: Re: [Gems-users] Register a SIMICS hap call back
James,
Three things I'd like to point out here:
1) You need not replace the core-exception callback, you can simply add your own callback.
2) Alternatively, you can read the value of the TL register via the Simics API. Monitoring the TL register at request-time (instead of MMU-write-time) might be an easier solution (of course, I don't know the specifics of your implementation).
3) Hap registration can occur anywhere. We do so in ruby.c to guarantee it is done early in Ruby's initialization.

As for cpu_obj, my understanding is that there is a unique conf_object_t per Simics CPU -- perhaps I am not understanding this portion of your question?

Regards,
Dan Gibson

James Wang wrote:
Hi All:
    I am planning to modify ruby so that it could handle nested exception in a transaction. To do that, I need to be able to monitor the TL register in the MMU. So, after a quick read of the SIMICS reference manual, it seems MMU_Register_Write is perfect hap call back for me. I then want to replace the Core_Exception and Core_Exception_Return haps registered in $GEMS/ruby/module/ruby.c with MMU_Register_Write hap, but the MMU_Register_Write hap takes a third parameter which is the register_index, which I could get by calling SIM_get_register_number(cpu_obj, "tl"). The problem is cpu_obj is not a per cpu variable, so should I actually call the method in $GEMS/ruby/module/ruby.c or somewhere else? Am I on the right track here?
 
Regards
James



_______________________________________________ Gems-users mailing list Gems-users@xxxxxxxxxxx https://lists.cs.wisc.edu/mailman/listinfo/gems-users
[← Prev in Thread] Current Thread [Next in Thread→]