X
Xin Xiao
Guest
I'm designing a cache memory using a Finite State Machine (in vhdl). This is
the template code:
process (Clk, Reset)
begin
if (Reset = '1') then
STATE <= RESET_STATE;
elsif (rising_edge(Clk)) then
STATE <= NEXT_STATE;
end if;
process (STATE)
variable cache : cache_type;
begin
case STATE is
...
...
end case;
end if;
The problem is that I'm getting millions of warnings from my synthesis tool
because it is inferring latches for variable cache, I suppose this is
because the second process (where I put/get data from the memory) is not
clocked and I'm not assigning values for cache variable in every state (of
course, a memory should keep previous data intact!). Simulation works well
but I'm afraid I will get sim/synth mismatches. What do you think? I don't
think a latch would be a good idea to model a cache memory...
the template code:
process (Clk, Reset)
begin
if (Reset = '1') then
STATE <= RESET_STATE;
elsif (rising_edge(Clk)) then
STATE <= NEXT_STATE;
end if;
process (STATE)
variable cache : cache_type;
begin
case STATE is
...
...
end case;
end if;
The problem is that I'm getting millions of warnings from my synthesis tool
because it is inferring latches for variable cache, I suppose this is
because the second process (where I put/get data from the memory) is not
clocked and I'm not assigning values for cache variable in every state (of
course, a memory should keep previous data intact!). Simulation works well
but I'm afraid I will get sim/synth mismatches. What do you think? I don't
think a latch would be a good idea to model a cache memory...