wrote:
> A couple of answers:
>
> "Infer from the code". If the synthesizer is smart, it can spot a RAM
> in your code, and automatically utilize a block RAM (or distributed
> RAM) primitive.
>
> Last time I checked, Xilinx's XST was _not_ that smart. Other's are,
> but if you're using XST you'll probably need to use CoreGen.
>
> I agree about accomidating the hardware with your coding. One thing I
> do is put wrappers around any vendor-specific primitives. That way if
> I wind up porting the code, I know where to find the "problems".
>
> Your 10-bit wide RAM can be made from an 8-bit & a 2-bit in parallel.
>
> If you have a sparse addressing space, you can do "interesting" things
> with the address bits to realize them.
>
> I once built a 192x12 memory using tactics similar to the above.
>
>
The "horse's mouth" on inferring logic in Xilinx parts is the Libraries
Guide (versions exist for the different FPGA families).
It gives generic VHDL (& Verilog) templates, which will infer each of
the major primitives.
I haven't tried using those templates with a non-standard bus width, but
if it fails, it's pretty trivial to pad the unused bits to the next
larger size.