Skip to content

Commit

Permalink
[RV_DM]rv_dm_ROM_read_access_vseq
Browse files Browse the repository at this point in the history
This is draft Pull request for review the sequence.I want to read contents of ROM but error i got that" Offset 'h800 exceeds size of memory, 'h200".Even offset is valid and in range.

Signed-off-by: Basit Mehmood <[email protected]>
  • Loading branch information
BasitMehmood committed Feb 13, 2024
1 parent 49d9c38 commit 504f4d1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions hw/ip/rv_dm/dv/env/seq_lib/rv_dm_ROM_read_access_vseq.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

class rv_dm_ROM_read_access_vseq extends rv_dm_base_vseq;

`uvm_object_utils(rv_dm_ROM_read_access_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 data;
uvm_reg_data_t [63:0]read_data;
repeat ($urandom_range(1, 10)) begin
data = $urandom_range(0,31);
csr_wr(.ptr(jtag_dmi_ral.dmcontrol.haltreq), .value(1));
`uvm_info(`gfn,("\n \n Testpoint 1 0x%0h"),UVM_LOW)
cfg.clk_rst_vif.wait_clks($urandom_range(0, 1000));
csr_wr(.ptr(tl_mem_ral.halted), .value(0));
`uvm_info(`gfn,("\n \n Testpoint 2 0x%0h"),UVM_LOW)
cfg.clk_rst_vif.wait_clks($urandom_range(0, 1000))
for (int i = 0; i <= 511; i++) begin
mem_rd(.ptr(tl_mem_ral.rom),.offset(64'h800),.data(read_data));
`uvm_info(`gfn, $sformatf("\n \n Access rom addr 0x%0h", read_data),UVM_LOW)
end
end
endtask

endclass : rv_dm_ROM_read_access_vseq

0 comments on commit 504f4d1

Please sign in to comment.