YosysHQ / icestorm

Project IceStorm - Lattice iCE40 FPGAs Bitstream Documentation (Reverse Engineered)
ISC License
963 stars 224 forks source link

icetime: Parse PCF files with -pullup and -pullup_resistor in set_io directives #291

Closed maikmerten closed 2 years ago

maikmerten commented 2 years ago

According to https://github.com/YosysHQ/nextpnr/blob/master/docs/ice40.md it is possible to specify pullups with set_io:

set_io [-nowarn] [-pullup yes|no] [-pullup_resistor 3P3K|6P8K|10K|100K] port pin

Currently, icetime does not discard these additional tokens, which leads to a failed assertion that expects exactly two tokens pwer set_io-line. This pull request includes logic to discard surplus tokens.