Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > SRAM used as FIFO?

Reply
Thread Tools

SRAM used as FIFO?

 
 
Jo Schambach
Guest
Posts: n/a
 
      02-22-2006
I have a board on which SRAM is attached to an Altera Cyclone-II FPGA. I
would like to use the SRAM as a FIFO. The memory is capable of running
at 160MHz, the spec for the FIFO is 40MHz, so the SRAM could easily be
cycle-shared between read and write.
I can imagine that this kind of problem is very common, so my question:
Has anybody already written VHDL to control the SRAM in such a way that
it acts like a FIFO? If so, would you be willing to share your design?


--
Dr Joachim Schambach
The University of Texas at Austin
Department of Physics
1 University Station C1600
Austin, Texas 78712-0264, USA
Phone: (512) 471-1303; FAX: (814) 295-5111
e-mail:
 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      02-23-2006
Jo Schambach wrote:

> I can imagine that this kind of problem is very common, so my question:
> Has anybody already written VHDL to control the SRAM in such a way that
> it acts like a FIFO? If so, would you be willing to share your design?


A synchronous fifo is just an SRAM that uses
a push or pop counter for write or read addresses.
Here is the guts of a block-ram based design:

begin
if rising_edge(clk) then
if we = '1' then
mem(to_integer(push_tail_ptr)) <= data_i; -- raw address
end if;
data_q <= mem(to_integer(pop_head_ptr));
end if;
end process ram_access;



-- Mike Treseler
 
Reply With Quote
 
 
 
 
Jo Schambach
Guest
Posts: n/a
 
      02-23-2006
I forgot to mention:
the SRAM is actually a ZBT synchronous pipelined SRAM, so the data needs
to be presented to the SRAM 2 cycles after the control in Write
transactions, and also is available 2 cycles after control in Read
transactions.

Jo

Mike Treseler wrote:
> A synchronous fifo is just an SRAM that uses
> a push or pop counter for write or read addresses.
> Here is the guts of a block-ram based design:
>
> begin
> if rising_edge(clk) then
> if we = '1' then
> mem(to_integer(push_tail_ptr)) <= data_i; -- raw address
> end if;
> data_q <= mem(to_integer(pop_head_ptr));
> end if;
> end process ram_access;
>
>
>
> -- Mike Treseler



--
Dr Joachim Schambach
The University of Texas at Austin
Department of Physics
1 University Station C1600
Austin, Texas 78712-0264, USA
Phone: (512) 471-1303; FAX: (814) 295-5111
e-mail:
 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      02-24-2006
Jo Schambach wrote:
> I forgot to mention:
> the SRAM is actually a ZBT synchronous pipelined SRAM, so the data needs
> to be presented to the SRAM 2 cycles after the control in Write
> transactions, and also is available 2 cycles after control in Read
> transactions.


Well,
write some code, run some sims
or find someone in your department who can.

-- Mike Treseler
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simulation Model for SRAM ALuPin VHDL 2 02-22-2004 03:05 AM
How do I model a 6T SRAM cell in VHDL KM VHDL 1 12-05-2003 08:30 PM
Reading back SRAM content via JTAG? moe VHDL 3 11-16-2003 02:22 PM
SRAM vs Cache Michael VHDL 4 09-22-2003 08:31 AM
write data to Sram and then read to PC sarah VHDL 1 08-13-2003 10:08 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57