bl0x / learn-fpga-amaranth

Code for Bruno Levy's learn-fpga tutorial written in Amaranth HDL
BSD 3-Clause "New" or "Revised" License
89 stars 12 forks source link

Issues with FSM #5

Closed lonjil closed 4 months ago

lonjil commented 4 months ago

In part 05, with m.FSM is used, and fsm.state is used within the with block. However, this causes an error which states that FSM doesn't have a property state. If you try to access fsm.state after exiting the with block, it works.

Also, 05, but not 06 and later, lacks domain="slow" in the FSM constructor, which I think is incorrect.

bl0x commented 4 months ago

Thanks for pointing out these things!

There was a breaking change a while back that makes fsm.state inaccessible inside the FSM context. (https://github.com/amaranth-lang/amaranth/pull/1164/commits/a7c649e9d315d91d8a8380bb7ed17cfcf780a08d)

Also, domain="slow" is indeed missing.

It looks like I have a bit of work to do to bring this repo back up to speed with Amaranth HDL 0.5.