Building registers data base

Discussion in 'C' started by Uriel, Mar 31, 2020.

  1. Uriel

    Uriel New Member

    Joined:
    Mar 30, 2020
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    I have a question regarding of how to build hierarchical registers database (i.e. system-> IP->registers-> fields). As part of each reg there are its fields + width union-ed with the full width (32bit).
    each register has its offset address in the IP and each IP has its base address in the system. registers can appear multiple times and so are devices.

    what I'm trying to solve is how to initiate the offsets and base addresses w/o consuming any cycles, just to have it as part of the definition, this is my current example code that initiate the offsets/base addr in run time, but again this is what I'm trying to avoid.
    Using different structure is not a problem (no legacy).
    thanks for your help
    Uriel

    see code in attached file.
     

    Attached Files:

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice