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 :
> 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 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=0x7a30
>> 34489500: system.cpu T0 : @_read+2: c_sdsp ra, 8(sp) :
>> MemWrite : D=0x00077726 A=0x7a38
>> 3449: system.cpu T0 : @_read+4: c_sdsp s0, 0(sp) :
>> MemWrite : D=0x000b6000 A=0x7a30
>> 34490500: system.cpu T0 : @_read+6: c_li a3, zero, 0 :
>> IntAlu : D=0x
>> 34491000: system.cpu T0 : @_read+8: c_li a4, zero, 0 :
>> IntAlu : D=0x
>> 34491500: system.cpu T0 : @_read+10: c_li a5, zero, 0 :
>> IntAlu : D=0x
>> 34492500: system.cpu T0 : @_read+12: addi a7, zero, 63 :
>> IntAlu : D=0x003f
>> 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