OpenCores
no use no use 1/1 no use no use
or1ksim basic.S error
by zhustudio on Aug 22, 2004
zhustudio
Posts: 15
Joined: Sep 1, 2008
Last seen: May 21, 2022
hi all, here is the or1ksim log at the end of program, basic.S i saw basic.S call 'report' function but when it call report, it execute l.sw 0x0(r1),r2. it reports Exception 0x600 (Alignment) at 0x4000914, EA: 0xfffffffd, ppc: 0x4000914, npc: 0x4000918, #568 what's the matter of that ? i simulate other c program, such as uart, it has no error. and in support.c i find report function is (in no OR1K define section) void report(unsigned long value) { printf("report(0x%x);\n", (unsigned) value); } Thank you. zhustudio 04000910: (_report): 9c21fffc l.addi r1,r1,-4 (next insn) GPR00: 00000000 GPR01: 00000001 GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 04000910: (_report): 9c21fffc l.addi r1,r1,-4 (executed) [time 11520ns, #567] HAZARDWAIT: 0 04000914: : d4011000 l.sw 0x0(r1),r2 (next insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 ################################################################### Exception 0x600 (Alignment) at 0x4000914, EA: 0xfffffffd, ppc: 0x4000914, npc: 0x4000918, #568 ################################################################### 04000914: : d4011000 l.sw 0x0(r1),r2 (executed) [time 11540ns, #568] HAZARDWAIT: 0 04000918: : 9c410004 l.addi r2,r1,0x4 (next insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 00000600: : 00000000 l.j 0x0 (executed) [time 11560ns, #569] HAZARDWAIT: 0 00000604: : 00000000 l.j 0x0 (next insn) (delay insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 00000604: : 00000000 l.j 0x0 (executed) [time 11580ns, #570] HAZARDWAIT: 0 -------------- next part -------------- A non-text attachment was scrubbed... Name: basic-nocache.or32.gz Type: application/gzip Size: 2855 bytes Desc: not available Url : http://www.opencores.org/forums/openrisc/attachments/20040822/187842ff/basic-nocache.or32.bin
or1ksim basic.S error
by Unknown on Aug 23, 2004
Not available!
You are executing the following: l.sw 0x0(r1),r2 r1 contains 0xfffffffd, so you are trying to do a word access at a halfword-aligned address. This will cause an alignment exception. Robert Cragie, Design Engineer _______________________________________________________________ Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK http://www.jennic.com Tel: +44 (0) 114 281 2655 _______________________________________________________________
-----Original Message----- From: openrisc-bounces@opencores.org [mailto:openrisc-bounces@opencores.org]On Behalf Of zhustudio Sent: 22 August 2004 04:14 To: openrisc@opencores.org Subject: [openrisc] or1ksim basic.S error hi all, here is the or1ksim log at the end of program, basic.S i saw basic.S call 'report' function but when it call report, it execute l.sw 0x0(r1),r2. it reports Exception 0x600 (Alignment) at 0x4000914, EA: 0xfffffffd, ppc: 0x4000914, npc: 0x4000918, #568 what's the matter of that ? i simulate other c program, such as uart, it has no error. and in support.c i find report function is (in no OR1K define section) void report(unsigned long value) { printf("report(0x%x);\n", (unsigned) value); } Thank you. zhustudio 04000910: (_report): 9c21fffc l.addi r1,r1,-4 (next insn) GPR00: 00000000 GPR01: 00000001 GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 04000910: (_report): 9c21fffc l.addi r1,r1,-4 (executed) [time 11520ns, #567] HAZARDWAIT: 0 04000914: : d4011000 l.sw 0x0(r1),r2 (next insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 ################################################################### Exception 0x600 (Alignment) at 0x4000914, EA: 0xfffffffd, ppc: 0x4000914, npc: 0x4000918, #568 ################################################################### 04000914: : d4011000 l.sw 0x0(r1),r2 (executed) [time 11540ns, #568] HAZARDWAIT: 0 04000918: : 9c410004 l.addi r2,r1,0x4 (next insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 00000600: : 00000000 l.j 0x0 (executed) [time 11560ns, #569] HAZARDWAIT: 0 00000604: : 00000000 l.j 0x0 (next insn) (delay insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 00000604: : 00000000 l.j 0x0 (executed) [time 11580ns, #570] HAZARDWAIT: 0



or1ksim basic.S error
by zhustudio on Aug 23, 2004
zhustudio
Posts: 15
Joined: Sep 1, 2008
Last seen: May 21, 2022
I find the error is the none-aligned address.

and i add insn to basic.S before call report function
l.movhi r1,0x1

i found other test program such as cbasic and cust have more align
exception when simulate in or1ksim. is it right?

zhustudio



Robert Cragie wrote:
You are executing the following: l.sw 0x0(r1),r2 r1 contains 0xfffffffd, so you are trying to do a word access at a halfword-aligned address. This will cause an alignment exception. Robert Cragie, Design Engineer _______________________________________________________________ Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK http://www.jennic.com Tel: +44 (0) 114 281 2655 _______________________________________________________________
-----Original Message----- From: openrisc-bounces@opencores.org [mailto:openrisc-bounces@opencores.org]On Behalf Of zhustudio Sent: 22 August 2004 04:14 To: openrisc@opencores.org Subject: [openrisc] or1ksim basic.S error hi all, here is the or1ksim log at the end of program, basic.S i saw basic.S call 'report' function but when it call report, it execute l.sw 0x0(r1),r2. it reports Exception 0x600 (Alignment) at 0x4000914, EA: 0xfffffffd, ppc: 0x4000914, npc: 0x4000918, #568 what's the matter of that ? i simulate other c program, such as uart, it has no error. and in support.c i find report function is (in no OR1K define section) void report(unsigned long value) { printf("report(0x%x);\n", (unsigned) value); } Thank you. zhustudio 04000910: (_report): 9c21fffc l.addi r1,r1,-4 (next insn) GPR00: 00000000 GPR01: 00000001 GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 04000910: (_report): 9c21fffc l.addi r1,r1,-4 (executed) [time 11520ns, #567] HAZARDWAIT: 0 04000914: : d4011000 l.sw 0x0(r1),r2 (next insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 ################################################################### Exception 0x600 (Alignment) at 0x4000914, EA: 0xfffffffd, ppc: 0x4000914, npc: 0x4000918, #568 ################################################################### 04000914: : d4011000 l.sw 0x0(r1),r2 (executed) [time 11540ns, #568] HAZARDWAIT: 0 04000918: : 9c410004 l.addi r2,r1,0x4 (next insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 00000600: : 00000000 l.j 0x0 (executed) [time 11560ns, #569] HAZARDWAIT: 0 00000604: : 00000000 l.j 0x0 (next insn) (delay insn) GPR00: 00000000 GPR01: fffffffd GPR02: 00000003 GPR03: deaddead GPR04: 00000000 GPR05: 00008001 GPR06: ffffffff GPR07: fffffffa GPR08: 1243f8b2 GPR09: 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 flag: 0 00000604: : 00000000 l.j 0x0 (executed) [time 11580ns, #570] HAZARDWAIT: 0






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