Re: [Gems-users] Writing new get function for opal, to put value in variable


Date: Thu, 4 Feb 2010 10:58:13 -0600
From: Dan Gibson <degibson@xxxxxxxx>
Subject: Re: [Gems-users] Writing new get function for opal, to put value in variable
Sparsh,
I don't know the exact answer to your question, but your plight has moved me. I have made public some documentation from our internal WIKI. Have a look at:
http://www.cs.wisc.edu/gems/doc/gems-wiki/moin.cgi/Adding%20a%20Command%20to%20Ruby

Best of luck. What you are suggesting shouldn't be too difficult. If you feel so inclined, we can add your observations to the above document.

Regards,
Dan

On Thu, Feb 4, 2010 at 10:45 AM, sparsh mittal ISU <sparsh@xxxxxxxxxxx> wrote:
Hello All,
... [abridged] ...

Now my question is that the function in the hfa.C returns a attr_value_t variable. Whether it can be used in the commands.py file or can the scope of (system_t::inst->m_seq[0]->m_stat_committed[0]) be accessed in the commands.py file? I would be thankful for the reply.
Sparsh


On Thu, Feb 4, 2010 at 10:41 AM, Dan Gibson <degibson@xxxxxxxx> wrote:
The Simics CLI is a fully-functional python interpreter. Therefore, you can write whatever you like in Python.

Regards,
Dan

On Thu, Feb 4, 2010 at 10:09 AM, sparsh mittal ISU <sparsh@xxxxxxxxxxx> wrote:

Hello All
I want to write a script for opal, where the value of instructions committed will be read in a variable, such as
simics> $U=opal0.instructions
Or
opal0.instructions => $U
If it were a file I could have used
pipe opal0.instructions "cat >> file.txt"

I will write a new command opal0.instructions, but I am not sure, how to write a function, which returns a value, which can be put in a variable (not just printed).

I would very much appreciate any help.


--
Thanks and Regards
Sparsh Mittal
Graduate Student
Electrical and Computer Engineering
Iowa State University, Iowa, USA

_______________________________________________
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!



--
Thanks and Regards
Sparsh Mittal
Graduate Student
Electrical and Computer Engineering
Iowa State University, Iowa, USA



--
http://www.cs.wisc.edu/~gibson [esc]:wq!
[← Prev in Thread] Current Thread [Next in Thread→]