build.{dsl,res,plat}: apply clock constraints to signals, not resources.
authorwhitequark <whitequark@whitequark.org>
Wed, 5 Jun 2019 08:48:36 +0000 (08:48 +0000)
committerwhitequark <whitequark@whitequark.org>
Wed, 5 Jun 2019 08:52:30 +0000 (08:52 +0000)
commitc9879c795bf7d5ad2e34106c0cf1adc6a22e070b
tree26c094bf98ac9240f5d35fd8c2d59d6e0f291a37
parentab3f103e5a26f7f0bb982d08fb96ebd8a0fc7f4b
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.
nmigen/build/__init__.py
nmigen/build/dsl.py
nmigen/build/plat.py
nmigen/build/res.py
nmigen/test/test_build_dsl.py
nmigen/test/test_build_res.py
nmigen/vendor/lattice_ice40.py