yes, txt file is in the right place. "spike pk" will get the right result.
I change the relative path into absolute path. This time gem5 won't stop,
but no outputs .

I run a cpp file(function of that is like breadth first search) containing
lots of  "cout" instead, to print huge amount of numbers (all positive),
get outputs this time, but almost every number printed is negative.

I guess risc-v system call in gem5 doesn't work as expected.

thank you for your reply.


2018-04-17 2:10 GMT+08:00 Alec Roelke <ar...@virginia.edu>:

> There's a bug with RISC-V that I haven't been able to work out yet where
> attempting to open a file that doesn't exist causes gem5 to hang rather
> than report failure.  Make sure the file you're trying to open is actually
> where your program is looking for it.  I find that this problem happens
> most often when I use relative paths, as they don't always resolve to what
> I expect depending on where I'm running gem5 from.
>
> On Sun, Apr 15, 2018 at 5:14 AM, IL Ne <nedni...@gmail.com> wrote:
>
>> Hello,
>> I wrote a c++ file, and compile it by using riscv-g++ with -std=c++11
>> This program involves file stream.
>> While running by gem5, the process will pause.
>> I check insts with debug flags, finding that output paused at somewhere
>> like this below:
>>
>> 34489000: system.cpu T0 : @_read    : c_addi sp, sp, -16         : IntAlu
>> :  D=0x7ffffffffffffa30
>> 34489500: system.cpu T0 : @_read+2    : c_sdsp ra, 8(sp)           :
>> MemWrite :  D=0x0000000000077726 A=0x7ffffffffffffa38
>> 34490000: system.cpu T0 : @_read+4    : c_sdsp s0, 0(sp)           :
>> MemWrite :  D=0x00000000000b6000 A=0x7ffffffffffffa30
>> 34490500: system.cpu T0 : @_read+6    : c_li a3, zero, 0           :
>> IntAlu :  D=0x0000000000000000
>> 34491000: system.cpu T0 : @_read+8    : c_li a4, zero, 0           :
>> IntAlu :  D=0x0000000000000000
>> 34491500: system.cpu T0 : @_read+10    : c_li a5, zero, 0           :
>> IntAlu :  D=0x0000000000000000
>> 34492500: system.cpu T0 : @_read+12    : addi a7, zero, 63          :
>> IntAlu :  D=0x000000000000003f
>> 34493500: system.cpu T0 : @_read+16    : ecall                      :
>> No_OpClass :
>>
>>
>> Type enter and it will run agian, but stop at the same instruction: ecall
>>
>> Have anyone ever met this situation?  Could you tell me how to solve this
>> problem?
>>
>> Thanks.
>>
>>
>> _______________________________________________
>> 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

Reply via email to