Ok, thanks. May I ask how can I read a global register during the timing simulation ? Is there a simple function that give me the value ?
On Thu, Jul 29, 2010 at 12:40 AM, Volos Stavros <[email protected]>wrote: > Hi, > > No, thread[a.b] connected to cpuXY means that the hardware thread "b" of > core "a" is connected to > simics cpuXY (cpuXY is the name of the corresponding simics cpu object in > the simics file). > > Regards, > -Stavros > > ------------------------------ > *From:* mihai pricopi [[email protected]] > *Sent:* Wednesday, July 28, 2010 2:10 PM > *To:* Volos Stavros > *Cc:* [email protected] > > *Subject:* Re: Get values per thread > > Hello again, > > I was looking inside a debug.out file from the simulated flexpoints > folders. I noticed this line: > > 53 <FetchAddressGenerateImpl.cpp:91> {0}- 00-fag Thread[0.0] connected to > cpu0 Initial PC > > Is this mean that the software thread 0 is connected to the cpu0 the > entire detailed simulation ? Can I rely on this information to be sure every > detailed simulation there is no thread migration done by Solaris10 ? > > Thanks > Mihai > > On Wed, Jul 28, 2010 at 6:44 PM, mihai pricopi <[email protected]>wrote: > >> Hello, >> >> I`m trying to understand how the white box is working. I see this code >> where I suppose I have to find the answer: >> >> struct WhiteBoxImpl : WhiteBox { >> API::symtable_interface_t * theSymTable; >> >> std::vector< PhysicalMemoryAddress > theThreadTs; >> std::vector< PhysicalMemoryAddress > theIdleThreadTs; >> >> WhiteBoxImpl() { >> #if FLEXUS_TARGET_IS(v9) >> API::SIM_load_module("symtable"); >> API::conf_class_t * symtable_class = API::SIM_get_class("symtable"); >> API::conf_object_t * symtable_obj = >> API::SIM_new_object(symtable_class, "flexus_symtable"); >> theSymTable = reinterpret_cast<API::symtable_interface_t >> *>(API::SIM_get_class_interface(symtable_class, "symtable")); >> >> for (int32_t i = 0; i < API::SIM_number_processors(); ++i) { >> API::conf_object_t * ctx = >> API::SIM_get_attribute(Simics::APIFwd::SIM_get_processor(i), >> "current_context").u.object; >> API::attr_value_t val; >> val.kind = API::Sim_Val_Object; >> val.u.object = symtable_obj; >> API::SIM_set_attribute(ctx, "symtable", &val); >> } >> API::attr_value_t arch = API::SIM_get_attribute( >> Simics::APIFwd::SIM_get_processor(0), "architecture"); >> API::SIM_set_attribute( symtable_obj, "arch", &arch); >> >> DBG_(Dev, ( << "symtable loaded" ) ); >> #endif >> >> >> } >> >> The problem is that I don't know which thread is being executed because >> I suspect Solaris10 is doing the thread migration meanwhile and I can't rely >> on the values until I see per thread. Does the ctx hold the information >> about the current thread that the timing simulation is executing per core ? >> >> Thanks >> Mihai >> >> >> On Wed, Jul 28, 2010 at 4:22 AM, Volos Stavros <[email protected]>wrote: >> >>> Actually, the component WhiteBox is responsible to give the thread id >>> of the thread >>> that is being executed in a particular CPU. However, this component is >>> hardcoded >>> for Solaris 8. I worked on this component to support Solaris 10, but I >>> didn't have time >>> to check whether it works properly or not. >>> >>> Assuming that you know which thread is being executed, it should be easy >>> to get >>> measured values per software thread. >>> >>> Regards, >>> -Stavros >>> >>> ------------------------------ >>> *From:* mihai pricopi [[email protected]] >>> *Sent:* Tuesday, July 27, 2010 6:07 PM >>> *To:* Volos Stavros >>> *Subject:* Re: Get values per thread >>> >>> Per software thread. I discovered that Solaris modifies a register >>> when it does the context switch but I`m not sure where exactly in flexus i >>> can read that register and if flexus already gives me this information ? >>> >>> Thanks >>> >>> On Tue, Jul 27, 2010 at 11:55 PM, Volos Stavros >>> <[email protected]>wrote: >>> >>>> Hi Mihai, >>>> >>>> What do you mean by the term "thread"? Do you mean software thread or >>>> hardware thread (multithreaded >>>> processor) ? >>>> >>>> Regards, >>>> -Stavros >>>> >>>> ------------------------------ >>>> *From:* mihai pricopi [[email protected]] >>>> *Sent:* Tuesday, July 27, 2010 12:57 PM >>>> *To:* [email protected] >>>> *Subject:* Get values per thread >>>> >>>> Hi, >>>> >>>> Is it possible that Flexus can give measured values per thread not per >>>> core ? >>>> >>>> Thanks >>>> >>> >>> >> >
