| Author |
Message |
KSR24
Joined: 29 Oct 2009 Posts: 2
|
03 Nov 2009 14:50 idea about Double buffering |
|
|
|
|
HI,
I am trying to implement double buffer in vhdl ...i.e., i would like to declare two arrays such that as soon as first one is filled the index should point to second array's first element. While the second array is filling the read pointer should read contents of first array so that making it empty and process goes on..
Can anyone give me some idea how to declare read, write pointers,index??
Thanks,
Kavya.
|
|
| Back to top |
|
 |
Google AdSense

|
03 Nov 2009 14:50 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
kalyansrinivas
Joined: 07 Jul 2007 Posts: 66 Helped: 1
|
04 Nov 2009 4:22 Re: idea about Double buffering |
|
|
|
|
Yes you can do that It is mostly used for working with real time issues
Decalre two buffers and make one control logic for controlling both the buffers(Moore State machine )
Regards
M Kalyan srinivas
|
|
| Back to top |
|
 |
KSR24
Joined: 29 Oct 2009 Posts: 2
|
05 Nov 2009 19:27 idea about Double buffering |
|
|
|
|
@ kalyan
Thanks for sharing an idea. As a first step i tried to implement ring buffer referring one of the threads in this edaboard.
But i am worried that i didnt get expected waveform..
Can u have a look to fix this??
Thanks,
KSR.
Added after 1 hours 34 minutes:
@kalyan,
i am sorry some how i lost the names of the ports in wave form...
here i give
(top down to bottom)
clk
reset
wr(write)
rd(read)
w_data(input data)
r_data(output data)
empty
full..
_________________________
heres the entity of my code..
entity fifoeda is
generic (
B : natural :=8; -- number of bit
W: natural :=4 -- number of address bit
);
port (
clk, reset : in std_logic;
rd, wr : in std_logic;
w_data : in std_logic_vector ( B-1 downto 0);
empty, full : out std_logic;
r_data : out std_logic_vector (B-1 downto 0)
);
end fifoeda;
|
|
| Back to top |
|
 |