-
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
78dee87
commit 37db35e
Showing
6 changed files
with
44 additions
and
2 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
32 changes: 32 additions & 0 deletions
32
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,32 @@ | ||
// 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 body(); | ||
repeat ($urandom_range(1, 10)) begin | ||
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); | ||
cfg.clk_rst_vif.wait_clks($urandom_range(0, 1000)); | ||
cfg.rv_dm_vif.lc_hw_debug_en<=lc_ctrl_pkg::Off; | ||
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); | ||
`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