Skip to content

Commit

Permalink
[cw305] Export flash_ctrl info pages for CW305
Browse files Browse the repository at this point in the history
Since englishbreakfast on the CW305 shares an MMI script with earlgrey,
add the same memory breakdown so info pages may be spliced.

Signed-off-by: Alexander Williams <[email protected]>
  • Loading branch information
a-will committed Dec 23, 2024
1 parent 645ad07 commit a02a7c6
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hw/top_englishbreakfast/chip_englishbreakfast_cw305.core
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "English Breakfast toplevel for the ChipWhisperer CW305 board"
filesets:
files_rtl_cw305:
depend:
- lowrisc:prim_xilinx:prim_xilinx_default_pkg
- lowrisc:prim_xilinx:englishbreakfast_xilinx_prim_pkg
- lowrisc:systems:top_englishbreakfast:0.1
- lowrisc:systems:ast
- lowrisc:systems:topgen
Expand Down
19 changes: 19 additions & 0 deletions hw/top_englishbreakfast/englishbreakfast_xilinx_prim_pkg.core
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CAPI=2:
# 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:prim_xilinx:englishbreakfast_xilinx_prim_pkg"
description: "Prim configuration for englishbreakfast"
virtual:
- lowrisc:prim_xilinx:prim_xilinx_pkg
filesets:
files_rtl:
files:
- rtl/prim_xilinx_pkg.sv
file_type: systemVerilogSource

targets:
default: &default_target
filesets:
- files_rtl
20 changes: 20 additions & 0 deletions hw/top_englishbreakfast/rtl/prim_xilinx_pkg.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

package prim_xilinx_pkg;

// Accommodates updatemem by breaking up flash info arrays into data and
// metadata subarrays. The 76-bit width and 1 BRAM depth identifies these
// memories in earlgrey, and we limit the subarray size to 64 bits, which is
// the size of the data portion. The leftover 12 bits get placed into their
// own memory with a unique hierarchical path. See prim_xilinx_ram_1p.sv to
// see how this works.
function automatic int get_ram_max_width(int width, int depth);
if (width == 76 && depth < 4096) begin
return 64;
end
return 0;
endfunction

endpackage : prim_xilinx_pkg

0 comments on commit a02a7c6

Please sign in to comment.