Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

idea about Double buffering

Status
Not open for further replies.

KSR24

Newbie level 3
Joined
Oct 29, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
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.
 

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
 

@ 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;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top