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.49k stars 168 forks source link

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

Open whitequark opened 4 days ago

whitequark commented 4 days 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 4 days ago

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

whitequark commented 4 days ago

Prooooooobably.