Skip to content

Commit

Permalink
[prim] Minor fix to make conn checks easy
Browse files Browse the repository at this point in the history
There are 2 changes in this commit - the first is to `prim_ram_2p_pkg`,
which swizzles the order of the cfg structs to match exactly what AST
emits. The second is to the simulation memload utility which enables the
paths to memories to be displayed on a plusarg.

Signed-off-by: Srikrishna Iyer <[email protected]>
  • Loading branch information
Srikrishna Iyer authored and sriyerg committed Oct 19, 2021
1 parent e041a96 commit 7e18769
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hw/ip/prim/rtl/prim_ram_2p_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ package prim_ram_2p_pkg;

typedef struct packed {
cfg_t a_ram_fcfg; // configuration for a port
cfg_t a_ram_lcfg; // configuration for a port
cfg_t b_ram_fcfg; // configuration for b port
cfg_t a_ram_lcfg; // configuration for a port
cfg_t b_ram_lcfg; // configuration for b port
} ram_2p_cfg_t;

Expand Down
6 changes: 6 additions & 0 deletions hw/ip/prim/rtl/prim_util_memload.svh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
`endif

initial begin
bit show_mem_paths;

// Print the hierarchical path to the memory to help make formal connectivity checks easy.
void'($value$plusargs("show_mem_paths=%0b", show_mem_paths));
if (show_mem_paths) $display("%m");

if (MemInitFile != "") begin : gen_meminit
$display("Initializing memory %m from file '%s'.", MemInitFile);
$readmemh(MemInitFile, mem);
Expand Down

0 comments on commit 7e18769

Please sign in to comment.