OpenCores
no use no use 1/1 no use no use
Architecture simulation of basic.S
by Unknown on Jun 22, 2004
Not available!
When I run the basic.or32 thru the or32-uclinux-sim, I get into the
following problem.

One of the last instructions in the file is;
l.jal _report

I dont find the pointer "_report" anywhere in the file. When I simulate it
(architecture simulation) it translates the above statement to
1.jal 0x8a
And it jumps to that space and somewhere in that space it encounters
a jump to 0 and goes into an infinite loop of staying at 0th location.
This causes a problem when I run "run_sw" since it keeps on writing on
to the log file till it reaches the disk quota.
What should I do to avert this problem? Specifically, where does it jump
when it encounters l.jal _report?
Thanks,
Guru
Architecture simulation of basic.S
by Unknown on Jun 23, 2004
Not available!
* gurumurt@colorado.edu (gurumurt@colorado.edu) wrote:
When I run the basic.or32 thru the or32-uclinux-sim, I get into the
following problem.

One of the last instructions in the file is;
l.jal _report

I dont find the pointer "_report" anywhere in the file. When I simulate it
(architecture simulation) it translates the above statement to
1.jal 0x8a
And it jumps to that space and somewhere in that space it encounters
a jump to 0 and goes into an infinite loop of staying at 0th location.
This causes a problem when I run "run_sw" since it keeps on writing on
to the log file till it reaches the disk quota.
What should I do to avert this problem? Specifically, where does it jump
when it encounters l.jal _report?
Thanks,
Guru


