Skip to content

Commit

Permalink
Update lowrisc_ip to lowRISC/opentitan@d268f271f4
Browse files Browse the repository at this point in the history
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
d268f271f4f75aeb8f3bf9624a497ae5bfb9c47e

* [rtl] MuBi encoding of iCache memory ctrl signals (Pascal Nasahl)
* [sram_ctrl] Add readback feature (Pascal Nasahl)
* [fpv] Tweak report headers to match Jasper version (Rupert
  Swarbrick)
* [prim_pad_wrapper,rtl] Change input enable to active-high (Andreas
  Kurth)
* [hmac/rtl] Wait for digest of complete block when stopping (Martin
  Velay)
* [prim_sha2_pad,rtl] Signal msg feed complete also when stopping
  (Andreas Kurth)
* [prim_sha2_pad,rtl] Go to idle (without padding) when told to stop
  (Andreas Kurth)
* [prim_sha2_pad,rtl] Refactor comparison on tx_count and msg len into
  signal (Andreas Kurth)
* [prim_sha2_pad,rtl] Fix setting of digest mode when continuing
  (Andreas Kurth)
* [hmac/prim_2,rtl] Do not clear redundant digest values (Ghada
  Dessouky)
* [prim,fpv] Tweak how a parameter gets used in some assertions
  (Rupert Swarbrick)
* [prim,fpv] Fix trivial lint warning in prim_fifo_sync_assert_fpv
  (Rupert Swarbrick)
* [prim,rtl] Fix trivial lint warning in prim_fifo_sync (Rupert
  Swarbrick)
* Launcher Modification (Youming Lu)
* [top_earlgrey,pinmux] Add input disable attribute for non-manual
  pads (Andreas Kurth)
* [dv] Add more prints to bit bash sequence (Rupert Swarbrick)
* [ipgen,flash_ctrl] Fix core files (Guillermo Maturana)
* [prim,rtl] Avoid unnecessary check in prim_esc_receiver.sv (Rupert
  Swarbrick)
* [prim,fpv] Use PossibleActions param in prim_esc_receiver (Rupert
  Swarbrick)
* [prim_diff_decode] Use `prim_xnor2` to detect integrity issue
  (Andreas Kurth)
* [prim] Fix typo'd loop increment (James Wainwright)
* [hmac/prim_sha2,rtl] Implement SW error for invalid HMAC config
  (Ghada Dessouky)
* [rom] Remove real and fake key targets. (Miguel Osorio)
* [prim_sha2,rtl/dv] Fix secret value wiping (Ghada Dessouky)
* [prim,rtl,fpv] Fix typo in assertion in prim_alert_receiver (Rupert
  Swarbrick)
* [fpv,prim] Drop prim_count_expected_failure.hjson (Rupert Swarbrick)
* [fpv,prim] Generalise from DecrNeverTrue to listing possible actions
  (Rupert Swarbrick)
* [prim,fpv] Correct assertions for commit_i input (Rupert Swarbrick)
* [prim,fpv] Rephrase some "backwards" assertions in prim_count
  (Rupert Swarbrick)
* [prim,fpv] Properly "waive" some unreachable prim_count assertions
  (Rupert Swarbrick)
* [prim,fpv] Fix width of FPV variable in prim_arbiter_ppc.sv (Rupert
  Swarbrick)
* [prim,fpv] Rephrase prim_count error assertions (Rupert Swarbrick)
* [prim,fpv] Fix port list in prim_count_tb (Rupert Swarbrick)
* [prim_ram_1p_scr] Align documentation with actual implementation
  (Pirmin Vogel)
* [prim, rom_ctrl] Increase number of PRINCE rounds for improved
  security (Pirmin Vogel)
* [prim,fpv] Make file structure slightly clearer (Rupert Swarbrick)
* [prim,fpv] Shorten a variable name (prim_hier -> hier) (Rupert
  Swarbrick)
* [prim,fpv] Tidy up and document some FPV macros (Rupert Swarbrick)
* [dvsim,lint] Fix bug in duplicate detection in lint parser (Rupert
  Swarbrick)
