Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Writing Blockrams in VHDL

Reply
Thread Tools

Writing Blockrams in VHDL

 
 
Mark van de Belt
Guest
Posts: n/a
 
      11-13-2003
Hello,

I need to use a blockram as a FIFO to port data from one clock domain to
another. I created a blockram with help of the language template. This
blockram is recognised by the XST synthesiser. The dual clock is also
recognised after a small modification. The next problem is to describe a
databus width conversion. There is a 32 bit processor bus on one side and a
1 bit serial output on the other side. This is no problem with a library
element or a blockram instance from the coregen. I don't like the coregen
modules because it is not easy to back-up your sources or transport them to
another PC. The library instances make the code less portable. Is there a
way to describe the width conversion in VHDL without creating extra logic
outside of the blockram?

Thanks,
Mark


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.538 / Virus Database: 333 - Release Date: 10-11-2003


 
Reply With Quote
 
 
 
 
Peter Alfke
Guest
Posts: n/a
 
      11-13-2003
Mark, I cannot help you with the VHDL, but recently having investigated
a similar design, here are some issues:

Asynchronous clocks mean that Empty and Full detection must cross the
clock domain boundary, and simple comparators are bound to fail, unless
you use Gray-coded addresses.
The dual-width design, when going from narrow to wide, must deal with
the issue of a partially assembled word still meaning "empty".
All this becomes tricky at >200 MHz, but should be manageable at lower frequencies.
Dual-clock FIFOs implemented in a dual-ported BlockRAM are trivial,
until you have to detect Empty (Full is usually an avoidable situation
that allows some cheating, but Empty can be tricky.)
Peter Alfke

Mark van de Belt wrote:
>
> Hello,
>
> I need to use a blockram as a FIFO to port data from one clock domain to
> another. I created a blockram with help of the language template. This
> blockram is recognised by the XST synthesiser. The dual clock is also
> recognised after a small modification. The next problem is to describe a
> databus width conversion. There is a 32 bit processor bus on one side and a
> 1 bit serial output on the other side. This is no problem with a library
> element or a blockram instance from the coregen. I don't like the coregen
> modules because it is not easy to back-up your sources or transport them to
> another PC. The library instances make the code less portable. Is there a
> way to describe the width conversion in VHDL without creating extra logic
> outside of the blockram?
>
> Thanks,
> Mark
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.538 / Virus Database: 333 - Release Date: 10-11-2003

 
Reply With Quote
 
 
 
 
Mark van de Belt
Guest
Posts: n/a
 
      11-14-2003
Thanks Peter for the warnings.
We are building a FIFO with normal binary counters, but the empty and full
signals are not based on bytes but on 64 byte packets. Therefore there is
enough time to get a reliable empty and full indication in both clock
domains. We also have the advantage that our clocks are 'slow' (40 - 50
MHz). I have build these FIFO's with success before in other projects, but
always with the aid of the core generator or library elements (the latter
code is unreadable because 4 - 6 blockrams are instantiated for one
blockram)

Mark

"Peter Alfke" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> Mark, I cannot help you with the VHDL, but recently having investigated
> a similar design, here are some issues:
>
> Asynchronous clocks mean that Empty and Full detection must cross the
> clock domain boundary, and simple comparators are bound to fail, unless
> you use Gray-coded addresses.
> The dual-width design, when going from narrow to wide, must deal with
> the issue of a partially assembled word still meaning "empty".
> All this becomes tricky at >200 MHz, but should be manageable at lower

frequencies.
> Dual-clock FIFOs implemented in a dual-ported BlockRAM are trivial,
> until you have to detect Empty (Full is usually an avoidable situation
> that allows some cheating, but Empty can be tricky.)
> Peter Alfke
>
> Mark van de Belt wrote:
> >
> > Hello,
> >
> > I need to use a blockram as a FIFO to port data from one clock domain to
> > another. I created a blockram with help of the language template. This
> > blockram is recognised by the XST synthesiser. The dual clock is also
> > recognised after a small modification. The next problem is to describe a
> > databus width conversion. There is a 32 bit processor bus on one side

and a
> > 1 bit serial output on the other side. This is no problem with a library
> > element or a blockram instance from the coregen. I don't like the

coregen
> > modules because it is not easy to back-up your sources or transport them

to
> > another PC. The library instances make the code less portable. Is there

a
> > way to describe the width conversion in VHDL without creating extra

logic
> > outside of the blockram?
> >
> > Thanks,
> > Mark
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.538 / Virus Database: 333 - Release Date: 10-11-2003



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.538 / Virus Database: 333 - Release Date: 10-11-2003


 
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
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
BPSK on VHDL (warning - VHDL newbie) pygmalion VHDL 6 06-23-2006 07:30 PM
VHDL 2002 vs VHDL 1993 dude VHDL 1 03-23-2006 01:18 PM
multiD-vhdl: Multi Dimensional Arrays (allowing generics on each dimension) for VHDL (including ports) albert.neu@gmail.com VHDL 2 03-21-2006 04:05 PM
what's the difference between VHDL 93 CONCATENATION and VHDL 87 CONCATENATION? walala VHDL 3 09-18-2003 04:17 AM



Advertisments