-
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_jtag_dtm_hard_reset_vseq
This test verify that after perfominmg the operation of hard reset the debug module still responds correctly. Signed-off-by: Shahid Mehmood <[email protected]>
- Loading branch information
1 parent
0c759b9
commit 5a92acb
Showing
5 changed files
with
45 additions
and
1 deletion.
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
37 changes: 37 additions & 0 deletions
37
hw/ip/rv_dm/dv/env/seq_lib/rv_dm_jtag_dtm_hard_reset_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,37 @@ | ||
// Copyright lowRISC contributors. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
class rv_dm_jtag_dtm_hard_reset_vseq extends rv_dm_base_vseq; | ||
`uvm_object_utils(rv_dm_jtag_dtm_hard_reset_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(); | ||
uvm_reg_data_t wdata; | ||
uvm_reg_data_t rdata1; | ||
uvm_reg_data_t rdata2; | ||
repeat ($urandom_range(1, 10)) begin | ||
wdata = $urandom_range(0,31); | ||
csr_wr(.ptr(jtag_dmi_ral.abstractdata[0]), .value(wdata)); | ||
csr_wr(.ptr(jtag_dmi_ral.progbuf[0]), .value(wdata)); | ||
csr_rd(.ptr(jtag_dmi_ral.abstractdata[0]), .value(rdata1)); | ||
csr_rd(.ptr(jtag_dmi_ral.progbuf[0]), .value(rdata2)); | ||
`DV_CHECK_EQ(wdata,rdata1); | ||
`DV_CHECK_EQ(wdata,rdata2); | ||
csr_wr(.ptr(jtag_dtm_ral.dtmcs.dmihardreset), .value(1)); | ||
cfg.clk_rst_vif.wait_clks($urandom_range(0, 1000)); | ||
csr_rd(.ptr(jtag_dmi_ral.abstractdata[0]), .value(rdata1)); | ||
csr_rd(.ptr(jtag_dmi_ral.progbuf[0]), .value(rdata2)); | ||
`DV_CHECK_EQ(wdata,rdata1); | ||
`DV_CHECK_EQ(wdata,rdata2); | ||
end | ||
endtask : body | ||
endclass : rv_dm_jtag_dtm_hard_reset_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