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: John.Smith@y...
    Date: Fri, 31 Oct 2003 16:36:09 +0100
    Subject: Re: [openrisc] Instruction l.mfspr ouput is not expected!
    Top

    
    
    ----- Original Message ----- 
    From: "Damjan Lampret" <lampret@o... > 
    To: <openrisc@o... > 
    Date: Fri, 31 Oct 2003 13:29:07 +0100 
    Subject: Re: [openrisc] Instruction l.mfspr ouput is not expected! 
    Hi Damjan 
    > 
    > 
    > John, 
    > 
    > you should really read the openrisc 1000 architecture manual before 
    > you go 
    > on. Let me explain what you are doing: 
    > 
    > > >         l.addi  r3,r0,0x0004 
    > 
    > You set R3 with 0x4. Nothing wrong with this. 
    > 
    > > >         l.mtspr r5,r0,17 
    > 
    > You set special purpose register R5+17 with zero (R0). Nothing 
    > wrong with 
    > that but I doubt this is what you want. Assuming R5 is contains 
    > value zero, 
    > in that case you are setting special purpose register SR with zero. 
    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!:(
    
    > 
    > > >         l.sw 0(r3),r5 
    > 
    > You store to memory location 0x4 (you previoualy set R3 to 0x4) 
    > with value 
    > of register R5. 
    > 
    > regards, 
    > Damjan 
    > 
    > ----- Original Message ----- 
    > From: <John.Smith@y... > 
    > To: <openrisc@o... > 
    > Sent: Thursday, October 30, 2003 2:07 PM 
    > Subject: Re: [openrisc] Instruction l.mfspr ouput is not expected! 
    > 
    > 
    > > Hi all, 
    > > Sorry to post again! 
    > > 
    > > The simple test program: 
    > > >         l.addi  r3,r0,0x0004 
    > > >         l.mtspr r5,r0,17 
    > > >         l.sw 0(r3),r5 
    > > 
    > > When come to modelsim RTL simulation,r5 always stick to 
    > 0x0000. 
    > > l.mfspr and l.mtspr can not visit special-purpose register. 
    > > SR[SM]=1 indicate or1k is in Supervisor Mode. 
    > > 
    > > But I tried it in or1ksim and the result is right:r5=0x8001. 
    > > 
    > > I don't know what I have done wrong? 
    > > Anyone could help me out? 
    > > 
    > > Thanks and Regards! 
    > > 
    > > 
    > > ----- Original Message ----- 
    > > From: John.Smith@y... 
    > > To: openrisc@o... 
    > > Date: Wed, 29 Oct 2003 04:14:42 +0100 
    > > Subject: [openrisc] Instruction l.mfspr ouput is not expected! 
    > > 
    > > > 
    > > > 
    > > > I tried the simple program in modelsim as the following. 
    > > > 
    > > >         l.addi  r3,r0,0x0004 
    > > >         l.mtspr r5,r0,17 
    > > >         l.sw 0(r3),r5 
    > > > 
    > > > It should be 0x8001 on dwb_dat_o,but it appeared 0x0000. 
    > > > The l.mtspr instruction seem not to work. 
    > > > Could anyone explain it to me?I don't know what mistakes 
    > I did. 
    > > > 
    > > > Thanks and Regards! 
    > > > 
    > > 
    > 
    
    
    

    Follow upAuthor
    Re: [openrisc] Instruction l.mfspr ouput is not expected!Damjan Lampret

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