Skip to content

How is the D set and Q used from a register? #206

Answered by amykyta3
bbqbob asked this question in Q&A
Discussion options

You must be logged in to vote

Hi and thanks for taking an interest in SystemRDL!

You're actually quite close already. As you learn more about the language, you'll see that SystemRDL does a lot of things through inference. The hw property implicitly controls what the "hardware-facing" interface looks like. Setting hw = r implicitly infers an output signal from the block, since the hardware-side "reads" the value of the register. Similarly, hw = w infers an input signal that the outside logic "writes" to the register.
So for your example, all you need is the following:

addrmap example {
    name = "One control, one status";
    desc = "One status register with 1 bit reflecting a input signal value.  
            One con…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bbqbob
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants