-
Notifications
You must be signed in to change notification settings - Fork 792
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
[hw,dma] DMA fixes after merge to master #24804
Conversation
This PR fixes the SHA opcode when no SHA mode is used. On master, this definition changed from None to SHA_None. Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
Smoke is still failing with:
|
The issue is most probably because #20446 is missing on master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
REGWEN fields may exist in CSRs that are non-HRO, but those registers must not be modified indirectly by CSR testing. Signed-off-by: Adrian Lees <[email protected]>
Unfortunately, the last commit didn't change anything. @alees24 Could you help me here? |
@rswarbrick That is the DMA I was talking about regarding the regwen. |
Looking at the line that's failing, I think this comes from an assertion in It seems to be showing the REGWEN field as being RW. But that's confusing to me: it looks like it's:
Maybe worth adding some tracing to figure out how the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RTL change LGTM
@martin-velay - @andreaskurth has suggested that you take a quick look at this too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DV & RTL seems OK. For the FPV in tpl
format I have no idea.
And I think you should also update opentitan/hw/ip/dma/dv/doc/tb.svg
to remove the references to devmode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Razer6! This looks good to me but I realise that we don't have CI coverage for this block yet. Are you happy for the change to be merged now or would you prefer to tweak it first?
@rswarbrick I'm happy to merge that though smoke still fails with the error from above. |
I've just taken a bit of a look and the problem is being caused by the fact that the I was a bit surprised to see that this worked in the I'll do a bit more digging, but this should hopefully explain why there is a mismatch. |
Ahah! The logic in the DV code is from this: // This function is used for wen_reg to lock its lockable flds by changing the lockable flds'
// access policy. For register write via csr_wr(), this function is included in post_write().
// For register write via tl_access(), user will need to call this function manually.
virtual function void lock_lockable_flds(uvm_reg_data_t val, uvm_predict_e kind);
if (is_wen_reg()) begin
`uvm_info(`gfn, $sformatf("lock_lockable_flds %d val", val), UVM_LOW);
foreach (m_fields[i]) begin
dv_base_reg_field fld;
`downcast(fld, m_fields[i])
if (fld.is_wen_fld()) begin
uvm_reg_data_t field_val = val & fld.get_field_mask();
string field_access = fld.get_access();
case (field_access)
// discussed in issue #1922: enable register is standarized to W0C or RO (if HW has
// write access).
"W0C": begin
// This is the regular behavior with W0C access policy enabled (i.e., only
// clearing is possible).
if (kind == UVM_PREDICT_WRITE && field_val == 1'b0) begin
fld.set_lockable_flds_access(1);
// In this case we are using direct prediction where the access policy is not
// applied. I.e., a regwen bit that has been set to 0 can be set to 1 again.
end else if (kind == UVM_PREDICT_DIRECT) begin
fld.set_lockable_flds_access((~field_val) & fld.get_field_mask());
end
end
"RO": ; // if RO, it's updated by design, need to predict in scb
default:`uvm_fatal(`gfn, $sformatf("lock register invalid access %s", field_access))
endcase
end
end
end
endfunction This isn't particularly easy to read, but I think the point is that every field in a regwen is expected to either be Looking at the Python code, the On master, the commit I pointed to was reasonable. The point is that a mubi value can't be considered (e.g.) R0C because UVM will be thinking about clearing each bit, rather than the logical meaning of the mubi. I think the correct fix is to sort out the |
Well, that was harder than I expected! I think the change in #24912 should be what we need. |
Remove duplicated tl_agent_dma_ctn_cfg. Add reference to tl_agent_dma_sys_cfg. Signed-off-by: Robert Schilling <[email protected]>
I added a commit on top to update the TB figure. I removed the reference to |
I've reviewed and approved @rswarbrick 's fix. We should probably merge that one first and then this PR here. |
Sounds good. I see the fix got merged. Let's merge this once CI is happy to unblock the other DMA PRs. |
We've got past the only changes that might be detectable by CI (all that remains is FPGA runs, which this can't break). Looks good! |
This PR adds two fixes needed after merging the DMA to master:
None
toSHA_None
, which was changed in the related upstream package