Skip to content

Commit

Permalink
fixup! coherence: Pack Valid/Dirty SRAM (#36)
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Wistoff <[email protected]>
  • Loading branch information
niwis committed Sep 27, 2024
1 parent c27af8b commit 8620406
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions common/local/util/sram_pulp.sv
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ module sram #(
$fatal(1, "sram_pulp: USER_WIDTH needs to be equal to DATA_WIDTH (if USER_EN is set).");
end

end else begin
end else begin : gen_mem_user
assign ruser_o = '0;
// synthesis translate_off
begin : i_tc_sram_user
localparam type data_t = logic [DATA_WIDTH-1:0];
data_t init_val [0:0];
data_t sram [NUM_WORDS-1:0] /* verilator public_flat */;
end
// synthesis translate_on
end

endmodule : sram
4 changes: 2 additions & 2 deletions corev_apu/tb/ariane_tb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,11 @@ int main(int argc, char **argv) {
#if (VERILATOR_VERSION_INTEGER >= 5000000)
// Verilator v5: Use rootp pointer and .data() accessor.
#define MEM top->rootp->ariane_testharness__DOT__i_sram__DOT__i_tc_sram__DOT__sram.m_storage
#define MEM_USER top->rootp->ariane_testharness__DOT__i_sram__DOT__gen_cut__BRA__0__KET____DOT__gen_mem_user__DOT__i_tc_sram_wrapper_user__DOT__i_tc_sram__DOT__sram.m_storage
#define MEM_USER top->rootp->ariane_testharness__DOT__i_sram__DOT__gen_mem_user__DOT__i_tc_sram_user__DOT__sram.m_storage
#else
// Verilator v4
#define MEM top->ariane_testharness__DOT__i_sram__DOT__i_tc_sram__DOT__sram
#define MEM_USER top->ariane_testharness__DOT__i_sram__DOT__gen_cut__BRA__0__KET____DOT__gen_mem_user__DOT__i_tc_sram_wrapper_user__DOT__i_tc_sram__DOT__sram
#define MEM_USER top->ariane_testharness__DOT__i_sram__DOT__gen_mem_user__DOT__i_tc_sram_user__DOT__sram
#endif
long long addr;
long long len;
Expand Down

0 comments on commit 8620406

Please sign in to comment.