Skip to content

Conversation

@ducky64
Copy link
Collaborator

@ducky64 ducky64 commented Feb 3, 2025

Merges DigitalSingleSource into DigitalSource, plus a bunch of associated changes. Infrastructure to support an AbstractComparator class, which can have open-drain and push-pull outputs. Resolves #387

Core compiler changes:

  • Sum(BoolArray) does a counting operation. Add Vector.count(elt => BoolExpr) and ArrayExpr.count() in the frontend.
  • More robust NaN (RangeEmpty) propagation to reduce compiler crashes

Model and part changes:

  • DigitalSource now supports separate high / low (open-drain) / push-pull / no driver (pullup / down) ports. Some of the reasons why DigitalSingleSource was necessary before are obsoleted by introducing the concept of bridged internal ports, which have some checks disabled (here, presence of a signal driver) which could resolved by the upper-level link.
  • Support DigitalSink with internal pullup / pulldown (as is common on reset pins)
  • Improve I2C bridge parameter propagation when pullup is not connected (eg, in an inner link)
  • Change SWD and ESP32 reset ports to use DigitalSource pulldown - kind of a hack, but a bit cleaner than before
  • Change chip reset modeling to use DigitalSink with pullup
  • Generate netlists for blinky examples

@ducky64 ducky64 merged commit 2fa08c8 into master Feb 3, 2025
11 checks passed
@ducky64 ducky64 deleted the abstract-comparator branch February 3, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improving Digital port types

2 participants