Skip to content

Commit

Permalink
Moved construction of memory from architecture declaration to process
Browse files Browse the repository at this point in the history
  • Loading branch information
JimLewis committed Dec 29, 2023
1 parent b5b106a commit 8aaf808
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/DpRam_Singleton.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,20 @@ architecture Singleton of DpRam is
constant RESOLVED_MEMORY_NAME : string :=
IfElse(MEMORY_NAME /= "", MEMORY_NAME, to_lower(PathTail(DpRam'PATH_NAME))) ;

constant Mem : MemoryIdType := NewID(
Name => RESOLVED_MEMORY_NAME,
AddrWidth => ADDR_WIDTH,
DataWidth => DATA_WIDTH,
Search => NAME
) ;
signal Mem : MemoryIdType ;

signal iDataOutA, iDataOutB : std_logic_vector(DATA_WIDTH-1 downto 0) ;
begin
Initialize : process
begin
Mem <= NewID(
Name => RESOLVED_MEMORY_NAME,
AddrWidth => ADDR_WIDTH,
DataWidth => DATA_WIDTH,
Search => NAME
) ;
wait ;
end process Initialize ;

MemProcA : process (ClkA)
begin
Expand Down

0 comments on commit 8aaf808

Please sign in to comment.