-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[membkdr] Provide a tile adapter to access internal rows
Signed-off-by: Robert Schilling <[email protected]>
- Loading branch information
Showing
7 changed files
with
82 additions
and
15 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright lowRISC contributors (OpenTitan project). | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Provide an abstract way to access the memory rows | ||
// | ||
// Integrators can subclass this to privide a specfic way of accessing a memory row | ||
// and incorporate the phyical architecture. | ||
// | ||
class mem_bkdr_util_row_adapter; | ||
|
||
// A row might have additional extra bits | ||
protected uint32_t num_extra_bits = 0; | ||
|
||
// Return the number of extra bits of this row architecture | ||
function uint32_t get_num_extra_bits(); | ||
return num_extra_bits; | ||
endfunction | ||
|
||
// Translates a raw read UVM data raw from the memory in a contigious | ||
// row of memory. | ||
// | ||
virtual function uvm_hdl_data_t read_row(uvm_hdl_data_t read_data); | ||
return read_data; | ||
endfunction | ||
|
||
// Translates a contigious UVM data row to the internal organzation of a row | ||
// that can be written to the memory. | ||
// | ||
virtual function uvm_hdl_data_t write_row(uvm_hdl_data_t write_data); | ||
return write_data; | ||
endfunction | ||
|
||
// Writes a 39 bit word into the row data depending on the memory architecture | ||
virtual function uvm_hdl_data_t access_row_data39(bit [bus_params_pkg::BUS_AW-1:0] addr, | ||
logic [38:0] data, | ||
uvm_hdl_data_t row_data); | ||
row_data[38:0] = data; | ||
return row_data; | ||
endfunction | ||
endclass |
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