0
\$\begingroup\$

I have a question regarding Xilinx Vivado. I don't really know how to explain it, but I'll give it a try and hopefully you will know what I mean.

In Vivado, you can instantiate primitives for example an IDDR. I need 15 IDDRs, is it enough when I instantiate one? The instantiation looks like this:

  IBUFDS_inst : IBUFDS
   generic map (
      DIFF_TERM => FALSE, -- Differential Termination 
      IBUF_LOW_PWR => TRUE, -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards
      IOSTANDARD => "DEFAULT")
   port map (
      O => O,  -- Buffer output
      I => DIN1P,  -- Diff_p buffer input (connect directly to top-level port)
      IB => DIN1N -- Diff_n buffer input (connect directly to top-level port)
   );
   

But I also need IDDRs for DIN2P, DIN2N till DIN15P,DIN15N. Do I have to instantiate this component 15 times?

\$\endgroup\$
8
  • \$\begingroup\$ Think of each instantiation as a virtual device on a virdual PCB. The value before the ":" is the reference designator, and the IBUFDS is the part number. You would need 16 buffers on a real board, so you need 16 buffers in your VHDL as well. You can use a generate statement to create them all at once to save some typing. \$\endgroup\$
    – crj11
    Nov 29, 2020 at 22:43
  • \$\begingroup\$ @crj11 so I can just call them IBUFDS_inst : IBUFDS1 and so on? \$\endgroup\$
    – Yoomo
    Nov 30, 2020 at 12:21
  • 1
    \$\begingroup\$ The correct format would be BUF1 : IBUFDS, BUF2 : IBUFDS, BUF3 : IBUFDS ... The BUFx is the equivalent to the reference designator on a schematic and IBUFDS is equivalent to the part number. \$\endgroup\$
    – crj11
    Nov 30, 2020 at 13:12
  • \$\begingroup\$ Thanks I used the generate statement at it works. Doing it like "BUF1 : IBUFDS, BUF2 : IBUFDS, BUF3 : IBUFDS" gave me errors \$\endgroup\$
    – Yoomo
    Nov 30, 2020 at 13:58
  • \$\begingroup\$ I guess I should have been more specific. The format is BUF1 : IBUFDS <generic map + port map>; BUF2 : IBUFDS <generic map + port map>; BUF3 : IBUFDS <generic map + port map>; . The commas were meant to imply a sequence of instantiations. \$\endgroup\$
    – crj11
    Nov 30, 2020 at 14:02

1 Answer 1

1
\$\begingroup\$

The best way to instantiate multiple repetitive structures such as multiple IBUF is with the for generate statement. Here is an example for the above IBUF.

IBUFDSgen: for i in 9 downto 0 generate --instantiates 10 IBUFs

  IBUFDS_inst : IBUFDS
   generic map (
      DIFF_TERM => FALSE, -- Differential Termination 
      IBUF_LOW_PWR => TRUE, -- Low power (TRUE) vs. performance (FALSE) setting for referenced I/O standards
      IOSTANDARD => "DEFAULT")
   port map (
      O => O(i),  -- Buffer output
      I => DIN1P(i),  -- Diff_p buffer input (connect directly to top-level port)
      IB => DIN1N(i) -- Diff_n buffer input (connect directly to top-level port)
   );
end generate IBUFDSgen;
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.