Commit graph

11 commits

Author SHA1 Message Date
whitequark 0b844da4cf build.{dsl,res}: allow removing attributes from subsignals.
This is useful when most attributes in a large composite resource
are the same, but a few signals are different, and also when building
abstractions around resources.

Fixes #128.
2019-07-08 10:42:10 +00:00
whitequark f0c1c2cfeb build.dsl: allow assertions on subsignal widths.
This is useful when building abstractions around resources where
the pin names are user-specified.

Fixes #129.
2019-07-08 10:42:06 +00:00
whitequark efb2d773c3 build.{dsl,res,plat}: add PinsN and DiffPairsN. 2019-06-12 14:42:39 +00:00
whitequark c9879c795b build.{dsl,res,plat}: apply clock constraints to signals, not resources.
This adds the Clock() build DSL element, and adds a resource manager
function add_clock_constraint() that takes a Pin or a Signal.
Note that not all platforms, in particular not any nextpnr platforms
at the moment, can add constraints on arbitrary signals.

Fixes #86.
2019-06-05 08:52:30 +00:00
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 a013eb1f59 build.dsl: add support for connectors. 2019-06-03 13:47:00 +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 98497b2075 build.dsl: require a dict for extras instead of a stringly array.
Fixes #72.
2019-06-02 23:36:21 +00:00
whitequark 3a9fe31133 build.dsl: make Pins and DiffPairs iterable.
Returns pin names.
2019-05-25 22:43:48 +00:00
whitequark 48145cee02 build.dsl: improve repr of Pins() and DiffPairs(). 2019-05-25 22:43:23 +00:00
Jean-François Nguyen dd5bd1c88d build: add DSL for defining platform resources. 2019-04-24 11:49:01 +00:00