Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Holding registers #20

Open
tkafafi opened this issue Feb 25, 2020 · 3 comments
Open

Holding registers #20

tkafafi opened this issue Feb 25, 2020 · 3 comments

Comments

@tkafafi
Copy link

tkafafi commented Feb 25, 2020

Hi,
Thanks for your work on ORDT. It is very impressive and usefull tool.
I'm trying to define holding registers in RDL, and I'm not sure how to do that.
Holding registers basically keep the value written by software in a holding register until a specified update register bit is triggered, then all the holding registers make their value visible to the hardware side. For example, if I have 128 bit control bus for some analog block that I map to registers. It would be mapped to 4 32-bit holding registers that would be written by software one at a time then updated to present the full 128 bit value to the analog. The main objective is to avoid the analog seeing any unwanted intermediate values as the registers are being written.
Thanks

@sdnellen
Copy link
Owner

sdnellen commented Feb 26, 2020

There is no builtin ordt functionality to fully handle this case - there are basically 2 options:

  1. handle the aggregation of the 32b registers in external logic prior to the ordt decoder and read/write the wide register as a single 128b register (ie build the write externally and use transaction size input to indicate the 128b write)

    regfile {
        default regwidth = 32;
         ....
         reg {
             regwidth = 128;
             field { sw = rw; hw = r; } fld[128]; // <-- this will expose a single 128b output
         } widereg;
    } myregs;
    
  2. handle the writes to 32b registers in ordt and then capture in an external 128b register based on a write to the last 32b register (using the swmod property to provide a sw write indication)

    regfile {
        default regwidth = 32;
         ....
         reg {
             field { sw = rw; hw = r; swmod; } fld[32]; // <-- this will expose 4 32b data and write indicators (use last one to load the external reg)
         } subset_regs[4];
    } myregs;
    

Prob would go with option 2 as no ext address check is required - should work as long as the 32b writes occur in known order.

@tkafafi
Copy link
Author

tkafafi commented Mar 29, 2020

Hi,
Thanks for your response.
My flow is to use ORDT to output XML from RDL, then I have perl scripts that process the XML and generated outputs I need.
I already have ability to generate holding registers in my perl scripts, but I need a way to specify holding register property in RDL and generate a corresponding XML tag.
Is there a way in ORDT to specify user defined property/tag in RDL/XML ?
Thanks

@sdnellen
Copy link
Owner

sdnellen commented Apr 6, 2020

rdl user-defined properties are supported. see rdl_examples/issue_20_21.rdl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants