hdl.{dsl,mem,xfrm}: inject appropriate source locations.
authorwhitequark <whitequark@whitequark.org>
Mon, 8 Jul 2019 09:50:07 +0000 (09:50 +0000)
committerwhitequark <whitequark@whitequark.org>
Mon, 8 Jul 2019 09:58:12 +0000 (09:58 +0000)
commit8c9fdf907f302d7e7d204ccd1d18feea97eb08dc
tree37d4de8e1a6b39b0b7979cffca71a7014bb4eb9d
parent710a8d0bc1537495a4d7b0f476db8901eaab853a
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