clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
peepsalot has joined #yosys
roamingr1 has quit [Ping timeout: 240 seconds]
FFY00_ has quit [Remote host closed the connection]
FFY00_ has joined #yosys
citypw has joined #yosys
Degi has quit [Ping timeout: 246 seconds]
Degi has joined #yosys
adjtm has quit [Remote host closed the connection]
danvet has joined #yosys
adjtm has joined #yosys
vidbina has joined #yosys
moony has quit [Ping timeout: 240 seconds]
moony has joined #yosys
moony has quit [Excess Flood]
moony has joined #yosys
vidbina has quit [Ping timeout: 240 seconds]
lkcl has quit [Quit: BNC by ##bnc4you]
vidbina has joined #yosys
richbridger has joined #yosys
thorns514 has joined #yosys
toshywoshy has quit [Ping timeout: 250 seconds]
<thorns514> apologies in advance for the vague question, but I'm working on my project and I noticed that if I try to reset an IO register in a reset block, it gets glitchy and fails above a certain frequency (see https://github.com/sthornington/matrix8x8/blob/main/src/matrix.sv#L299 ). I can't think what is wrong with this hdl, and it works great using the lattice toolchain, but I am hesitant to make a bug report since I'm new to HDL and
<thorns514> synthesis
<thorns514> is there something obviously wrong with resetting IO pins in reset blocks ?
<thorns514> is there something obviously wrong with resetting IO registers in reset blocks ?
<gatecat> no, it should work fine
<gatecat> do other small changes in the design cause a similar failure, or is it definitely down to this (small design changes can cause big changes in the output due to the chaotic behaviour of synthesis and PnR, enough to trigger marginal timing elsewhere, etc)
<mwk> r_matrix_mosi has a different sync reset value and initial value btw, this means that hardware reset function will not be used
<mwk> this makes an extra multiplexer by necessity
<thorns514> I narrowed it down to this, but I haven't tried changes elsewhere. I had some issues with debounce.sv in the same directory until a month ago, it was complaining about combinational loops during aiger something or other, but an april build fixed that issue
<mwk> it should still work though, as long as you meet timing
<thorns514> I can try making them the same one moment
<gatecat> this will also be a known mismatch with the vendor tools, which will ignore the initial value (so r_matrix_mosi will init to 1 with them)
<thorns514> changing the initial value to 1 fixed the issue!
<thorns514> I haven't got it attached to the scope at the moment, but the display (which mosi drives) is not glitching any more and clk is at 100mhz
<mwk> what does nextpnr say about timing btw?
<thorns514> in both cases, timing was 112mhz pass at 100mhz
<mwk> hmm....
<thorns514> mean, it changes 112 115 111 but in all cases passing you know
<mwk> wait
<gatecat> yeah, the ecp5 timing data is very conservative so that should be a clear pass
<mwk> you have a non-synthronized input wired to reset pin
<mwk> of course it glitches
<thorns514> gatecat> so if the initial value of reset is 1 and the initial value of mosi is 0 and in reset the value of mosi is set to 1, does that mean there's a double assignment initially or something? I have had issues with double-assignments going unnoticed and cause strange synthesis before
<thorns514> it's not non-synchronized. it's going through a double-FF debouncer?
<mwk> it's not
<mwk> reset is connected to db_btn_reset in top
<mwk> assign db_btn_reset = db_btn_reset_raw || ~btn[0];
<mwk> and this is obviously a combinatorial circuit with raw async button input
<mwk> it *will* glitch
<thorns514> oh I have played with that a variety of ways, it doesn't change anything
<thorns514> and I'm not talking about a glitch when pressing reset
<thorns514> I'm talking about it glitches from T0, never works at all
<thorns514> getting rid of the || ~btn[0] doesn't change anything just checked
<thorns514> but setting the initial value of mosi to 1 to be congruent with the reset value of mosi fixes it perfectly, so thank you for that
<mwk> well it still sounds like there is a glitch problem somewhere, except now it's hidden
<mwk> that or a nextpnr/yosys bug
<thorns514> you could well be right, I will keep looking, but the difference between the initial mosi = 1 and initial mosi = 0 is stark; when congruent with the reset value, it works great, stable signals, reset works, wishbone master changing the image works. when they are inconsistent, whatever is driving MOSI never really gets solid transitions going at all, it's just 100% oscillations and glitch from time zero.
<thorns514> reset doesn't work, and the display is nonsense
<thorns514> but that is not to say I don't have some lurking demon in the design, as I said, this is my first experience doing hardware so I'm learning as I go
<cr1901_modern> Why is btn[0] ORed with db_btn_reset_raw?
<thorns514> I did that so it stays in reset as long as I hold the button down but I've removed that and it doesn't change anything
<thorns514> but gatecat to your earlier question, giving r_serial_negedge an initial value also fixes the issue
<thorns514> ugh hang on
<thorns514> no it doesn't :(.
<thorns514> in any case tonight after work I will try to investigate some of the intermediate outputs here to see what is different, changing an initial value from 0 -> 1 ought to be a small enough change that it ought not really change too too much but I suspect it is so that will be interesting
thorns514 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thorns514 has joined #yosys
citypw has quit [Ping timeout: 240 seconds]
citypw has joined #yosys
roamingr1 has joined #yosys
citypw has quit [Ping timeout: 240 seconds]
roamingr1 has quit [Ping timeout: 252 seconds]
roamingr1 has joined #yosys
vidbina has quit [Ping timeout: 265 seconds]
roamingr1 has quit [Ping timeout: 252 seconds]
thorns514 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toshywoshy has joined #yosys
vidbina has joined #yosys
kraiskil has joined #yosys
kraiskil has quit [Ping timeout: 240 seconds]
roamingr1 has joined #yosys
lkcl has joined #yosys
Raito_Bezarius has quit [*.net *.split]
JJJollyjim has quit [*.net *.split]
Raito_Bezarius has joined #yosys
JJJollyjim has joined #yosys
Raito_Bezarius has quit [Max SendQ exceeded]
Raito_Bezarius has joined #yosys
jryans has quit [Ping timeout: 250 seconds]
JJJollyjim has quit [Ping timeout: 276 seconds]
vidbina has quit [Ping timeout: 265 seconds]
jryans has joined #yosys
JJJollyjim has joined #yosys
danvet has quit [Ping timeout: 260 seconds]
vidbina has joined #yosys
roamingr1 has quit [Ping timeout: 252 seconds]
vidbina has quit [Ping timeout: 240 seconds]
lf has quit [Ping timeout: 250 seconds]
lf has joined #yosys
roamingr1 has joined #yosys