-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RV_DM] rv_dm_sba_debug_disabled_vseq
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]>
- Loading branch information
1 parent
5a92acb
commit 89b8535
Showing
6 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
hw/ip/rv_dm/dv/env/seq_lib/rv_dm_sba_debug_disabled_vseq.sv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright lowRISC contributors. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
class rv_dm_sba_debug_disabled_vseq extends rv_dm_sba_tl_access_vseq; | ||
`uvm_object_utils(rv_dm_sba_debug_disabled_vseq) | ||
|
||
`uvm_object_new | ||
|
||
constraint lc_hw_debug_en_c { | ||
lc_hw_debug_en == lc_ctrl_pkg::On; | ||
} | ||
constraint scanmode_c { | ||
scanmode == prim_mubi_pkg::MuBi4False; | ||
} | ||
|
||
task sba_access(); | ||
csr_wr(.ptr(jtag_dmi_ral.dmcontrol.dmactive), .value(1)); | ||
req = sba_access_item::type_id::create("req"); | ||
randomize_req(req); | ||
cfg.debugger.sba_access(req); | ||
endtask | ||
|
||
task body(); | ||
repeat ($urandom_range(1, 10)) begin | ||
sba_access(); | ||
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)); | ||
Check warning on line 28 in hw/ip/rv_dm/dv/env/seq_lib/rv_dm_sba_debug_disabled_vseq.sv GitHub Actions / verible-verilog-lint[verible-verilog-lint] hw/ip/rv_dm/dv/env/seq_lib/rv_dm_sba_debug_disabled_vseq.sv#L28
Raw output
|
||
sba_access(); | ||
`DV_CHECK_EQ(req.is_err, SbaErrNone) | ||
end | ||
endtask : body | ||
endclass : rv_dm_sba_debug_disabled_vseq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters