Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Idea to implement ring buffer

 
Thread Tools Search this Thread
Old 10-23-2009, 04:58 PM   #1
Default Idea to implement ring buffer


Hello all,
i am trying to implement a ring buffer of size 8.
The data given to fpga is sent to a ring buffer and it waits until buffer is full.Once it is full it should send data out so that avoiding data overwritten.
I would appreciate if anyone guide me through this vhdl code.


KSR
KSR is offline   Reply With Quote
Old 10-27-2009, 12:11 PM   #2
KSR
Junior Member
 
Join Date: Oct 2009
Posts: 12
Default
Hello everybody,
Pls help me how to design a ring buffer in vhdl..i am in dire need of it!!


KSR
KSR is offline   Reply With Quote
Old 10-27-2009, 12:51 PM   #3
jeppe
Senior Member
 
Join Date: Mar 2008
Location: Denmark
Posts: 245
Default
Hi - try this link (copy to the browser)

jjmk.dk/MMMI/Lessons/07_Memory/No6_FIFObuffers/index.htm

you will find a rather simple way to implement a ringbuffer, however will a solution which implement a counter to keep track of the numbers at the stack give some advantages.


jeppe
jeppe is offline   Reply With Quote
Old 10-27-2009, 01:07 PM   #4
KSR
Junior Member
 
Join Date: Oct 2009
Posts: 12
Default
thanks,
i came to know that ring buffer is a fifo without enables..
whts this mean??


KSR
KSR is offline   Reply With Quote
Old 10-27-2009, 04:25 PM   #5
KSR
Junior Member
 
Join Date: Oct 2009
Posts: 12
Default
well, i tried this code for declaring an array
and i got the o/p as for every rising edge of clk a value is written into array
can anyone help me out how to develop ring buffer from it..

package arrays is
type a1 is array (1 to 7) of integer;
constant sample:a1:=(1,2,3,4,5,6,7);
end arrays;
Library ieee;
use ieee.std_logic_arith.all;
use work.arrays.all;
use ieee.std_logic_1164.all;

entity ringsam is
port(clk : in std_logic;
--inp : in INTEGER RANGE 0 to 3;
o : out integer
--a : inout a1
);
end ringsam;

architecture ringsam1 of ringsam is
begin
process (clk)
variable i : integer range 0 to 7;
begin
if rising_edge(clk)then
i:=i+1;
--for i in 0 to 7 loop
if (i<7) then
o<=sample(i);

else
o<=sample(i);
i:=0;
end if;
end if;

end process;
end ringsam1;


KSR
KSR is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Security aldrich.chappel.com.use@gmail.com A+ Certification 0 11-27-2007 02:11 AM
Buffer Overrun Error (Windows\Explorer.exe) 911pyro General Help Related Topics 2 06-01-2007 02:48 AM
Newbie question - Buffer underruns and Nerovision Express telba most DVD Video 1 03-07-2005 11:14 PM
Microsoft to Implement Worldwide Anti-Piracy Initiative Bum A+ Certification 0 03-04-2005 08:28 PM
buffer problem when burning mqq13 DVD Video 5 02-02-2005 12:47 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46