22// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33// SPDX-License-Identifier: Apache-2.0
44
5- // base register reg class which will be used to generate the reg mem
5+ // Specialised version of uvm_mem for OpenTitan
6+ //
7+ // The specialised version adds the possibilities that a memory:
8+ //
9+ // - might not support partial writes (even if the bus would otherwise support them).
10+ //
11+ // - might store integrity data but not check it (merely passing it through to the next read).
612
713class dv_base_mem extends uvm_mem ;
8-
9- // if mem doesn't support partial write, doing that will result d_error = 1
14+ // If true, the memory supports partial writes. If not, any partial write will get an error
15+ // response ( d_error=1 in TileLink).
1016 local bit mem_partial_write_support;
1117
12- // Modifies the expectation of writes / reads to RO / WO mem. By default it should be an error
13- // response, but some implementations may choose to just ignore it.
14- local bit write_to_ro_mem_ok;
15- local bit read_to_wo_mem_ok;
16-
17- // if data integrity is passthru, mem stores integrity along with data but it won't check the
18- // data integrity
18+ // If true, mem stores integrity along with data but it won't check the data integrity
1919 local bit data_intg_passthru;
2020
2121 // Create a new instance of the memory abstraction class.
@@ -33,12 +33,6 @@ class dv_base_mem extends uvm_mem;
3333 extern function void set_data_intg_passthru (bit enable);
3434 extern function bit get_data_intg_passthru ();
3535
36- extern function void set_write_to_ro_mem_ok (bit ok);
37- extern function bit get_write_to_ro_mem_ok ();
38-
39- extern function void set_read_to_wo_mem_ok (bit ok);
40- extern function bit get_read_to_wo_mem_ok ();
41-
4236 // This overrides uvm_mem::configure (which is *not* a virtual function), removing the check that
4337 // the requested "access" is RW or RO, because we want to support WO as well.
4438 //
@@ -72,22 +66,6 @@ function bit dv_base_mem::get_data_intg_passthru();
7266 return data_intg_passthru;
7367endfunction
7468
75- function void dv_base_mem::set_write_to_ro_mem_ok (bit ok);
76- write_to_ro_mem_ok = ok;
77- endfunction
78-
79- function bit dv_base_mem::get_write_to_ro_mem_ok ();
80- return write_to_ro_mem_ok;
81- endfunction
82-
83- function void dv_base_mem::set_read_to_wo_mem_ok (bit ok);
84- read_to_wo_mem_ok = ok;
85- endfunction
86-
87- function bit dv_base_mem::get_read_to_wo_mem_ok ();
88- return read_to_wo_mem_ok;
89- endfunction
90-
9169// Note: This is a copied version of uvm_mem::configure, but tweaked to remove the check on m_access
9270// (loosened slightly and now moved to the constructor)
9371function void dv_base_mem::configure (uvm_reg_block parent, string hdl_path= " " );
0 commit comments