What is the correct behaviour for signalling when the swmod property is used?
#313
-
|
Hi there, I am a maintainer of the peakrdl exporter https://github.com/NuQuantum/peakrdl-sv. I have recently been looking at the implementation of the module rdl_subreg
import rdl_subreg_pkg::*;
#(
parameter int DW = 32,
parameter reset_type_e ResetType = ActiveHighAsync,
parameter logic [DW-1:0] ResetValue = '0,
parameter on_read_e OnRead = OnReadNone,
parameter on_write_e OnWrite = OnWriteNone
) (
input logic clk,
input logic rst,
// From CPU
input logic re,
input logic we,
input logic [DW-1:0] wd,
// From HW
input logic de,
input logic [DW-1:0] d,
// Output to HW
output logic [DW-1:0] q,
output logic qe,
output logic qre,
// Output to CPU
output logic [DW-1:0] qs
);If the user sets the This means however that the We currently arent sure if this is the correct behaviour, or whether the Current behaviour: Expected? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The SystemRDL spec does not formally describe what the "correct" timing relationship is with respect to For PeakRDL-regblock, I have implemented these outputs to be asserted on the cycle before the software action takes place. I believe this ends up being the same as your implementation.
On the other hand, |
Beta Was this translation helpful? Give feedback.
The SystemRDL spec does not formally describe what the "correct" timing relationship is with respect to
swaccandswmodproperties. Given the lack of a spec, I have interpreted this as an implementation-defined feature.For PeakRDL-regblock, I have implemented these outputs to be asserted on the cycle before the software action takes place. I believe this ends up being the same as your implementation.
The reason I chose this interpretation is as follows:
swaccassertions due to software reads, it is preferable to have the signal assert on the exact same cycle that the data is being sampled. This is useful in situations where the data needs to be updated on the next cycle (such as a F…