Re: [gem5-users] Addition of gem5 x86 instructions

2019-04-15 Thread Shyam Murthy
Hi Gabe, 

Any thoughts on the below?

Thanks,
Shyam

> On Apr 13, 2019, at 10:21 PM, Shyam Murthy  wrote:
> 
> Hi Gabe,
> 
> One additional question, regarding another instruction I was trying to 
> implement (FCMOVNBE).
> I thought of emulating a sequence similar what we have for CMOVNBE.
> def macroop CMOVNBE_R_R  
> 
> {
> 
> mov reg, reg, reg, flags=(CCvZF,)
> 
> mov reg, reg, regm, flags=(nCCvZF,)  
> 
> };   
> 
>  
> 
> def macroop CMOVNBE_R_M  
> 
> {
> 
> ld t1, seg, sib, disp 
> 
> mov reg, reg, reg, flags=(CCvZF,)
> 
> mov reg, reg, t1, flags=(nCCvZF,)
> 
> };   
> 
>  
> 
> def macroop CMOVNBE_R_P  
> 
> {
> 
> rdip t7  
> 
> ld t1, seg, riprel, disp 
> 
> mov reg, reg, reg, flags=(CCvZF,)
> 
> mov reg, reg, t1, flags=(nCCvZF,) 
> 
> };
> 
> However, I think this implementation is made easier because of the usage of 
> the mov microop which seems to be a condRegOp. However movfp being a 
> FPUnaryOp, I assume I can’t translate a similar sequence using movfp for 
> FCMOVNBE. Is there an alternate microop I can make use of, or should I 
> implement a microop or is there an alternate workaround?
> 
> 
> Thanks,
> Shyam
>> On Apr 13, 2019, at 6:57 PM, Shyam Murthy > > wrote:
>> 
>> Hi Gabe,
>> 
>> Thanks for the help with the FRNDINT instruction. 
>> I was trying to implement another instruction, namely FISTP. This was my 
>> initial implementation 
>> def macroop FISTP {
>> cvtf_d2i t1, st(0)
>> movfp st(0), t1
>> pop87
>> };
>> But I think the instruction writes to a destination, I was unsure how to 
>> specify the same. (which I will have to specify in place of highlighted 
>> st(0) here) 
>> Is this approach correct for this instruction, because I thought it was 
>> similar to FRNDINT otherwise, with the addition of extra POP instruction to 
>> pop st(0)?
>> 
>> Thanks,
>> Shyam
>> 
>> 
>> On Sun, Apr 7, 2019 at 2:23 AM Gabe Black > > wrote:
>> Hy Shyam. That microop takes a floating point register as it's source and an 
>> integer register as its destination. You're passing in two floating point 
>> indexes which won't work. To avoid implementing a new microop (too many 
>> microops is probably not realistic), you could use the mov2fp microop to 
>> move the newly converted value in an integer microcode only register (like 
>> t1, for instance) back into an FP register like st(0).
>> 
>> Gabe
>> 
>> On Fri, Apr 5, 2019 at 6:53 PM Shyam Murthy > > wrote:
>> Hi Gabe,
>> 
>> I wrote this implementation for the frndint macroop:
>> def macroop FRNDINT {
>> cvtf_d2i st(0), st(0)
>> };
>> 
>> However, when I run the application using this instruction on gem5, I seem 
>> to get this error: gem5.opt: build/X86/cpu/simple_thread.hh:251: RegVal 
>> SimpleThread::readIntReg(int): Assertion `flatIndex < TheISA::NumIntRegs' 
>> failed.
>> I just wanted to know what I was missing in my implementation for FRNDINT 
>> macroop?
>> 
>> Thanks,
>> Shyam 
>> 
>> 
>> On Sun, Mar 31, 2019 at 4:09 PM Shyam Murthy > > wrote:
>> Thanks a lot for the clarification Gabe. 
>> 
>> Thanks,
>> Shyam 
>> 
>> On Sun, Mar 31, 2019 at 6:29 AM Gabe Black > > wrote:
>> Hi Shyam. There are float to integer and integer to float conversion 
>> microops in src/arch/x86/isa/microops/fpop.isa which start with cvt_* which 
>> is short for convert. You can definitely implement new instructions and 
>> submit the code for review. There are instructions in the CONTRIBUTING.md 
>> file in the root of the gem5 source tree.
>> 
>> Gabe
>> 
>> On Fri, Mar 29, 2019 at 4:21 PM Shyam Murthy > > wrote:
>> Apologize for the wrong title in my previous email. Correcting.
>> 
>> Thanks,
>> Shyam 
>> 
>> On Fri, Mar 29, 2019 at 6:16 PM Shyam Murthy > > wrote:
>> Hi Gabe,
>> 
>> As I am trying to run SPEC 2017 on gem5 in SE mode, I ran into some 
>> unimplemented instructions namely frndint, fsqrt and fistp to name a few. I 
>> see that within the src/arch/x86/isa/insts/x87/arithmetic folder, there are 
>> placeholder files to write implementations for some of the macro operations, 
>> like square root and rounding. Can I write my implementations and have my 
>> code reviewed, so that it can be checked in?
>> In addition, for float to integer operation, I did not find any 
>> corresponding micro-op in the folder src/arch/x86/isa/microops, is there 
>> already a corresponding micro-op (that I 

Re: [gem5-users] Debug prints in FS mode using script

2019-04-15 Thread Jason Lowe-Power
That's ticks. You would have to divide by the cycle time to get cycles.

curCycle() should be curTick()/cyclePeriod() (cyclePeriod is the ticks per
cycle. E.g., 500 for 2 GHz). See
https://gem5.googlesource.com/public/gem5/+/refs/heads/master/src/sim/clocked_object.hh#65
.

Jason

On Mon, Apr 15, 2019 at 1:47 PM ABHISHEK BHATTACHARYYA <
abhattach...@wisc.edu> wrote:

> Thanks, Jason. I followed your advice and I can see my debug prints now.
> However, I have one more question.
>
> Do the debug prints here print out the ticks or cycles on the left
> (underlined)? If ticks, then how can I get the cycle value? I see there
> were similar questions asked earlier but I didn't understand the
> explanations provided. What does the call curCycle() return? I used it but
> the value returned matches the value on the left side of the print
> statements below.
>
> *500:* system.ruby.l1_cntrl0: MESI_Two_Level-L1cache.sm:537: Issue GETS
> address: 0x7
> *78000:* system.ruby.l1_cntrl0: MESI_Two_Level-L1cache.sm:845: Load
> complete address: 0x7
>
> Regards,
> Abhishek Bhattcharyya
> --
> *From:* gem5-users  on behalf of Jason
> Lowe-Power 
> *Sent:* Monday, April 15, 2019 11:12 AM
> *To:* gem5 users mailing list
> *Subject:* Re: [gem5-users] Debug prints in FS mode using script
>
> Hi Abhishek,
>
> Check --debug-help. You probably want --debug-file= and you may
> want --debug-start= when debugging Ruby protocols in FS mode. I've
> also found it useful to use a named pipe for the debug file and pipe it
> though `tail` to get only the last n lines (where n is usually megabytes to
> gigabytes).
>
> PS: Using the Ruby random tester is a way to debug protocol issues without
> having to wait for hours (days if you have tracing on) for Linux to boot.
>
> Cheers,
> Jason
>
> On Mon, Apr 15, 2019 at 9:01 AM ABHISHEK BHATTACHARYYA <
> abhattach...@wisc.edu> wrote:
>
> Hi
>
> I am running a full system simulation of gem5 with parsec benchmarks using
> an rcs script. I have added new debug prints to the gem5 code to trace
> RubySlicc request and response actions. How do I redirect the debug prints
> to a new file and collect the trace in this case?
>
> Thanks,
> Abhishek Bhattacharyya
>
> Regards,
>
>
> Abhishek Bhattacharyya
>
> *Graduate Research Assistant*
>
> *Electrical and Computer Engineering Department*
>
> *University of Wisconsin-Madison*
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Debug prints in FS mode using script

2019-04-15 Thread ABHISHEK BHATTACHARYYA
Thanks, Jason. I followed your advice and I can see my debug prints now. 
However, I have one more question.

Do the debug prints here print out the ticks or cycles on the left 
(underlined)? If ticks, then how can I get the cycle value? I see there were 
similar questions asked earlier but I didn't understand the explanations 
provided. What does the call curCycle() return? I used it but the value 
returned matches the value on the left side of the print statements below.

500: system.ruby.l1_cntrl0: MESI_Two_Level-L1cache.sm:537: Issue GETS address: 
0x7
78000: system.ruby.l1_cntrl0: MESI_Two_Level-L1cache.sm:845: Load complete 
address: 0x7

Regards,
Abhishek Bhattcharyya

From: gem5-users  on behalf of Jason Lowe-Power 

Sent: Monday, April 15, 2019 11:12 AM
To: gem5 users mailing list
Subject: Re: [gem5-users] Debug prints in FS mode using script

Hi Abhishek,

Check --debug-help. You probably want --debug-file= and you may want 
--debug-start= when debugging Ruby protocols in FS mode. I've also found 
it useful to use a named pipe for the debug file and pipe it though `tail` to 
get only the last n lines (where n is usually megabytes to gigabytes).

PS: Using the Ruby random tester is a way to debug protocol issues without 
having to wait for hours (days if you have tracing on) for Linux to boot.

Cheers,
Jason

On Mon, Apr 15, 2019 at 9:01 AM ABHISHEK BHATTACHARYYA 
mailto:abhattach...@wisc.edu>> wrote:
Hi

I am running a full system simulation of gem5 with parsec benchmarks using an 
rcs script. I have added new debug prints to the gem5 code to trace RubySlicc 
request and response actions. How do I redirect the debug prints to a new file 
and collect the trace in this case?

Thanks,
Abhishek Bhattacharyya


Regards,


Abhishek Bhattacharyya

Graduate Research Assistant

Electrical and Computer Engineering Department

University of Wisconsin-Madison

___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Debug prints in FS mode using script

2019-04-15 Thread Jason Lowe-Power
Hi Abhishek,

Check --debug-help. You probably want --debug-file= and you may
want --debug-start= when debugging Ruby protocols in FS mode. I've
also found it useful to use a named pipe for the debug file and pipe it
though `tail` to get only the last n lines (where n is usually megabytes to
gigabytes).

PS: Using the Ruby random tester is a way to debug protocol issues without
having to wait for hours (days if you have tracing on) for Linux to boot.

Cheers,
Jason

On Mon, Apr 15, 2019 at 9:01 AM ABHISHEK BHATTACHARYYA <
abhattach...@wisc.edu> wrote:

> Hi
>
> I am running a full system simulation of gem5 with parsec benchmarks using
> an rcs script. I have added new debug prints to the gem5 code to trace
> RubySlicc request and response actions. How do I redirect the debug prints
> to a new file and collect the trace in this case?
>
> Thanks,
> Abhishek Bhattacharyya
>
> Regards,
>
>
> Abhishek Bhattacharyya
>
> *Graduate Research Assistant*
>
> *Electrical and Computer Engineering Department*
>
> *University of Wisconsin-Madison*
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Debug prints in FS mode using script

2019-04-15 Thread ABHISHEK BHATTACHARYYA
Hi

I am running a full system simulation of gem5 with parsec benchmarks using an 
rcs script. I have added new debug prints to the gem5 code to trace RubySlicc 
request and response actions. How do I redirect the debug prints to a new file 
and collect the trace in this case?

Thanks,
Abhishek Bhattacharyya


Regards,


Abhishek Bhattacharyya

Graduate Research Assistant

Electrical and Computer Engineering Department

University of Wisconsin-Madison
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Stats.txt outfile and cache memory writes

2019-04-15 Thread Esteban José
Dear gem5 community,

I have a system with two cache levels, L1 and L2. L2 cache is my memory
under test (a prototype). The system is working correctly and the aim is to
write information inside the L2 memory. While running a binary, all the
data is handled inside the L1 cache (data cache), and L2 cache is always
receiving "WritebackDirty_accesses".

I was wondering... is it possible to know how many bytes were used in my L1
cache, directly from the output by reading the write accesses? So I can
periodically increase the workload of my binaries and test the write
request/response in my L2 memory prototype. (I guess I have to obtain a
"WriteReq_accesses" in my stats.txt output file)



best regards,
Esteban Garzon
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users