YosysHQ / nextpnr

nextpnr portable FPGA place and route tool
ISC License
1.24k stars 237 forks source link

nextpnr-ice40 reports wrong number of resources for U1K and U2K #1266

Closed vicencb closed 6 months ago

vicencb commented 6 months ago

The commands nextpnr-ice40 --u1k --package sg48 and nextpnr-ice40 --u2k --package sg48 both report:

Info: Device utilisation:
Info:            ICESTORM_LC:     x/ 3520     x%
Info:           ICESTORM_RAM:     x/   20     x%
Info:                  SB_IO:     x/   96     x%
Info:                  SB_GB:     x/    8     x%
Info:           ICESTORM_PLL:     x/    1     x%
Info:            SB_WARMBOOT:     x/    1     x%
Info:           ICESTORM_DSP:     x/    4     x%
Info:         ICESTORM_HFOSC:     x/    1     x%
Info:         ICESTORM_LFOSC:     x/    1     x%
Info:                 SMCCLK:     x/    1     x%
Info:                 SB_I2C:     x/    2     x%
Info:                 SB_SPI:     x/    2     x%
Info:         SB_LED_DRV_CUR:     x/    1     x%
Info:             SB_RGB_DRV:     x/    1     x%

The data from the datasheet is:

Part Number                   iCE5LP1K iCE5LP2K iCE5LP4K
Logic Cells (LUT + Flip-Flop)     1100     2048     3520
EBR Memory Blocks                   16       20       20
PLL Block                            1        1        1
DSP Blocks                           2        4        4
Hardened I2C, SPI                  1,1      2,2      2,2
HF Oscillator                        1        1        1
LF Oscillator                        1        1        1
 24 mA LED Sink                      3        3        3
500 mA LED Sink                      1        1        1
Embedded PWM IP                    Yes      Yes       No
Packages                      Total User I/O Count
36-ball WLCSP                       26       26       26 
36-ball ucfBGA                      26       26       26 
48-pin  QFN                         39       39       39

There are mismatches at LC, RAM, IO, DSP, I2C and SPI resource counts.

Tested with version nextpnr-0.6-152-gb4ca68c8

gatecat commented 6 months ago

The Ultra 1k and 2k devices are simply marketing limits, with a total resource count limit implemented in the Lattice software (it's not even locking to a region of the chip).

This limit is not replicated in nextpnr.