How to Identify Differential Input Pin Pairs and Instantiate a Differential (LVDS) Input Using SB_IO in iCEcube2?

How to Identify Differential Input Pin Pairs and Instantiate a Differential (LVDS) Input Using SB_IO in iCEcube2?

Description

The differential input pin pairs for iCE40 UltraLite devices are listed in the device's package pinout file, not in the data sheet. 

example pair:
A differential input is created with a single SB_IO primitive on the TRUE pad of the pair, with IO_STANDARD set to "SB_LVDS_INPUT".

Applies to:

  • Devices: iCE40 UltraLite family (iCE40UL640, iCE40UL1K). The procedure was verified on iCE40UL1K in the 36-ball ucBGA package.
  • Software: iCEcube2. The procedure was verified on iCEcube2 2020.12.
  • Operating system: Windows. The procedure was verified on Windows.

Resolution

Step 1 – Identify the differential pair in the pinout file

  1. Download the pinout file for your device: the iCE40UL1K Pinout or the iCE40UL640 Pinout.
  2. Open the sheet for your package.
  3. Use the TRUE and COMP columns to identify the pair. The TRUE pin is the positive input and the COMP pin is the negative input.
    • Example: on the iCE40UL1K 36-ball ucBGA package, ball A3 is a TRUE pin and its COMP pin is ball B2.
  4. Always confirm the pairing in the pinout file.

Step 2 – Instantiate a single SB_IO on the TRUE pin

Instantiate only one SB_IO, for the TRUE (positive) pin. Do not instantiate a second SB_IO for the COMP pin. The software reserves the COMP pin automatically.

module diff_rx_top (
input wire lvds_in_p, // Assign to the TRUE pin of a differential pair
output wire diff_in
);
SB_IO #(
.PIN_TYPE (6'b000001), // Simple input, no output
.PULLUP (1'b0), // No pull-up
.NEG_TRIGGER (1'b0), // Rising edge
.IO_STANDARD ("SB_LVDS_INPUT") // or "SB_SUBLVDS_INPUT"
) u_diff_rx (
.PACKAGE_PIN (lvds_in_p),
.LATCH_INPUT_VALUE (),
.CLOCK_ENABLE (),
.INPUT_CLK (),
.OUTPUT_CLK (),
.OUTPUT_ENABLE (),
.D_OUT_0 (),
.D_OUT_1 (),
.D_IN_0 (diff_in),
.D_IN_1 ()
);

endmodule

Parameter notes:

  • PIN_TYPE[1:0] = 01 sets the pin as a simple (non-registered) input.
  • PIN_TYPE[5:2] = 0000 disables the output path.
  • IO_STANDARD = "SB_LVDS_INPUT" tells iCEcube2 that the pin is a differential input.
  • The example does not enable the internal pull-up.

Step 3 – Assign the pin in iCEcube2

  1. Compile the design in iCEcube2.
  2. Open the Pin Constraint Editor.
  3. Assign the input port (din_p in the example, lvds_in_p) to the TRUE pin only (A3 in the example). Leave the COMP pin unassigned.

Step 4 – Verify the pair assignment

  1. Run place and route.
  2. Open the CSV pin report generated by iCEcube2.
  3. Confirm that the COMP pin (B2 in the example) has been reserved automatically as the negative input of the differential pair.

  • iCE40 UltraLite Family Data Sheet: Section 3.1.7.4 (Differential Comparators) and Section 5.2 (Pin Information Summary)
  • iCE40UL1K Pinout
  • iCE40UL640 Pinout
  • iCE40 Technology Library: SB_IO primitive and PIN_TYPE definitions
  • Related FAQ: iCE40 UltraPlus: How utilize Differential Input pairs on an iCE40 device? (FAQ 6161)

Keywords

iCE40 UltraLite, iCE40UL1K, iCE40UL640, differential input, differential comparator, LVDS input, SB_LVDS_INPUT, SB_IO, PIN_TYPE, IO_STANDARD, TRUE pin, COMP pin, differential pair, pinout, Pin Constraint Editor, iCEcube2