Commit graph

13 commits

Author SHA1 Message Date
whitequark ab3f103e5a build.dsl: replace extras= with Attrs().
This change proved more tricky than expected due to downstream
dependencies, so it also includes some secondary refactoring.
2019-06-05 07:02:08 +00:00
whitequark 4310254103 build.res: use ConstraintError iff a constraint invariant is violated.
In particular don't use it for type errors.
2019-06-04 11:00:11 +00:00
whitequark ed64880cc4 build.{plat,res}: add support for connectors.
Fixes #77.
2019-06-03 15:02:15 +00:00
whitequark 41adcc3f97 vendor.fpga.lattice_ice40: implement differential input buffers. 2019-06-03 08:38:12 +00:00
whitequark 6fae06aea9 build.{dsl,plat,res}: allow dir="oe".
Although a dir="oe" pin is generally equivalent to dir="io" pin with
the i* signal(s) disconnected, they are not equivalent, because some
pins may not be able to support input buffers at all, either because
there are no input buffers, or because the input buffers are consumed
by some other resource.

E.g. this can happen on iCE40 when the input buffer is consumed by
a PLL.
2019-06-03 04:42:55 +00:00
whitequark 9ba2efd86b build.{res,plat}: use xdr=0 as default, not xdr=1.
The previous behavior was semantically incorrect.
2019-06-03 03:36:32 +00:00
whitequark cd6488c782 build.res: allow requesting raw ports, with dir="-".
This provides an escape hatch for the case where the nMigen platform
code is not flexible enough, and a IO buffer primitive needs to be
instantiated directly.
2019-06-03 03:36:32 +00:00
whitequark dc17d06fe9 vendor.fpga.lattice_ice40: instantiate SB_IO and apply extras.
The PULLUP and PULLUP_RESISTOR extras are representable in the PCF
file. The IO_STANDARD extra, however, can only be an SB_IO parameter.
2019-06-03 02:51:59 +00:00
whitequark fb01854372 build.{res,plat}: propagate extras to pin fragment factories.
This is necessary because on some platforms, like iCE40, extras
become parameters on an IO primitive, since the constraint file
format is not expressive enough for all of them.
2019-06-03 01:58:43 +00:00
whitequark 98497b2075 build.dsl: require a dict for extras instead of a stringly array.
Fixes #72.
2019-06-02 23:36:21 +00:00
whitequark 53ddff9f33 build.res: always return a Pin record.
In the simple cases, a Pin record consisting of exactly one field
is equivalent in every way to this single field. In the more complex
case however, it can be used as a record, making the code more robust
such that it works with both bidirectional and unidirectional pins.
2019-06-01 16:41:30 +00:00
whitequark 8c1b5a26b3 build.res: accept a list of clocks in ConstraintManager constructor. 2019-06-01 15:41:41 +00:00
Jean-François Nguyen d393c5ec64 build.res: add ConstraintManager. 2019-05-26 01:26:58 +00:00