FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-09-2003, 07:00 PM
Simone Winkler
Guest
 
Posts: n/a
Default FIFO design

Hello!

I want to build a FIFO for a special purpose:
I've got a microcontroller that interfaces to a SDRAM via an
SDRAM-interface. The microcontrollers data width is 16 bit while the
SDRAM-interface needs 32 bit (if i write something to the sdram, in the
first clock cycle, the interface needs the bank, row and column address (32
bit) and in the second clock cycle the data (only 16 bit, the upper 16bit
are just don't care)).
Now I need a FIFO that converts the 2x16 bit to one 32-bit word. Timing is
not important, only the 2 words of 32 bit have to be sent one clock cycle
after the other. (so i don't need a "doubling" of the clock rate, just a
method to combine the two incoming words) could it work with a kind of shift
register?

Thank you for your help!

Simone

Reply With Quote
  #2 (permalink)  
Old 12-09-2003, 07:58 PM
Peter Alfke
Guest
 
Posts: n/a
Default Re: FIFO design

Simone, when you call this a FIFO, it makes it sound complicated and
creates fear of non-synchronous problems. But this does not seem to be
the case here.
I would just use the appropriate number of registers with the right
input muzes and a tiny state machine that makes them do the right thing
at the right time. You need to consider the required frequency or time response.
Should be quite simple.

Peter Alfke
=================
Simone Winkler wrote:
>
> Hello!
>
> I want to build a FIFO for a special purpose:
> I've got a microcontroller that interfaces to a SDRAM via an
> SDRAM-interface. The microcontrollers data width is 16 bit while the
> SDRAM-interface needs 32 bit (if i write something to the sdram, in the
> first clock cycle, the interface needs the bank, row and column address (32
> bit) and in the second clock cycle the data (only 16 bit, the upper 16bit
> are just don't care)).
> Now I need a FIFO that converts the 2x16 bit to one 32-bit word. Timing is
> not important, only the 2 words of 32 bit have to be sent one clock cycle
> after the other. (so i don't need a "doubling" of the clock rate, just a
> method to combine the two incoming words) could it work with a kind of shift
> register?
>
> Thank you for your help!
>
> Simone

Reply With Quote
  #3 (permalink)  
Old 12-09-2003, 09:51 PM
Simone Winkler
Guest
 
Posts: n/a
Default Re: FIFO design

Hello!

I meant that I need a FIFO + this special "feature" to convert the data to
the right length. I thought that i could solve this problem by building a
special FIFO.

How could I solve this problem?

Thanks, Simone

"Peter Alfke" <[email protected]> schrieb im Newsbeitrag
news:[email protected]..
: Simone, when you call this a FIFO, it makes it sound complicated and
: creates fear of non-synchronous problems. But this does not seem to be
: the case here.
: I would just use the appropriate number of registers with the right
: input muzes and a tiny state machine that makes them do the right thing
: at the right time. You need to consider the required frequency or time
response.
: Should be quite simple.
:
: Peter Alfke
: =================
: Simone Winkler wrote:
: >
: > Hello!
: >
: > I want to build a FIFO for a special purpose:
: > I've got a microcontroller that interfaces to a SDRAM via an
: > SDRAM-interface. The microcontrollers data width is 16 bit while the
: > SDRAM-interface needs 32 bit (if i write something to the sdram, in the
: > first clock cycle, the interface needs the bank, row and column address
(32
: > bit) and in the second clock cycle the data (only 16 bit, the upper
16bit
: > are just don't care)).
: > Now I need a FIFO that converts the 2x16 bit to one 32-bit word. Timing
is
: > not important, only the 2 words of 32 bit have to be sent one clock
cycle
: > after the other. (so i don't need a "doubling" of the clock rate, just a
: > method to combine the two incoming words) could it work with a kind of
shift
: > register?
: >
: > Thank you for your help!
: >
: > Simone

Reply With Quote
  #4 (permalink)  
Old 12-09-2003, 10:19 PM
Peter Alfke
Guest
 
Posts: n/a
Default Re: FIFO design

Simone, I was just commenting on the name FIFO, whichin some minds
(including mine) paints a picture of significant depth and complexity.

In your case, I assume you just need one or two or four 16-bit wide
registers with the appropriate multiplexers.

At slow speed, this is trivial. At 200 MHz, you have to be a little careful.
If you want to discuss details, contact me per e-mail (even in German).

Peter Alfke
=========================
Simone Winkler wrote:
>
> Hello!
>
> I meant that I need a FIFO + this special "feature" to convert the data to
> the right length. I thought that i could solve this problem by building a
> special FIFO.
>
> How could I solve this problem?
>
> Thanks, Simone
>
> "Peter Alfke" <[email protected]> schrieb im Newsbeitrag
> news:[email protected]..
> : Simone, when you call this a FIFO, it makes it sound complicated and
> : creates fear of non-synchronous problems. But this does not seem to be
> : the case here.
> : I would just use the appropriate number of registers with the right
> : input muzes and a tiny state machine that makes them do the right thing
> : at the right time. You need to consider the required frequency or time
> response.
> : Should be quite simple.
> :
> : Peter Alfke
> : =================
> : Simone Winkler wrote:
> : >
> : > Hello!
> : >
> : > I want to build a FIFO for a special purpose:
> : > I've got a microcontroller that interfaces to a SDRAM via an
> : > SDRAM-interface. The microcontrollers data width is 16 bit while the
> : > SDRAM-interface needs 32 bit (if i write something to the sdram, in the
> : > first clock cycle, the interface needs the bank, row and column address
> (32
> : > bit) and in the second clock cycle the data (only 16 bit, the upper
> 16bit
> : > are just don't care)).
> : > Now I need a FIFO that converts the 2x16 bit to one 32-bit word. Timing
> is
> : > not important, only the 2 words of 32 bit have to be sent one clock
> cycle
> : > after the other. (so i don't need a "doubling" of the clock rate, just a
> : > method to combine the two incoming words) could it work with a kind of
> shift
> : > register?
> : >
> : > Thank you for your help!
> : >
> : > Simone

Reply With Quote
  #5 (permalink)  
Old 12-10-2003, 12:31 AM
Mike Treseler
Guest
 
Posts: n/a
Default Re: FIFO design

Peter Alfke wrote:

> I would just use the appropriate number of registers with the right
> input muxes and a tiny state machine that makes them do the right thing
> at the right time.


Well said.

Thinking only in terms "well know" logic blocks
can obscure the real requirements,
and the real fpga resources.

-- Mike Treseler

Reply With Quote
  #6 (permalink)  
Old 12-10-2003, 07:19 PM
Mike Lewis
Guest
 
Posts: n/a
Default Re: FIFO design

If you make the FIFO 32 bits wide on both ports.
Then alternate between writing to the lower
and upper half of the 32 bit datapath on the
"16 bit" side of the fifo you have effectively
converted from 16 to 32 bits when travelling through the
FIFO.

"Simone Winkler" <[email protected]> wrote in message
news:[email protected]..
> Hello!
>
> I want to build a FIFO for a special purpose:
> I've got a microcontroller that interfaces to a SDRAM via an
> SDRAM-interface. The microcontrollers data width is 16 bit while the
> SDRAM-interface needs 32 bit (if i write something to the sdram, in the
> first clock cycle, the interface needs the bank, row and column address

(32
> bit) and in the second clock cycle the data (only 16 bit, the upper 16bit
> are just don't care)).
> Now I need a FIFO that converts the 2x16 bit to one 32-bit word. Timing is
> not important, only the 2 words of 32 bit have to be sent one clock cycle
> after the other. (so i don't need a "doubling" of the clock rate, just a
> method to combine the two incoming words) could it work with a kind of

shift
> register?
>
> Thank you for your help!
>
> Simone
>



Reply With Quote
  #7 (permalink)  
Old 12-11-2003, 04:42 PM
Simone Winkler
Guest
 
Posts: n/a
Default Re: FIFO design

Thank you! And how can i realize a 32-bit wide FIFO? At the moment I use the
Xilinx-FIFO-designs for Spartan-II. They use block ram - but the biggest
module i can get is 16bit-wide. Is it possible to use 2 instances of
ramb4_s16_s16 and drive each instance with the same clock, enable signals
and so on?

Thank you,

Simone


"Mike Lewis" <[email protected]> schrieb im Newsbeitrag
news:[email protected]..
: If you make the FIFO 32 bits wide on both ports.
: Then alternate between writing to the lower
: and upper half of the 32 bit datapath on the
: "16 bit" side of the fifo you have effectively
: converted from 16 to 32 bits when travelling through the
: FIFO.

Reply With Quote
  #8 (permalink)  
Old 12-11-2003, 05:39 PM
Peter Alfke
Guest
 
Posts: n/a
Default Re: FIFO design

Yes, you can.
Peter Alfke

Simone Winkler wrote:
>
> Thank you! And how can i realize a 32-bit wide FIFO? At the moment I use the
> Xilinx-FIFO-designs for Spartan-II. They use block ram - but the biggest
> module i can get is 16bit-wide. Is it possible to use 2 instances of
> ramb4_s16_s16 and drive each instance with the same clock, enable signals
> and so on?
>
> Thank you,
>
> Simone
>
> "Mike Lewis" <[email protected]> schrieb im Newsbeitrag
> news:[email protected]..
> : If you make the FIFO 32 bits wide on both ports.
> : Then alternate between writing to the lower
> : and upper half of the 32 bit datapath on the
> : "16 bit" side of the fifo you have effectively
> : converted from 16 to 32 bits when travelling through the
> : FIFO.

Reply With Quote
  #9 (permalink)  
Old 12-11-2003, 10:31 PM
Mike Lewis
Guest
 
Posts: n/a
Default Re: FIFO design

I'm not sure if you can use the canned FIFOs from coregen.
What you really need is a FIFO with byte write enables.
You might have to design your own FIFO with this feature.

Mike

"Simone Winkler" <[email protected]> wrote in message
news:[email protected]..
> Thank you! And how can i realize a 32-bit wide FIFO? At the moment I use

the
> Xilinx-FIFO-designs for Spartan-II. They use block ram - but the biggest
> module i can get is 16bit-wide. Is it possible to use 2 instances of
> ramb4_s16_s16 and drive each instance with the same clock, enable signals
> and so on?
>
> Thank you,
>
> Simone
>
>
> "Mike Lewis" <[email protected]> schrieb im Newsbeitrag
> news:[email protected]..
> : If you make the FIFO 32 bits wide on both ports.
> : Then alternate between writing to the lower
> : and upper half of the 32 bit datapath on the
> : "16 bit" side of the fifo you have effectively
> : converted from 16 to 32 bits when travelling through the
> : FIFO.
>



Reply With Quote
  #10 (permalink)  
Old 12-11-2003, 11:32 PM
Peter Alfke
Guest
 
Posts: n/a
Default Re: FIFO design

The problem here is that Simone never explained what she is really out
to do.
Is there really a need for a FIFO of significant depth, or can one just
use a few registers ? Where do the 32 bit address and the 16-bit data
come from, and since the other 16 data bits are don't care, why are they
not just ignored ?

As long as we are being kept in the dark about the real intention, any
suggested "solution" is meaningless.
Sorry, Simone, for being so blunt.

Peter Alfke
=============================

Mike Lewis wrote:
>
> I'm not sure if you can use the canned FIFOs from coregen.
> What you really need is a FIFO with byte write enables.
> You might have to design your own FIFO with this feature.
>
> Mike
>
> "Simone Winkler" <[email protected]> wrote in message
> news:[email protected]..
> > Thank you! And how can i realize a 32-bit wide FIFO? At the moment I use

> the
> > Xilinx-FIFO-designs for Spartan-II. They use block ram - but the biggest
> > module i can get is 16bit-wide. Is it possible to use 2 instances of
> > ramb4_s16_s16 and drive each instance with the same clock, enable signals
> > and so on?
> >
> > Thank you,
> >
> > Simone
> >
> >
> > "Mike Lewis" <[email protected]> schrieb im Newsbeitrag
> > news:[email protected]..
> > : If you make the FIFO 32 bits wide on both ports.
> > : Then alternate between writing to the lower
> > : and upper half of the 32 bit datapath on the
> > : "16 bit" side of the fifo you have effectively
> > : converted from 16 to 32 bits when travelling through the
> > : FIFO.
> >

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fifo interface design Readon Verilog 1 11-08-2007 03:29 PM
need FIFO design matereial vishnu Verilog 0 03-17-2006 05:48 AM
telling design compiler/vision to use SRAM to synthesize FIFO [email protected] Verilog 2 05-03-2005 07:05 PM
FIFO's Raji Verilog 3 08-19-2004 09:12 AM


All times are GMT +1. The time now is 12:44 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved