adumont / hrm-cpu

Human Resource Machine - CPU Design #HRM
https://twitter.com/i/moments/1017515777610649601
GNU General Public License v3.0
71 stars 8 forks source link

Not marking ControlUnit.state as FSM state register: Register has an initialization value. #34

Closed adumont closed 4 years ago

adumont commented 5 years ago

yosys> fsm_detect

  1. Executing FSM_DETECT pass (finding FSMs in design). Not marking ControlUnit.state as FSM state register: Register has an initialization value.

So that seems to imply that it's wrong to set a initialization value to the state register.

As a reference, it's true that Cummings papers don't show any init. value in the examples. http://www.sunburst-design.com/papers/CummingsSNUG2003SJ_SystemVerilogFSM.pdf

Full script: yosys> read_verilog ControlUnit.v proc; opt; fsm -nomap fsm_detect fsm_extract fsm_info fsm_export -o ControlUnit.kiss2

BTW, we can draw the kiss2 file using graphviz, see https://stackoverflow.com/questions/32645965/fsm-export-using-yosys

adumont commented 4 years ago

Fixed in 39ace17.