* [rtl,comments] Fix some comments (Guillermo Maturana)
* [dv,prim] Clarification of reset behavior (Adrian Lees)
* [ast] Add dependency in fileset_partner to select correct ast_pkg
  (Sharon Topaz)
* [prim,fpv] Only allow unconstrained counters in prim_count FPV
  (Rupert Swarbrick)
* [dvsim] Split and rename Modes.py (Rupert Swarbrick)
* [prim,dv] Tweak ASSERT_FINAL to be a no-op if FPV enabled (Rupert
  Swarbrick)
* [prim,tlul,rtl] Explicitly cast a "1" to specific number of bits
  (Rupert Swarbrick)
* [dvsim] Fix plurals in type names in Modes.py (Rupert Swarbrick)
* [dvsim] Move find_mode and find_and_merge_modes out of Modes class
  (Rupert Swarbrick)
* [dvsim] Die more cleanly on an invalid use of merge_mode (Rupert
  Swarbrick)
* [dvsim] Get rid of "mname" field in Modes.py (Rupert Swarbrick)
* [dvsim] Simplify named attribute lookup in Modes.py (Rupert
  Swarbrick)
* [dvsim] Get rid of pretty print magic in Modes.py (Rupert Swarbrick)
* [dvsim] Strengthen typing and simplify printing for modes in SimCfg
  (Rupert Swarbrick)
* [dvsim] Slightly tidy up SimCfg._print_list (Rupert Swarbrick)
* [dvsim] Get rid of an unused dictionary in OneShotCfg.py (Rupert
  Swarbrick)
* Add the project name to the copyright header (Michael Munday)
* Fix or waive Python lint errors and warnings (Pirmin Vogel)
* Remove trailing whitespaces (Pirmin Vogel)
* [dv,mem_bkdr] Fix handling of multiple tiles in sram (Guillermo
  Maturana)
* [hmac] Coding style and minor fixes (Ghada Dessouky)
* [dv] Remove phase argument from monitor's collect_trans (Rupert
  Swarbrick)
* [prim_fifo_sync_cnt] Minor code cleanup (Andreas Kurth)
* [dv,mem_bkdr] Fix digest calculation for hw_cfg0 (Guillermo
  Maturana)
* [prim_fifo_sync_cnt] Fix signedness of Depth parameter (Andreas
  Kurth)
* [prim_fifo_sync] Keep wraparound pointers contained within
  `prim_fifo_sync_cnt` (Andreas Kurth)
* [prim_fifo_sync] Move pointer and depth calculation to
  `prim_fifo_sync_cnt` (Andreas Kurth)
* [prim_fifo_sync] Remove out-commented RTL code (Andreas Kurth)
* [prim_fifo_sync_cnt] Improve module and parameter documentation
  (Andreas Kurth)
* [lint] Demote licence warning in AscentLint parser (Rupert
  Swarbrick)
* Revert "[dv] Remove phase argument from monitor's collect_trans"
  (Rupert Swarbrick)
* [dv] Fix parameter types in dv_base_mubi_cov.sv (Rupert Swarbrick)
* [dv] Remove phase argument from monitor's collect_trans (Rupert
  Swarbrick)
* [dv, xcelium] Use detachable reports to avoid CORS (Elliot Baptist)
* [otp_ctrl] Add fuse for late debug enable mechanism (Michael
  Schaffner)
* [prim] Add support for MuBi's up to 32bit (Michael Schaffner)
* [otp_ctrl] Increase Hamming distance in OTP commands (Michael
  Schaffner)
* [dv] Add checks to set_freq_*hz (Rupert Swarbrick)
* [dv] Fix more timeout comments with wrong units (Elliot Baptist)
* Make .core files pass FuseSoC 2 schema validator (Olof Kindgren)
* [dvsim] Run deepcopy to work around memory usage bug (Rupert
  Swarbrick)
* [dvsim] Make global_val handling a bit clearer (Rupert Swarbrick)
* [prim_sha2,rtl] Add key_length type and change type encodings (Ghada
  Dessouky)
* [dv,sram_ctrl] Fix a few failing tests (Guillermo Maturana)
* [topgen] Add field to specify status IRQ default behavior (Michael
  Schaffner)
