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: "Damjan Lampret" <lampret@o...>
    Date: Fri, 31 Oct 2003 17:39:51 +0100
    Subject: Re: [openrisc] Instruction l.mfspr ouput is not expected!
    Top

    John,
    
    if you haven't initialized R5 then R5 is not initialized. In or1ksim GPRs at
    reset are always zero. In RTL they might not have to be zero, they might be
    X value. This is because in RTL GPR can be implemented with RAM hard macro
    which in most cases can't be reset (the content of RAM). So by default the
    reset vector always contains set of instructions that zero all GPRs. Lookm
    at any complete software that runs on or1200. Etiehr uclinux, orpmon, eCos
    etc. You just copy reset vector routine.
    
    regards,
    Damjan
    
    ----- Original Message ----- 
    From: <John.Smith@y...>
    To: <openrisc@o...>
    Sent: Friday, October 31, 2003 5:22 PM
    Subject: Re: [openrisc] Instruction l.mfspr ouput is not expected!
    
    
    >
    >
    > ----- Original Message ----- 
    > From: "Damjan Lampret" <lampret@o... >
    > To: <openrisc@o... >
    > Date: Fri, 31 Oct 2003 17:06:09 +0100
    > Subject: Re: [openrisc] Instruction l.mfspr ouput is not expected!
    > Hi
    > No,I did not initialize R5.
    > I have just tested the simple program with three line.
    > Is there any other possible reason?
    > The code is  so large that I can not find where is the source of the
    > error.
    > Regards
    > >
    > >
    > > > No,It is not zero I found.SR is 0x8001.I am using modelsim.
    > > > It is strange that register SR is 0x8001.I monitored SR in
    > > module
    > > > or1200_sprs.On reset SR should be 0x8001.
    > > > And in or1ksim the result is right.
    > > > I don't know what is wrong yet!:(
    > >
    > > Could happen if we you different R5 in or1ksim and rtl simulation.
    > > Where do
    > > you initialize R5? Put another instructions something like
    > >
    > > l.addi r5,r0,0
    > >
    > > before the three instructions.
    > >
    > > regards,
    > > Damjan
    > >
    > 
    
    
    
    

    ReferenceAuthor
    Re: [openrisc] Instruction l.mfspr ouput is not expected!John Smith

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