hdl.{dsl,mem,xfrm}: inject appropriate source locations.
authorwhitequark <cz@m-labs.hk>
Mon, 8 Jul 2019 09:50:07 +0000 (09:50 +0000)
committerwhitequark <cz@m-labs.hk>
Mon, 8 Jul 2019 09:58:12 +0000 (09:58 +0000)
commit6086ae1c4f902bccf924d01efd51edf53456ff0b
tree37d4de8e1a6b39b0b7979cffca71a7014bb4eb9d
parentd2a72034350edc6402b53fca8ab692a602463522
hdl.{dsl,mem,xfrm}: inject appropriate source locations.

This primarily fixes the problem with source location precision in
Module (which used to trace locations from __exit__ of the context
managers, by which point everything interesting has been lost), but
also improves memory port and control inserter source locations.

On the sample of examples/basic/*.py, the only incorrectly inferred
remaining location is clk pointing to hdl/mem.py:166.
nmigen/hdl/ast.py
nmigen/hdl/dsl.py
nmigen/hdl/mem.py
nmigen/hdl/xfrm.py