* [dv] Update clear_all_interrupts to support status type (Michael
  Schaffner)

Signed-off-by: Pascal Nasahl <[email protected]>
  • Loading branch information
nasahlpa committed May 28, 2024
1 parent 50322d4 commit f99109d
Show file tree
Hide file tree
Showing 836 changed files with 4,301 additions and 2,230 deletions.
4 changes: 2 additions & 2 deletions vendor/lowrisc_ip.lock.hjson
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand All @@ -9,6 +9,6 @@
upstream:
{
url: https://github.com/lowRISC/opentitan
rev: e0c40265019aa0c74e6903d3b3a144c48a3815ec
rev: d268f271f4f75aeb8f3bf9624a497ae5bfb9c47e
}
}
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/common_ifs/clk_if.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
4 changes: 3 additions & 1 deletion vendor/lowrisc_ip/dv/sv/common_ifs/clk_rst_if.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -136,13 +136,15 @@ interface clk_rst_if #(

// set the clk frequency in khz
function automatic void set_freq_khz(int freq_khz);
`DV_CHECK_FATAL(freq_khz > 0, , msg_id)
clk_freq_mhz = $itor(freq_khz) / 1000;
clk_period_ps = 1000_000 / clk_freq_mhz;
recompute = 1'b1;
endfunction

// set the clk frequency in mhz
function automatic void set_freq_mhz(int freq_mhz);
`DV_CHECK_FATAL(freq_mhz > 0, , msg_id)
set_freq_khz(freq_mhz * 1000);
endfunction

Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/common_ifs/common_ifs.core
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CAPI=2:
# Copyright lowRISC contributors.
# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:dv:common_ifs"
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/common_ifs/common_ifs_pkg.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CAPI=2:
# Copyright lowRISC contributors.
# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:dv:entropy_subsys_fifo_exception_if"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/common_ifs/pins_if.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/common_ifs/pins_ifs.core
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CAPI=2:
# Copyright lowRISC contributors.
# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:dv:pins_if"
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/common_ifs/rst_shadowed_if.core
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CAPI=2:
# Copyright lowRISC contributors.
# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:dv:rst_shadowed_if"
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/common_ifs/rst_shadowed_if.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
17 changes: 13 additions & 4 deletions vendor/lowrisc_ip/dv/sv/csr_utils/csr_seq_lib.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -329,7 +329,19 @@ class csr_bit_bash_seq extends csr_base_seq;
`uvm_object_new

virtual task body();
int unsigned total_count = test_csrs.size();
int unsigned done_count = 0;

`uvm_info(`gtn,
$sformatf("Running bit bash sequence for %0d registers", total_count),
UVM_MEDIUM)
foreach (test_csrs[i]) begin
done_count++;
`uvm_info(`gtn,
$sformatf("Verifying register bit bash for %0s (register %0d/%0d)",
test_csrs[i].get_full_name(), done_count, total_count),
UVM_MEDIUM)

// check if parent block or register is excluded from write
if (is_excl(test_csrs[i], CsrExclWrite, CsrBitBashTest) ||
is_excl(test_csrs[i], CsrExclWriteCheck, CsrBitBashTest)) begin
Expand All @@ -338,9 +350,6 @@ class csr_bit_bash_seq extends csr_base_seq;
continue;
end

`uvm_info(`gtn, $sformatf("Verifying register bit bash for %0s",
test_csrs[i].get_full_name()), UVM_MEDIUM)

begin
uvm_reg_field fields[$];
string mode[`UVM_REG_DATA_WIDTH];
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/csr_utils/csr_utils.core
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CAPI=2:
# Copyright lowRISC contributors.
# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:dv:csr_utils"
Expand Down
7 changes: 6 additions & 1 deletion vendor/lowrisc_ip/dv/sv/csr_utils/csr_utils_pkg.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -26,10 +26,14 @@ package csr_utils_pkg;

function automatic void increment_outstanding_access();
outstanding_accesses++;
`uvm_info("csr_utils_pkg", $sformatf("increment_outstanding_access %0d", outstanding_accesses),
UVM_HIGH)
endfunction

function automatic void decrement_outstanding_access();
outstanding_accesses--;
`uvm_info("csr_utils_pkg", $sformatf("decrement_outstanding_access %0d", outstanding_accesses),
UVM_HIGH)
endfunction

task automatic wait_no_outstanding_access();
Expand Down Expand Up @@ -549,6 +553,7 @@ package csr_utils_pkg;
fork
while (!under_reset) begin
if (spinwait_delay_ns) #(spinwait_delay_ns * 1ns);
`uvm_info("csr_utils_pkg", "In csr_spinwait", verbosity)
csr_rd(.ptr(ptr), .value(read_data), .check(check), .path(path),
.blocking(1), .map(map), .user_ftdr(user_ftdr), .backdoor(backdoor));
`uvm_info(msg_id, $sformatf("ptr %0s == 0x%0h",
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_base_reg/csr_excl_item.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_base_reg/dv_base_mem.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
33 changes: 27 additions & 6 deletions vendor/lowrisc_ip/dv/sv/dv_base_reg/dv_base_mubi_cov.sv
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
// coverage object for a fixed width mubi
class mubi_cov #(parameter int Width = 4,
parameter int ValueTrue = prim_mubi_pkg::MuBi4True,
parameter int ValueFalse = prim_mubi_pkg::MuBi4False
) extends uvm_object;
parameter int unsigned ValueTrue = prim_mubi_pkg::MuBi4True,
parameter int unsigned ValueFalse = prim_mubi_pkg::MuBi4False) extends uvm_object;
`uvm_object_param_utils(mubi_cov #(Width, ValueTrue, ValueFalse))

// Collect true, false and at least N other values (N = Width)
Expand Down Expand Up @@ -43,6 +42,18 @@ typedef mubi_cov #(.Width(12),
typedef mubi_cov #(.Width(16),
.ValueTrue(prim_mubi_pkg::MuBi16True),
.ValueFalse(prim_mubi_pkg::MuBi16False)) mubi16_cov;
typedef mubi_cov #(.Width(20),
.ValueTrue(prim_mubi_pkg::MuBi20True),
.ValueFalse(prim_mubi_pkg::MuBi20False)) mubi20_cov;
typedef mubi_cov #(.Width(24),
.ValueTrue(prim_mubi_pkg::MuBi24True),
.ValueFalse(prim_mubi_pkg::MuBi24False)) mubi24_cov;
typedef mubi_cov #(.Width(28),
.ValueTrue(prim_mubi_pkg::MuBi28True),
.ValueFalse(prim_mubi_pkg::MuBi28False)) mubi28_cov;
typedef mubi_cov #(.Width(32),
.ValueTrue(prim_mubi_pkg::MuBi32True),
.ValueFalse(prim_mubi_pkg::MuBi32False)) mubi32_cov;

// a mubi coverage object, which allows to dynamically select the width of mubi
class dv_base_mubi_cov extends uvm_object;
Expand All @@ -53,6 +64,10 @@ class dv_base_mubi_cov extends uvm_object;
mubi8_cov m_mubi8_cov;
mubi12_cov m_mubi12_cov;
mubi16_cov m_mubi16_cov;
mubi20_cov m_mubi20_cov;
mubi24_cov m_mubi24_cov;
mubi28_cov m_mubi28_cov;
mubi32_cov m_mubi32_cov;

`uvm_object_utils(dv_base_mubi_cov)
`uvm_object_new
Expand All @@ -70,6 +85,10 @@ class dv_base_mubi_cov extends uvm_object;
8: m_mubi8_cov = mubi8_cov::type_id::create(cov_name);
12: m_mubi12_cov = mubi12_cov::type_id::create(cov_name);
16: m_mubi16_cov = mubi16_cov::type_id::create(cov_name);
20: m_mubi20_cov = mubi20_cov::type_id::create(cov_name);
24: m_mubi24_cov = mubi24_cov::type_id::create(cov_name);
28: m_mubi28_cov = mubi28_cov::type_id::create(cov_name);
32: m_mubi32_cov = mubi32_cov::type_id::create(cov_name);
default: `uvm_fatal(`gfn, $sformatf("Unsupported mubi width (%0d) is used", mubi_width))
endcase
endfunction : create_cov
Expand All @@ -80,9 +99,11 @@ class dv_base_mubi_cov extends uvm_object;
8: m_mubi8_cov.sample(value);
12: m_mubi12_cov.sample(value);
16: m_mubi16_cov.sample(value);
20: m_mubi20_cov.sample(value);
24: m_mubi24_cov.sample(value);
28: m_mubi28_cov.sample(value);
32: m_mubi32_cov.sample(value);
default: `uvm_fatal(`gfn, $sformatf("Unsupported mubi width (%0d) is used", mubi_width))
endcase
endfunction : sample
endclass : dv_base_mubi_cov


2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_base_reg/dv_base_reg.core
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CAPI=2:
# Copyright lowRISC contributors.
# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:dv:dv_base_reg"
Expand Down
11 changes: 10 additions & 1 deletion vendor/lowrisc_ip/dv/sv/dv_base_reg/dv_base_reg.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -102,6 +102,15 @@ class dv_base_reg extends uvm_reg;
end
endfunction

// Return a mask of read-only bits in the register.
virtual function uvm_reg_data_t get_ro_mask();
dv_base_reg_field flds[$];
this.get_dv_base_reg_fields(flds);
foreach (flds[i]) begin
get_ro_mask |= flds[i].get_ro_mask();
end
endfunction

// this function can only be called when this reg is intr_state reg
// Example: ral.intr_state.get_intr_pins_exp_value(). And it returns value of
// intr_state & intr_enable, which represents value of interrupt pins
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_base_reg/dv_base_reg_block.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
12 changes: 10 additions & 2 deletions vendor/lowrisc_ip/dv/sv/dv_base_reg/dv_base_reg_field.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -143,7 +143,7 @@ class dv_base_reg_field extends uvm_reg_field;
uvm_reg_field intr_state_fld = get_intr_state_field();
uvm_reg_data_t predict_val;
if (intr_state_fld.get_access == "RO") begin // status interrupt
predict_val = field_val;
predict_val = field_val | intr_state_fld.get_reset();
end else begin // regular W1C interrupt
`DV_CHECK_STREQ(intr_state_fld.get_access, "W1C")
predict_val = field_val | `gmv(intr_state_fld);
Expand Down Expand Up @@ -188,11 +188,19 @@ class dv_base_reg_field extends uvm_reg_field;
return m_original_access;
endfunction

// Return a mask of valid bits in the field.
virtual function uvm_reg_data_t get_field_mask();
get_field_mask = (1'b1 << this.get_n_bits()) - 1;
get_field_mask = get_field_mask << this.get_lsb_pos();
endfunction

// Return a mask of read-only bits in the field.
virtual function uvm_reg_data_t get_ro_mask();
bit is_ro = (this.get_access() == "RO");
get_ro_mask = (is_ro << this.get_n_bits()) - is_ro;
get_ro_mask = get_ro_mask << this.get_lsb_pos();
endfunction

virtual function void set_original_access(string access);
if (m_original_access == "") begin
m_original_access = access;
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_base_reg/dv_base_reg_map.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_base_reg/dv_base_reg_pkg.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
3 changes: 1 addition & 2 deletions vendor/lowrisc_ip/dv/sv/dv_lib/dv_base_agent.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -65,4 +65,3 @@ class dv_base_agent #(type CFG_T = dv_base_agent_cfg,
endfunction

endclass

2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_lib/dv_base_agent_cfg.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_lib/dv_base_agent_cov.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
3 changes: 1 addition & 2 deletions vendor/lowrisc_ip/dv/sv/dv_lib/dv_base_driver.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -34,4 +34,3 @@ class dv_base_driver #(type ITEM_T = uvm_sequence_item,
endtask

endclass

2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_lib/dv_base_env.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ip/dv/sv/dv_lib/dv_base_env_cfg.sv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright lowRISC contributors.
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

Expand Down
Loading

0 comments on commit f99109d

Please sign in to comment.