You might want to study the interface between ruby and opal in detail.
Essentially, Ruby provides a struct, its "interface" in simics lingo,
that contains a set of function pointers to the various ruby functions.
These functions and the struct are defined in mf_api.h. At init-time,
these function pointers are initialized and stored in various locations
(see OpalInterface.[Ch] for examples).
If you only need "numberOfProcessors" functionality, I would recommend
you use the Simics API instead -- it should be much easier. See the
Simics Reference Manual for the available API calls.
Regards,
Dan Gibson
Mladen Nikitovic wrote:
Hi,
I'm writing on a simics device, and inside it I would like to access ruby
methods such as numberOfProcessors, but It seems I'm doing something wrong.
The compiler complains and reports that the "structure has no member named
`numberOfProcessors'". I tried to include some header files but it failed
also. Does anyone have a hint?
This is the piece of code I'm trying to run in my "empty-device". Seems that
SIM_get_object returns a valid ruby object..
conf_object_t *ruby;
ruby = SIM_get_object("ruby0");
if(!ruby)
SIM_log_info(1, &empty->log, 0, "Ruby object not found");
SIM_log_info(1, &empty->log, 0, "ruby->numberOfProcessors(): %d",
ruby->numberOfProcessors());
Regards,
Mladen
_______________________________________________
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.
|