<tnt>
I find it worrying ... no warning, nothing. Good that the symptoms are fairly observable, but if it start undefinting some signals on a block ram or something, it would take me forever to track that down.
<mwk>
tnt: thanks for the report, I'm looking at it...
<tnt>
I'm building the latest yosys but looking at the changes (mine is ~ 1-2 weeks old) I doubt this will make any difference.
<mwk>
hrmmm, I'm on some random branch
<mwk>
but I can definitely reproduce the issue
<mwk>
seems fsm_extract is already broken
<tnt>
I'm wondering if the 'keep' attribute on the WARMBOOT blackbox screwed with the signal being re-assigned as a fsm output
<mwk>
we'll see
<tnt>
mwk: reverting a5d2358a60084361902583f4fa024d2d53ce6c2c fixes it
<mwk>
... crap
<mwk>
wait, but how
<mwk>
tnt: you sure of that?
<mwk>
the bug still happens in here with the commit reverted
<mwk>
and that commit doesn't even touch the fsm_extract pass
<mwk>
(fsm_detect merely marks FSM registers, it *cannot* be at fault)
<tnt>
yeah, I was wrong :/
<tnt>
I must have screwed up when testing
<tnt>
I think I only executed fsm_extract and forgot to do fsm_detect before ...
<tnt>
my bad
<tnt>
But fsm_extract hasn't been changed in ... forever
<mwk>
it could be broken from the start
<mwk>
fsm is uhhh, a known-rotting piece of code
<tnt>
But I used that very same code last year successfully.
<mwk>
I actually have another bug in fsm_extract I've been unable to track down so far
<mwk>
... uh
<tnt>
found something ?
<mwk>
something like that
<mwk>
it seems line 444 is the problem
<mwk>
specifically, somehow the !cell_known condition triggers
<mwk>
ohhhh
<mwk>
fuck, it only recognizes yosys builtin cells
<mwk>
whyyyyyyyy
<mwk>
tnt: okay, thank you, I can take it from here
<mwk>
tnt: did you file a yosys bug, or should I?
<tnt>
Go ahead if you can explain the issue :p
<mwk>
yeah, I can
<mwk>
it's doing really dumb things if state machine state and/or control outputs are connected directly to an unrecognized cell type
<mwk>
and it deosn't recognize *any* cell types except yosys internal ones
<mwk>
I'm *so* tempted to rewrite the whole thing
<mwk>
the code is rather horrible
<tnt>
Why does it special case ?
<mwk>
it doesn't really, it just does dumb shit that doesn't work out
<tnt>
I commented out the cell_known() check for the time being, is that a somewhat safe quick workaround ?
<mwk>
no
<mwk>
instead: remove all the ct.setup_* lines above
<mwk>
replace with ct.setup(design);
<mwk>
I think I'll do that for a quick fix, actually
<mwk>
it's not *correct*, but it's definitely better than status quo
<tnt>
At least BOOT is not "x" anymore.
<mwk>
(as in, this pass *should* work in the presence of unknown cell types)
<mwk>
(it's just too badly written right now to fix it quickly)
Bob_Dole has joined ##openfpga
<tnt>
mwk: tx
<mwk>
bug 1781 filed
<tnt>
Ah nice, much smaller reproducer than I could have provided.