hm, symbol _report has to be somewhere else linker would complain.
(any library you're linking with ?)

regards,
p.

Architecture simulation of basic.S
by Unknown on Jun 23, 2004
Not available!
I just noticed that the report function is in support.c. But as seen from the traces that I given below, the report function doesnot match with the execution. Here is the execution trace for the last few instructions in the basic.S I have typed in the corresponding instructions in brackets. EXECUTED( 565): 040006dc: 0400008a (l.jal _report) GPR 0: 00000000 GPR 1: 00000001 GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001 EXECUTED( 566): 040006e0: 15000000 (l.nop 0) GPR 0: 00000000 GPR 1: 00000001 GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001 EXECUTED( 567): 04000904: 9c21fffc (l.addi r1,r1,-4) GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001 EXECUTED( 568): 04000908: d4011000 (l.sw 0x0(r1),r2) GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001 EXECUTED( 569): 00000600: 00000000 (l.j 0x0) GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 04000908 EEAR0: fffffffd ESR0 : 00008001 There is an execption at 568th instruction, here is the exception message: "Exception 0x600 (Alignment) at 0x4000908, EA: 0xfffffffd, ppc: 0x4000908, npc: 0x400090c, #568" Why would this exception happen? One more thing here is the report function from support.c. void report(unsigned long value) { asm("l.addi\tr3,%0,0": :"r" (value)); asm("l.nop %0": :"K" (NOP_REPORT)); } You would notice that these statements do not seem to correspond to the statements listed above. Am I missing something? Thanks, Guru ----- Original Message ----- From: Matjaz Breskvarphoenix@o...> To: Date: Wed Jun 23 15:51:16 CEST 2004 Subject: [openrisc] Architecture simulation of basic.S
* gurumurt@c... (gurumurt@c...) wrote:
> When I run the basic.or32 thru the or32-uclinux-sim, I get

into the
> following problem.
>
> One of the last instructions in the file is;
> l.jal _report
>
> I dont find the pointer "_report" anywhere in the

file. When I simulate it
> (architecture simulation) it translates the above statement to
> 1.jal 0x8a
> And it jumps to that space and somewhere in that space it

encounters
> a jump to 0 and goes into an infinite loop of staying at 0th

location.
> This causes a problem when I run "run_sw" since it

keeps on writing on
> to the log file till it reaches the disk quota.
> What should I do to avert this problem? Specifically, where

does it jump
> when it encounters l.jal _report?
> Thanks,
> Guru

hm, symbol _report has to be somewhere else linker would complain.
(any library you're linking with ?)
regards,
p.



Architecture simulation of basic.S
by Unknown on Jun 23, 2004
Not available!
* gurumurt@colorado.edu (gurumurt@colorado.edu) wrote:
I just noticed that the report function is in support.c. But as seen from
the traces that I given below, the report function doesnot match with
the execution.

Here is the execution trace for the last few instructions in the basic.S
I have typed in the corresponding instructions in brackets.


which simulator are you using (output looks unfamiliar to me ?)

i have something like:

f0000178: : 03fffffa l.j -6 (executed) [time 902832ns, #161506]
f000017c: : 9c840004 l.addi r4,r4,0x4 (next insn) (delay insn)
GPR00: 00000000 GPR01: 00000000 GPR02: 00000000 GPR03: f0001e20
GPR04: 00001e1c GPR05: 00378014 GPR06: c0378014 GPR07: 00000000
GPR08: b4600010 GPR09: f0000140 GPR10: 00000000 GPR11: 00000000
GPR12: 00000000 GPR13: 00000000 GPR14: 00000000 GPR15: 00000000
GPR16: 00000000 GPR17: 00000000 GPR18: 00000000 GPR19: 00000000
GPR20: 00000000 GPR21: 00000000 GPR22: 00000000 GPR23: 00000000
GPR24: 00000000 GPR25: 00000000 GPR26: 00000000 GPR27: 00000000
GPR28: 00000000 GPR29: 00000000 GPR30: 00000000 GPR31: 00000000 flag: 0
(sim) t
f000017c: : 9c840004 l.addi r4,r4,0x4 (executed) [time 902836ns, #161507]
f0000160: : e4642800 l.sfgeu r4,r5 (next insn)
GPR00: 00000000 GPR01: 00000000 GPR02: 00000000 GPR03: f0001e20
GPR04: 00001e20 GPR05: 00378014 GPR06: c0378014 GPR07: 00000000
GPR08: b4600010 GPR09: f0000140 GPR10: 00000000 GPR11: 00000000
GPR12: 00000000 GPR13: 00000000 GPR14: 00000000 GPR15: 00000000
GPR16: 00000000 GPR17: 00000000 GPR18: 00000000 GPR19: 00000000
GPR20: 00000000 GPR21: 00000000 GPR22: 00000000 GPR23: 00000000
GPR24: 00000000 GPR25: 00000000 GPR26: 00000000 GPR27: 00000000
GPR28: 00000000 GPR29: 00000000 GPR30: 00000000 GPR31: 00000000 flag: 0
(sim)


EXECUTED( 565): 040006dc: 0400008a (l.jal _report)
GPR 0: 00000000 GPR 1: 00000001 GPR 2: 00000003 GPR 3:
deaddead
GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa
GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
000007ff
GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff
GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f
GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b
GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7
GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040
SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001

EXECUTED( 566): 040006e0: 15000000 (l.nop 0)
GPR 0: 00000000 GPR 1: 00000001 GPR 2: 00000003 GPR 3:
deaddead
GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa
GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
000007ff
GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff
GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f
GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b
GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7
GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040
SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001

EXECUTED( 567): 04000904: 9c21fffc (l.addi r1,r1,-4)
GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead
GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa
GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
000007ff
GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff
GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f
GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b
GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7
GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040
SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001

EXECUTED( 568): 04000908: d4011000 (l.sw 0x0(r1),r2)
GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead
GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa
GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
000007ff
GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff
GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f
GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b
GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7
GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040
SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001

EXECUTED( 569): 00000600: 00000000 (l.j 0x0)
GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead
GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa
GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
000007ff
GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff
GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f
GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b
GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7
GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040
SR : 00008001 EPCR0: 04000908 EEAR0: fffffffd ESR0 : 00008001


There is an execption at 568th instruction, here is the exception
message:
"Exception 0x600 (Alignment) at 0x4000908, EA: 0xfffffffd, ppc:
0x4000908, npc: 0x400090c, #568"

Why would this exception happen?


if you look instruction just above you'll notice a store of r2 to 0-th
offest of r1.

l.sw 0x0(r1),r2

the problem is that r1 (stack pointer) is incorrent. looks like r1 got
corrupted or isn't set in the first place (also
possible stack corruption...). can't really see from what you posted...

are you trying to compile with frame pointer. if so try with
-fomit-frame-pointer.


One more thing here is the report function from support.c.
void report(unsigned long value)
{
asm("l.addi\tr3,%0,0": :"r" (value));
asm("l.nop %0": :"K" (NOP_REPORT));
}

You would notice that these statements do not seem to correspond to
the statements listed above. Am I missing something?


can't tell from all this. you are probably seeing a prologue of report()
function, (first thing it does is save some registers to stack... but it
seams stack pointer is invalid)

btw. which toolchain are you using (how old...)

best regards,
p.

Architecture simulation of basic.S
by Unknown on Jun 23, 2004
Not available!
Khm khm, your stack pointer R1 is not 32-bit word aligned. This causes problems as evident from the executed.log that you posted. Analysis: in first execution of l.jal insn you have R1 set to 0x1 and this gets substracted by 4 to 0xfffffffd and then a 32-bit store is executed to unaligned address and this causes alignment exeception as indicated by jump to 0x600. Fix: set your R1 properly. If your stack pointer is set by the linker configuration file, align .stack sectyion to 0x4. regards, Damjan ----- Original Message ----- From: gurumurt@colorado.edu> To: openrisc@opencores.org> Sent: Wednesday, June 23, 2004 9:11 PM Subject: Re: [openrisc] Architecture simulation of basic.S
I just noticed that the report function is in support.c. But as seen from the traces that I given below, the report function doesnot match with the execution. Here is the execution trace for the last few instructions in the basic.S I have typed in the corresponding instructions in brackets. EXECUTED( 565): 040006dc: 0400008a (l.jal _report) GPR 0: 00000000 GPR 1: 00000001 GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001 EXECUTED( 566): 040006e0: 15000000 (l.nop 0) GPR 0: 00000000 GPR 1: 00000001 GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001 EXECUTED( 567): 04000904: 9c21fffc (l.addi r1,r1,-4) GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001 EXECUTED( 568): 04000908: d4011000 (l.sw 0x0(r1),r2) GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 : 00008001 EXECUTED( 569): 00000600: 00000000 (l.j 0x0) GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3: deaddead GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7: fffffffa GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11: 000007ff GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15: 00007fff GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19: ffffc00f GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23: fffffc0b GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27: ffffffc7 GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31: 00000040 SR : 00008001 EPCR0: 04000908 EEAR0: fffffffd ESR0 : 00008001 There is an execption at 568th instruction, here is the exception message: "Exception 0x600 (Alignment) at 0x4000908, EA: 0xfffffffd, ppc: 0x4000908, npc: 0x400090c, #568" Why would this exception happen? One more thing here is the report function from support.c. void report(unsigned long value) { asm("l.addi\tr3,%0,0": :"r" (value)); asm("l.nop %0": :"K" (NOP_REPORT)); } You would notice that these statements do not seem to correspond to the statements listed above. Am I missing something? Thanks, Guru ----- Original Message ----- From: Matjaz Breskvarphoenix@o...> To: Date: Wed Jun 23 15:51:16 CEST 2004 Subject: [openrisc] Architecture simulation of basic.S
> * gurumurt@c... (gurumurt@c...) wrote:
> When I run the basic.or32 thru the or32-uclinux-sim, I get

> into the
> following problem.
>
> One of the last instructions in the file is;
> l.jal _report
>
> I dont find the pointer "_report" anywhere in the

> file. When I simulate it
> (architecture simulation) it translates the above statement to
> 1.jal 0x8a
> And it jumps to that space and somewhere in that space it

> encounters
> a jump to 0 and goes into an infinite loop of staying at 0th

> location.
> This causes a problem when I run "run_sw" since it

> keeps on writing on
> to the log file till it reaches the disk quota.
> What should I do to avert this problem? Specifically, where

> does it jump
> when it encounters l.jal _report?
> Thanks,
> Guru

> hm, symbol _report has to be somewhere else linker would complain.
> (any library you're linking with ?)
> regards,
> p.
>
>
_______________________________________________ http://www.opencores.org/mailman/listinfo/openrisc




Architecture simulation of basic.S
by Unknown on Jun 23, 2004
Not available!

can't tell from all this. you are probably seeing a prologue of report()



Yes definately what he is seeing is the prologue of the report() function.

regards,
Damjan



Architecture simulation of basic.S
by Unknown on Jun 23, 2004
Not available!
I changed the orp.ld file's. Now the stack section looks like this: .stack ALIGN(0x04): { *(.stack) _src_addr = .; } > ram But the problem still occurs. I am using the basic.S program from the or1k/orp/orp_soc/sw/basic package without changing anything. Is the expected value for r1 at statement "l.jal _report" 1 for that program? Also I am using the orp.cfg and orp.ld files unchanged from what they were when I downloaded them. I am just doing simulations and I am not doing any sysnthesis or FPGA implementation. Do I need to change those files? Thanks, Guru ----- Original Message ----- From: Damjan Lampretdamjanl@o...> To: Date: Wed Jun 23 23:06:45 CEST 2004 Subject: [openrisc] Architecture simulation of basic.S
Khm khm, your stack pointer R1 is not 32-bit word aligned. This causes problems as evident from the executed.log that you posted. Analysis: in first execution of l.jal insn you have R1 set to 0x1 and this gets substracted by 4 to 0xfffffffd and then a 32-bit store is executed to unaligned address and this causes alignment exeception as indicated by jump to 0x600. Fix: set your R1 properly. If your stack pointer is set by the linker configuration file, align .stack sectyion to 0x4. regards, Damjan ----- Original Message ----- From: gurumurt@c...> To: openrisc@o...> Sent: Wednesday, June 23, 2004 9:11 PM Subject: Re: [openrisc] Architecture simulation of basic.S
> I just noticed that the report function is in support.c. But

as seen from
> the traces that I given below, the report function doesnot

match with
> the execution.
>
> Here is the execution trace for the last few instructions in

the basic.S
> I have typed in the corresponding instructions in brackets.
>
>
> EXECUTED( 565): 040006dc: 0400008a (l.jal _report)
> GPR 0: 00000000 GPR 1: 00000001 GPR 2: 00000003 GPR 3:
> deaddead
> GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7:

fffffffa
> GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
> 000007ff
> GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15:

00007fff
> GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19:

ffffc00f
> GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23:

fffffc0b
> GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27:

ffffffc7
> GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31:

00000040
> SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 :

00008001
>
> EXECUTED( 566): 040006e0: 15000000 (l.nop 0)
> GPR 0: 00000000 GPR 1: 00000001 GPR 2: 00000003 GPR 3:
> deaddead
> GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7:

fffffffa
> GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
> 000007ff
> GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15:

00007fff
> GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19:

ffffc00f
> GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23:

fffffc0b
> GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27:

ffffffc7
> GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31:

00000040
> SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 :

00008001
>
> EXECUTED( 567): 04000904: 9c21fffc (l.addi r1,r1,-4)
> GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3:

deaddead
> GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7:

fffffffa
> GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
> 000007ff
> GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15:

00007fff
> GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19:

ffffc00f
> GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23:

fffffc0b
> GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27:

ffffffc7
> GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31:

00000040
> SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 :

00008001
>
> EXECUTED( 568): 04000908: d4011000 (l.sw 0x0(r1),r2)
> GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3:

deaddead
> GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7:

fffffffa
> GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
> 000007ff
> GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15:

00007fff
> GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19:

ffffc00f
> GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23:

fffffc0b
> GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27:

ffffffc7
> GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31:

00000040
> SR : 00008001 EPCR0: 040006bc EEAR0: 00000000 ESR0 :

00008001
>
> EXECUTED( 569): 00000600: 00000000 (l.j 0x0)
> GPR 0: 00000000 GPR 1: fffffffd GPR 2: 00000003 GPR 3:

deaddead
> GPR 4: 00000000 GPR 5: 00008001 GPR 6: ffffffff GPR 7:

fffffffa
> GPR 8: 1243f8b2 GPR 9: 040006e4 GPR10: 04000660 GPR11:
> 000007ff
> GPR12: 00000fff GPR13: 00001fff GPR14: 00003fff GPR15:

00007fff
> GPR16: ffff0012 GPR17: ffff0011 GPR18: ffff8010 GPR19:

ffffc00f
> GPR20: ffffe00e GPR21: fffff00d GPR22: fffff80c GPR23:

fffffc0b
> GPR24: fffffe0a GPR25: ffffff09 GPR26: ffffff88 GPR27:

ffffffc7
> GPR28: ffffffe6 GPR29: fffffff5 GPR30: fffffffc GPR31:

00000040
> SR : 00008001 EPCR0: 04000908 EEAR0: fffffffd ESR0 : 00008001
>
>
> There is an execption at 568th instruction, here is the

exception
> message:
> "Exception 0x600 (Alignment) at 0x4000908, EA:

0xfffffffd, ppc:
> 0x4000908, npc: 0x400090c, #568"
>
> Why would this exception happen?
>
> One more thing here is the report function from support.c.
> void report(unsigned long value) > { >

asm("l.addi\tr3,%0,0": :"r" (value)); >
asm("l.nop %0": :"K" (NOP_REPORT)); > } >
> You would notice that these statements do not seem to
correspond to > the statements listed above. Am I missing something? > > Thanks, > Guru > ----- Original Message ----- > From: Matjaz Breskvarphoenix@o...> > To: > Date: Wed Jun 23 15:51:16 CEST 2004 > Subject: [openrisc] Architecture simulation of basic.S > > > * gurumurt@c... (gurumurt@c...) wrote: > > > When I run the basic.or32 thru the or32-uclinux-sim, I get > > into the > > > following problem. > > > > > > One of the last instructions in the file is; > > > l.jal _report > >
> > I dont find the pointer "_report"

anywhere in the > > file. When I simulate it > > >
(architecture simulation) it translates the above statement to >
> 1.jal 0x8a > > > And it jumps to that space and

somewhere in that space it > > encounters > > > a
jump to 0 and goes into an infinite loop of staying at 0th >
> location. > > > This causes a problem when I run

"run_sw" since it > > keeps on writing on > >
> to the log file till it reaches the disk quota. > > >

What should I do to avert this problem? Specifically, where >
> does it jump > > > when it encounters l.jal _report?
> > Thanks, > > > Guru > > hm, symbol

_report has to be somewhere else linker would complain. > >
(any library you're linking with ?) > > regards, > > p.
> > >
_______________________________________________ > http://www.opencores.org/mailman/listinfo/openrisc


Architecture simulation of basic.S
by Unknown on Jun 23, 2004
Not available!
* gurumurt@colorado.edu (gurumurt@colorado.edu) wrote:
I changed the orp.ld file's. Now the stack section looks like this:


aligning to just 0x4 woun't work since r1 has value 0x1, aligning it will
just make it 0x4, but you need more space for stack. let's try this way

.stack ALIGN(8192);
{
*(.stack)

FILL(0);
. = ALIGN(8192);
_src_addr = .;
} > ram


this should make some space on stack... now please check
that somewhere value of symbol '_src_addr' gets loaded to r1

l.movhi r1,hi(_src_addr)
l.ori r1,r1,lo(_src_addr)

But the problem still occurs. I am using the basic.S program from the


if you still get 0x600 exception then either aligning didn't work, program
doesn't load _src_addr into r1 or it gets corrupted in the first place.
just trace the execution and make sure that r1 gets the proper value
at the first place and than look where it changes...

or1k/orp/orp_soc/sw/basic package without changing anything. Is the
expected value for r1 at statement "l.jal _report" 1 for that program?


to be honest i do not know. it could be just a test for unaligned access or
something. if you'll still have problems i'll take a closer look. ok?

best regards,
p.

Architecture simulation of basic.S
by Unknown on Jun 29, 2004
Not available!
Now Iam getting the following error, when I run or32-uclinux-sim, even before I reach the sim> prompt: Section: .reset, vaddr: 0x04000000, paddr: 0x04000000, offset: 0x00004000, size: 0x000001a0 EXCEPTION: write out of memory (32-bit access to 04000000) Exception 0x200 (Bus Error) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x0, #0 EXCEPTION: write out of memory (32-bit access to 04000004) Exception 0x200 (Bus Error) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x0, #0 EXCEPTION: write out of memory (32-bit access to 04000008) Exception 0x200 (Bus Error) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x0, #0 .... ..... EXCEPTION: write out of memory (32-bit access to 04000c90) Exception 0x200 (Bus Error) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x0, #0 In the orp.ld file flash is configured to start at 0x4000000. Hence my program is not loaded on to the flash memory. What could be the reason for this? Here is my orp.ld file . *********************************************************************************** MEMORY { vectors : ORIGIN = 0x00000000, LENGTH = 0x00002000 flash : ORIGIN = 0x04000000, LENGTH = 0x00200000 ram : ORIGIN = 0x00002000, LENGTH = 0x001fe000 icm : ORIGIN = 0x00800000, LENGTH = 0x00004000 } SECTIONS { .reset : { *(.reset) } > flash .text ALIGN(0x04): { *(.text) } > flash .rodata : { *(.rodata) } > flash .dummy ALIGN(0x04): { _src_beg = .; } > flash .vectors : AT ( ADDR (.dummy) ) { _vec_start = .; *(.vectors) _vec_end = .; } > vectors .icm : AT ( ADDR (.dummy) + SIZEOF (.vectors) ) { _icm_start = .; *(.icm) _icm_end = .; } > icm .data : AT ( ADDR (.dummy) + SIZEOF (.vectors) + SIZEOF(.icm) ) { _dst_beg = .; *(.data) _dst_end = .; } > ram .bss : { *(.bss) } > ram .stack ALIGN(8192): { *(.stack) FILL(0); . = ALIGN(8192); _src_addr = .; } > ram } *********************************************************************************** Thanks, Sankar ----- Original Message ----- From: Matjaz Breskvarphoenix@o...> To: Date: Wed Jun 23 23:55:10 CEST 2004 Subject: [openrisc] Architecture simulation of basic.S
* gurumurt@c... (gurumurt@c...) wrote:
> I changed the orp.ld file's. Now the stack section looks like

this:
aligning to just 0x4 woun't work since r1 has value 0x1, aligning
it will
just make it 0x4, but you need more space for stack. let's try this
way
> .stack ALIGN(8192);
> {
> *(.stack)

FILL(0);
. = ALIGN(8192);
> _src_addr = .;
> } > ram

this should make some space on stack... now please check
that somewhere value of symbol '_src_addr' gets loaded to r1
l.movhi r1,hi(_src_addr)
l.ori r1,r1,lo(_src_addr)
> But the problem still occurs. I am using the basic.S program

from the
if you still get 0x600 exception then either aligning didn't work,
program
doesn't load _src_addr into r1 or it gets corrupted in the first
place.
just trace the execution and make sure that r1 gets the proper
value
at the first place and than look where it changes...
> or1k/orp/orp_soc/sw/basic package without changing anything.

Is the
> expected value for r1 at statement "l.jal _report" 1

for that program?
to be honest i do not know. it could be just a test for unaligned
access or
something. if you'll still have problems i'll take a closer look.
ok?
best regards,
p.



Architecture simulation of basic.S
by Unknown on Jun 29, 2004
Not available!
* gurumurt@colorado.edu (gurumurt@colorado.edu) wrote:
Now Iam getting the following error, when I run or32-uclinux-sim, even
before I reach the sim> prompt:


Section: .reset, vaddr: 0x04000000, paddr: 0x04000000, offset:
0x00004000, size: 0x000001a0
EXCEPTION: write out of memory (32-bit access to 04000000)
Exception 0x200 (Bus Error) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x0, #0
EXCEPTION: write out of memory (32-bit access to 04000004)
Exception 0x200 (Bus Error) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x0, #0
EXCEPTION: write out of memory (32-bit access to 04000008)
Exception 0x200 (Bus Error) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x0, #0
....
.....
EXCEPTION: write out of memory (32-bit access to 04000c90)
Exception 0x200 (Bus Error) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x0, #0

In the orp.ld file flash is configured to start at 0x4000000. Hence my
program is not loaded on to the flash memory. What could be the
reason for this?
Here is my orp.ld file .



the problem is that there is nothing at 0x04000000 address. You'll have to
add a device to sim.cfg or change the location of 'flash'. For a quick
try, you may just change '> flash' into '> ram' and see if simulation goes
through.

*********************************************************************************** MEMORY { vectors : ORIGIN = 0x00000000, LENGTH = 0x00002000 flash : ORIGIN = 0x04000000, LENGTH = 0x00200000 ram : ORIGIN = 0x00002000, LENGTH = 0x001fe000 icm : ORIGIN = 0x00800000, LENGTH = 0x00004000 } SECTIONS { .reset : { *(.reset) } > flash .text ALIGN(0x04): { *(.text) } > flash .rodata : { *(.rodata) } > flash .dummy ALIGN(0x04): { _src_beg = .; } > flash .vectors : AT ( ADDR (.dummy) ) { _vec_start = .; *(.vectors) _vec_end = .; } > vectors .icm : AT ( ADDR (.dummy) + SIZEOF (.vectors) ) { _icm_start = .; *(.icm) _icm_end = .; } > icm .data : AT ( ADDR (.dummy) + SIZEOF (.vectors) + SIZEOF(.icm) ) { _dst_beg = .; *(.data) _dst_end = .; } > ram .bss : { *(.bss) } > ram .stack ALIGN(8192): { *(.stack) FILL(0); . = ALIGN(8192); _src_addr = .; } > ram } *********************************************************************************** Thanks, Sankar ----- Original Message ----- From: Matjaz Breskvarphoenix@o...> To: Date: Wed Jun 23 23:55:10 CEST 2004 Subject: [openrisc] Architecture simulation of basic.S
> * gurumurt@c... (gurumurt@c...) wrote:
> I changed the orp.ld file's. Now the stack section looks like

> this:
> aligning to just 0x4 woun't work since r1 has value 0x1, aligning
> it will
> just make it 0x4, but you need more space for stack. let's try this
> way
> .stack ALIGN(8192);
> {
> *(.stack)

> FILL(0);
> . = ALIGN(8192);
> _src_addr = .;
> } > ram

> this should make some space on stack... now please check
> that somewhere value of symbol '_src_addr' gets loaded to r1
> l.movhi r1,hi(_src_addr)
> l.ori r1,r1,lo(_src_addr)
> But the problem still occurs. I am using the basic.S program

> from the
> if you still get 0x600 exception then either aligning didn't work,
> program
> doesn't load _src_addr into r1 or it gets corrupted in the first
> place.
> just trace the execution and make sure that r1 gets the proper
> value
> at the first place and than look where it changes...
> or1k/orp/orp_soc/sw/basic package without changing anything.

> Is the
> expected value for r1 at statement "l.jal _report" 1

> for that program?
> to be honest i do not know. it could be just a test for unaligned
> access or
> something. if you'll still have problems i'll take a closer look.
> ok?
> best regards,
> p.
>
>
_______________________________________________ http://www.opencores.org/mailman/listinfo/openrisc


no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.