-
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
[RV_DM] rv_dm_sba_debug_disabled_vseq #20739
[RV_DM] rv_dm_sba_debug_disabled_vseq #20739
Conversation
6d224e7
to
dde9d28
Compare
@jdonjdon I have rebased and resolved all the conflicts as requested. |
@@ -186,10 +186,14 @@ class rv_dm_scoreboard extends cip_base_scoreboard #( | |||
item.sprint(uvm_default_line_printer)), UVM_HIGH) | |||
if (sba_tl_access_q.size() > 0) begin | |||
compare_sba_access(item, sba_tl_access_q.pop_front()); | |||
end else if (cfg.rv_dm_vif.lc_hw_debug_en==lc_ctrl_pkg::Off) begin | |||
`uvm_info(`gfn, $sformatf("Does not receive SBA access item:\n%0s", |
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.
Line 190: use 2 space indentations.
randomize_req(req); | ||
cfg.debugger.sba_access(req); | ||
cfg.clk_rst_vif.wait_clks($urandom_range(0, 1000)); | ||
cfg.rv_dm_vif.lc_hw_debug_en<=lc_ctrl_pkg::Off; |
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.
Test plan says non-true. So use following syntax to assign random non-true value.
cfg.rv_dm_vif.lc_hw_debug_en = get_rand_lc_tx_val([.t_weight(0), .f_weight(1), .other_weight(4));
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.
@Shahid-Mehmood-S , please see in lines
dde9d28
to
3bf2167
Compare
randomize_req(req); | ||
cfg.debugger.sba_access(req); | ||
cfg.clk_rst_vif.wait_clks($urandom_range(0, 1000)); | ||
cfg.rv_dm_vif.lc_hw_debug_en = get_rand_lc_tx_val([.t_weight(0), .f_weight(1), .other_weight(4)); |
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.
you have a typo in line 24. remove '['.
If I understand correctly, this change is intended to fix issue #15668. Is that correct? If so, it's probably worth marking it in GitHub as such. |
@@ -186,10 +186,14 @@ class rv_dm_scoreboard extends cip_base_scoreboard #( | |||
item.sprint(uvm_default_line_printer)), UVM_HIGH) | |||
if (sba_tl_access_q.size() > 0) begin | |||
compare_sba_access(item, sba_tl_access_q.pop_front()); | |||
end else if (cfg.rv_dm_vif.lc_hw_debug_en==lc_ctrl_pkg::Off) begin | |||
`uvm_info(`gfn, $sformatf("Does not receive SBA access item:\n%0s", | |||
item.sprint(uvm_default_line_printer)), UVM_HIGH) |
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.
Nit: Indentation is off here.
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 re-indented version is still incorrect (with one extra space). Once you've got the code correct, please can you indent it correctly? (Most editors can do this for you on a given line)
3bf2167
to
7860729
Compare
The test ensures that the SBA interface is disabled when 'lc_hw_debug_en' is not set to true, ensuring no SBA TL accesses occur. Signed-off-by: Shahid Mehmood <[email protected]>
7860729
to
89b8535
Compare
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 proposed change to rv_dm_scoreboard
is something we'd need to be a bit careful about. If it needs to happen, it definitely needs to be in a different commit from the change that adds the vseq.
@@ -186,10 +186,10 @@ class rv_dm_scoreboard extends cip_base_scoreboard #( | |||
item.sprint(uvm_default_line_printer)), UVM_HIGH) | |||
if (sba_tl_access_q.size() > 0) begin | |||
compare_sba_access(item, sba_tl_access_q.pop_front()); | |||
end else begin | |||
`uvm_error(`gfn, $sformatf({"Received predicted SBA access but no transaction was seen on ", | |||
end else if (cfg.rv_dm_vif.lc_hw_debug_en==lc_ctrl_pkg::Off) begin |
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.
I'm not completely sure I understand this. I think the previous code was dying with an error if we saw an SBA access that wasn't expected. Your patch demotes this to uvm_info / UVM_HIGH and makes it happen less often (checking lc_hw_debug_en
).
We definitely should not make this change without some careful thought and explanatory comments.
The test ensures that the SBA interface is disabled when 'lc_hw_debug_en' is not set to true, ensuring no SBA TL accesses occur.