Replies: 2 comments 1 reply
-
Yes you can definitely accomplish this with regular SystemRDL semantics.
The RTL generator PeakRDL-regblock should support this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks Alex. Unfortunately I cant split up the field into two groups. I can
break it into 4 independent bits in which case I can use this solution, but
then I lose backward compatibility in the registers. Is there any way to
keep the bitwidth of this field as 4 and still achieve the same result?
Do you if I can use "wuser" to achieve this? I cant find any example of how
to use "wuser".
…On Tue, Feb 7, 2023 at 7:15 PM Alex Mykyta ***@***.***> wrote:
Yes you can definitely accomplish this with regular SystemRDL semantics.
Here is how I would do it:
// Declare a hardware signal that can be used to control your register's behavior
signal {
activehigh;
} cfg_mode;
reg {
// Define a register with two fields. One for each part of the bit-range.
field {
sw=rw;
hw=r;
// when cfg_mode == 0, this field is writable by software, otherwise it is read-only
swwel = cfg_mode;
// when cfg_mode == 1, clear this field to 0
hwclr = cfg_mode;
} cfg_b[3:2] = 0;
field {
// this field is always writable by software
sw=rw;
hw=r;
} cfg_a[1:0] = 0;
} reg_cfg;
The RTL generator PeakRDL-regblock
<https://peakrdl-regblock.readthedocs.io> should support this.
—
Reply to this email directly, view it on GitHub
<#149 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQUEVKPIDA66LJTPPV4M4XLWWMFULANCNFSM6AAAAAAUPYQ37U>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a register reg_cfg[3:0] which is SW programmable. Based on an internal signal (cfg_mode) in the hardware, I want to do one of the following:
Thanks in advance for the help.
Beta Was this translation helpful? Give feedback.
All reactions