Skip to content

lock bit using swwe - how to implement #189

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

You must be logged in to vote

Due to how namespace scopes work in SystemRDL, you cannot access LOCKREG directly from within the lexical scope of CSR1 or csr. Instead, try using a dynamic property assignment outside of the blocks:

reg {
    field {} LOCK[0:0] = 0;
} LOCKREG;

reg {
    field {} csr = 0;
} CSR1;

CSR1.csr->swwe = LOCKREG.LOCK;

Also unrelated - I see you are creating an alternate reset signal, presumably to override the default reset to be asynchronous. PeakRDL-regblock lets you set the default reset via the command-line (peakrdl regblock --default-reset arst ...) or via the tool's TOML config.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@arnonsha
Comment options

@amykyta3
Comment options

@arnonsha
Comment options

Answer selected by arnonsha
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