2
\$\begingroup\$

A design has a number of simulation ports that should not be tied to FPGA pins.

A VHDL example is shown in the source below, where the sim_only_* ports are for simulation only, thus should not be mapped to FPGA pins.

entity mdl is
  port(
    -- FPGA pins
    clk_i : in  std_logic;
    rst_i : in  std_logic;
    a_i   : in  std_logic;
    z_o   : out std_logic;
    -- Simulation pins only
    sim_only_in  : in  std_logic := '0';
    sim_only_out : out std_logic);
end entity;

The sim_only_* pins can be safely left unused by Quartus, since the inputs have default value.

When running Quartus, the mapper tries to map the sim_only_* ports to unused FPGA pins, which is not desired.

How can I specify that Quartus should just ignore the sim_only_* ports on the VHDL design?

\$\endgroup\$
6
  • \$\begingroup\$ Edit the SDC file, remove all lines that mapped these pins. \$\endgroup\$ – Mitu Raj May 20 at 5:56
  • 2
    \$\begingroup\$ Does this answer your question: Setting FPGA pins as virtual? \$\endgroup\$ – megasplash May 20 at 8:17
  • \$\begingroup\$ @MituRaj: There are no mapping of the simulation pins only, but the problem is that Quartus does a default mapping of unused ports to free FPGA pin. However, the unused simulation ports only should be ignored instead. \$\endgroup\$ – EquipDev May 20 at 10:53
  • \$\begingroup\$ @megasplash: Thanks, that is the solution :-) If you care to write an answer, I will upvote and select it. Otherwise, I will write an answer myself in a couple of days, so others can have the information available here at StackOverflow. \$\endgroup\$ – EquipDev May 20 at 10:54
  • \$\begingroup\$ Verilog has compiler directives that are useful for this sort of thing. Using these, you can have 2 sections of code: one of which is used for simulation and one for synthesis. For obvious reasons, you don't want to lean too heavily on this technique. VHDL has pragmas, but I don't have direct experience with VHDL. (`ifdef etc). \$\endgroup\$ – Troutdog May 27 at 15:12
4
\$\begingroup\$

There is a useful option to use a Virtual Pin assignment. It is often used when compiling a design with a number of pins that exceeds the available physical pin count of a target device. For example, this can be useful to make preliminary estimations for some module, which is only a part of a whole design.

Making a pin virtual can be done via Assignment Editor (Ctrl+Shift+A) like this:

Virtual pin assignment

[Assignment] Specifies whether an I/O element in a lower-level design entity can be temporarily mapped to a logic element and not to a pin during compilation. The virtual pin is then implemented as a LUT. This option should be specified only for I/O elements that become nodes when imported to the top-level design.

Here is a related video on Using Virtual Pins from Intel FPGA website.

\$\endgroup\$
1
  • \$\begingroup\$ Very nice answer. Thanks a lot for the help :-) \$\endgroup\$ – EquipDev May 21 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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