X
Xin Xiao
Guest
I have two modules: one is a cache memory and the other is a RAM memory.
I have this piece of code inside a process with sensitivity list (in
cache.vhd):
Mem_address <= ...;
Mem_RW <= '0'; -- We want to read
Mem_enable <= '1';
Result := Mem_result;
....
Mem_result is a signal connected to the RAM module data output. I think this
is wrong because I can't expect the RAM to put the values in the output
instantly. Right? How could I "wait" for the RAM to put the output and then
storing it in variable "Result"?
What I thought is to put the line "Result := Mem_result;" inside another
state (cache.vhd is a FSM). I think this would work but I'm open to other
suggestions as well.
thanks
I have this piece of code inside a process with sensitivity list (in
cache.vhd):
Mem_address <= ...;
Mem_RW <= '0'; -- We want to read
Mem_enable <= '1';
Result := Mem_result;
....
Mem_result is a signal connected to the RAM module data output. I think this
is wrong because I can't expect the RAM to put the values in the output
instantly. Right? How could I "wait" for the RAM to put the output and then
storing it in variable "Result"?
What I thought is to put the line "Result := Mem_result;" inside another
state (cache.vhd is a FSM). I think this would work but I'm open to other
suggestions as well.
thanks