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: Matjaz Breskvar<phoenix@o...>
    Date: Wed Jan 26 21:36:34 CET 2005
    Subject: [openrisc] [or1ksim #7] Stricter typeing...
    Top
    * György 'nog' Jeney (nog@s...) wrote:
    > Hi,
    >
    > I'm not sure how this patch shall be received but I believe this is the way to
    > go. I have introduced 2 new types:
    >
    > oraddr_t and
    > orreg_t
    >
    > oraddr_t is used to mark addresses that the simulated processor (and
    > peripherals) address. This is basically a reqirement to implement a 64-bit
    > simulator (no, I'm not going to do that anytime soon). I have also defined the
    > formating macros for these new types (PRIxADDR and PRIxREG), (What C99 has done
    > in inttypes.h). I realise that this header and macros may not be availible on
    > some varients of unix, but I don't know, so if you know of a place were the
    > simulator might be used and these types are not availible, then shout and I'll
    > stick in a configure check to fix it.

    Simulator should buid at least on Linux, Solaris, Cygwin and FreeBSD. I
    do not think there is a need to introduce any constructs
    that would further restrict the or1ksim portability....

    > While doing all these changes I noticed that eval_direct{8,16,32} has this
    > comment:
    >
    > `/* for simulator accesses, the ones that cpu wouldn't do'
    >
    > but in the those functions we raise an exception if the memory area is not
    > valid. Is this really a good idea? If the cpu wouldn't do the access then
    > there wouldn't be an exception...

    Those should never happen. I agree, it would be better
    if i changed the the text to something "WARNING..."

    The thing is that i introduced the *direct functions to fix the statistics
    and also enforce the same behaviour when dumping to log file. So i
    left those instructions there since i wasn't sure that some other part
    of simulator didn't rely on those instructions. (it is possible that
    internal simulator access happens in the same cycle but before the
    actual 'architectural' access. in this case the code there
    is correct but really ugly....) the best thing would be to just print an
    error there and exit the simulator, but i have this feeling it will break...

    > ChangeLog:
    > * Mark a simulated cpu address as such, by introducing the new oraddr_t type.
    >
    > nog.

    best regards,
    p.

    ReferenceAuthor
    [openrisc] [or1ksim #7] Stricter typeing...György 'nog' Jeney

    Follow upAuthor
    [openrisc] [or1ksim #7] Stricter typeing...György 'nog' Jeney

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