Skip to content

Commit

Permalink
Added assertion to enforce eSRAM block capacity limit
Browse files Browse the repository at this point in the history
  • Loading branch information
NAtre committed Mar 21, 2022
1 parent 87b0e91 commit c1abfe7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pigasus/hardware/rtl_sim/src/buffer/esram_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ esrm_sim (
);

`else

// Sanity check: When using eSRAM, ensure that the packet buffer depth
// doesn't exceed the maximum capacity of a single eSRAM block (on the
// S10 MX, with a 520-bit pktbuf DWIDTH, this corresponds to 2K * 42).
localparam MAX_ESRAM_DEPTH = (2048 * 42);
if (PKTBUF_DEPTH > MAX_ESRAM_DEPTH) begin
$error("PKTBUF_DEPTH (%0d) exceeds eSRAM block capacity (%0d)",
PKTBUF_DEPTH, MAX_ESRAM_DEPTH);
end

logic [71:0] c0_q; // ram_output.s2c0_qb_0
logic [71:0] c1_q; // .s2c1_qb_0
logic [71:0] c2_q; // .s2c2_qb_0
Expand Down

0 comments on commit c1abfe7

Please sign in to comment.