amaranth-lang / amaranth

A modern hardware definition language and toolchain based on Python
https://amaranth-lang.org/docs/amaranth/
BSD 2-Clause "Simplified" License
1.58k stars 174 forks source link

`DriverConflict` exception is unhelpful if you use `io.Buffer` #1433

Open whitequark opened 5 months ago

whitequark commented 5 months ago

You get messages like:

amaranth.hdl._ir.DriverConflict: Bit 0 of I/O port (io-port port_a_5__io__io) used twice, at /home/whitequark/Projects/glasgow/software/.venv/lib/python3.12/site-packages/amaranth/vendor/_siliconblue.py:546 and /home/whitequark/Projects/glasgow/software/.venv/lib/python3.12/site-packages/amaranth/vendor/_siliconblue.py:546

It's not completely useless but 2/3 of the information says absolutely nothing.

cc @wanda-phi can we fix this?

wanda-phi commented 5 months ago

... you ever think we need a #[track_caller]?

whitequark commented 5 months ago

Prooooooobably.