LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: zhustudio<zhustudio@e...>
    Date: Mon Aug 23 09:50:57 CEST 2004
    Subject: [openrisc] or1ksim basic.S error
    Top
    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@o...
    >>[mailto:openrisc-bounces@o...]On Behalf Of zhustudio
    >>Sent: 22 August 2004 04:14
    >>To: openrisc@o...
    >>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 >> > > >

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.