gateware/icE1usb: Add custom pre-pack optimizations to fix build

Without theses there are too many control-sets generated by yosys and
nextpnr can't find any valid placement.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2020-10-09 13:40:16 +02:00
parent 6da9424dcb
commit bd399e96da
3 changed files with 16 additions and 3 deletions

@ -1 +1 @@
Subproject commit e9d0d86baff55e1341ccd0ab510eb7e17f9c0fb7
Subproject commit f281c76d9610564d2100221ff05b2927e8aec6e6

View File

@ -36,9 +36,9 @@ BOARD ?= ice1usb
DEVICE := up5k
PACKAGE := sg48
YOSYS_SYNTH_ARGS = -dffe_min_ce_use 4
SEED ?= 15
NEXTPNR_ARGS := --no-promote-globals --pre-pack data/clocks.py --seed $(SEED)
YOSYS_SYNTH_ARGS :=
NEXTPNR_ARGS := --pre-pack data/clocks.py --pre-pack data/opt.py --seed $(SEED)
ifeq ($(IGNORE_TIMING),1)
NEXTPNR_ARGS += --timing-allow-fail

View File

@ -0,0 +1,13 @@
#!/usr/bin/env python3
import os
import sys
# Add import path to script provided by no2build
sys.path.insert(0, os.path.join(os.getenv('NO2BUILD_DIR', '../build'), 'sw'))
import ice40_opt_cset
import ice40_opt_lutdup
ice40_opt_cset.run_opt(ctx, threshold=8)
ice40_opt_lutdup.run_opt(ctx)