Sign in

username:

password:



Not a member?

Search Comp.Arch.FPGA



Search tips

fpga by Keywords

Altera | ASIC | CPLD | Cyclone | DCM | DDR | DSP | Ethernet | ISE | JTAG | Linux | LVDS | Microblaze | ML310 | Modelsim | NIOS | OPB | PCI | Quartus | RocketIO | SDRAM | Spartan | Spartan3 | SRAM | Stratix | Verilog | VHDL | Virtex | Virtex-4 | Virtex-II | Xilinx | XST


Ads

See Also

DSPEmbedded SystemsElectronics

Comp.Arch.FPGA | Verilog simple dual port memory with different input and output widths?

There are 3 messages in this thread.

You are currently looking at messages 0 to 3.

Verilog simple dual port memory with different input and output widths? - davew - 2007-09-18 13:41:00

Has anyone got any example Verilog code for this?
 I'm currently using
Quartus wizard generated code and wrapping it up in a Verilog module
so I can use my own parameters instead of running the wizard each time
I need a new variation (which is a complete pain).  I thought that
perhaps inferring the memory might yield better and more efficient
results.

Ta.

______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.



Re: Verilog simple dual port memory with different input and output widths? - Kevin Neilson - 2007-09-24 17:32:00

davew wrote:
> Has anyone got any example Verilog code for this?  I'm currently using
> Quartus wizard generated code and wrapping it up in a Verilog module
> so I can use my own parameters instead of running the wizard each time
> I need a new variation (which is a complete pain).  I thought that
> perhaps inferring the memory might yield better and more efficient
> results.
> 
> Ta.
> 
I have such a piece of code but it only works for Xilinx parts.  (Which 
you should use.)  Most likely the synthesizer will not infer RAMs of 
different port widths from a behavioral description.  My code takes 
Verilog parameters that are passed in and then uses 'generates' to 
instantiate an array of the correct blockRAM primitives with the 
primitive parameters set for asymmetric port widths if necessary. 
You'll probably need to do something similar if you want an HDL 
solution.  I'm not sure why the tools don't support this yet.  A 
behavioral description of an asymmetric RAM is slightly awkward, but 
definitely doable.
-Kevin
______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: Verilog simple dual port memory with different input and output widths? - davew - 2007-09-25 11:44:00

On 24 Sep, 22:32, Kevin Neilson
<kevin_neil...@removethiscomcast.net>
wrote:
> davew wrote:
> > Has anyone got any example Verilog code for this?  I'm currently using
> > Quartus wizard generated code and wrapping it up in a Verilog module
> > so I can use my own parameters instead of running the wizard each time
> > I need a new variation (which is a complete pain).  I thought that
> > perhaps inferring the memory might yield better and more efficient
> > results.
>
> > Ta.
>
> I have such a piece of code but it only works for Xilinx parts.  (Which
> you should use.)  Most likely the synthesizer will not infer RAMs of
> different port widths from a behavioral description.  My code takes
> Verilog parameters that are passed in and then uses 'generates' to
> instantiate an array of the correct blockRAM primitives with the
> primitive parameters set for asymmetric port widths if necessary.
> You'll probably need to do something similar if you want an HDL
> solution.  I'm not sure why the tools don't support this yet.  A
> behavioral description of an asymmetric RAM is slightly awkward, but
> definitely doable.
> -Kevin

Thanks,
I haven't tried to infer because I wasn't sure how to tackle the
Verilog for differing port widths.
It can be done easily with the wizard, but this is cumbersome when it
comes to writing a neat re-usable unit.
Dave.