Sunday, 2019-12-29

*** tpb has joined #yosys00:00
*** pie_ has joined #yosys00:10
*** pie_ has quit IRC02:07
*** lutsabound has quit IRC05:34
*** dh73 has joined #yosys05:37
*** dh73 has quit IRC06:08
*** _whitelogger has quit IRC06:31
*** _whitelogger has joined #yosys06:33
*** _whitelogger has quit IRC06:55
*** _whitelogger has joined #yosys06:57
*** emeb_mac has quit IRC07:00
*** Twix has quit IRC07:05
*** Jybz has joined #yosys08:02
*** kraiskil has quit IRC09:52
*** _whitelogger has quit IRC10:25
*** _whitelogger has joined #yosys10:27
*** _whitelogger has quit IRC10:37
*** _whitelogger has joined #yosys10:39
*** kraiskil has joined #yosys12:12
*** kraiskil has quit IRC12:51
*** kraiskil has joined #yosys13:11
*** _whitelogger has quit IRC13:58
*** _whitelogger has joined #yosys14:00
*** kraiskil has quit IRC14:03
*** rombik_su has joined #yosys15:50
*** kraiskil has joined #yosys15:56
*** rombik_su has quit IRC16:16
*** vidbina has joined #yosys16:54
*** maikmerten has joined #yosys17:06
maikmertenit's that season of the year where the blessings of formal verification look particularly bright - finally trying to prove some properties of my designs.17:11
maikmertenstarting with an ALU17:11
maikmertenI find that some checks on combinatorial logic is easier than I thought17:12
maikmertenstruggling a bit with clocked stuff17:12
maikmertenhttps://paste.debian.net/1123053/17:12
tpbTitle: debian Pastezone (at paste.debian.net)17:12
maikmerten('result' is a reg[31:0] that receives values on posedge)17:14
maikmertens/is easier/are easier17:16
ZipCPUmaikmerten: I'm not sure that second block checked what you wanted18:01
ZipCPUThe key issue is the idea of $past() --- you want to assert if I_en was true on one clock cycle and I_aluop == `ALUOP_ADD on that same cycle, then result == I_dataS1+I_dataS2 on the next cycle18:02
ZipCPUOr ... am I missing something?  'Cause that's not what you've written18:02
*** kraiskil has quit IRC18:05
maikmertenZipCPU, yeah, basically if on the preceding posedge I_en was asserted with an ADD-aluop and with values dataS1 and dataS2, then on the current posedge the result should be the sum of the previous input values18:06
maikmertenI assume that https://paste.debian.net/1123060/ is a bit closer18:06
tpbTitle: debian Pastezone (at paste.debian.net)18:06
maikmerten(btw, hi!)18:07
ZipCPUYeah ... that's pretty decent.  How'd that work out for you?18:07
ZipCPU(Hi)18:07
maikmertenfails :)18:07
ZipCPUOk, there's a common bug with addition and widths18:07
ZipCPUCould it be that I_dataS1 + I_dataS2 requires an extra bit that result doesn't have?18:07
ZipCPUA bit that would typically be dropped?18:07
maikmertenvery possible18:08
ZipCPUThat is, if you force it to the right number of bits, does it then pass?18:08
*** emeb has joined #yosys18:13
maikmertenokay, truncating doesn't help, but the counterexample was an addition with zero as second operand anyways18:17
maikmertenhttps://pasteboard.co/INwPDYP.png18:17
tpbTitle: Pasteboard - Uploaded Image (at pasteboard.co)18:17
maikmertenwaveform looks as expected, so I guess the asserts are meh18:18
ZipCPUSo ... what's going on?18:18
ZipCPUCan you post your sby file at all?18:18
ZipCPUI'm betting that's where the problem is18:19
ZipCPUAre you running with either "clk2fflogic" or "multiclock on" in your sby file?18:19
maikmertenhttps://paste.debian.net/1123061/18:19
tpbTitle: debian Pastezone (at paste.debian.net)18:19
maikmertenand yes, multiclock, for no particular reason...18:19
maikmertenso much copy paste, so little insight ;)18:20
ZipCPUOk, let's take that back out, so remove "multiclock on" and remove any assumptions about your clock within your design.  This works if 1) you only have one clock, and 2) you only transition on it's positive edge18:20
ZipCPUIf you do otherwise, then we'll need to work a little harder18:20
ZipCPUAre you using $global_clock in your design at all?18:22
ZipCPUIf so ... I'd have you remove that as well.  (Again, assuming only one continuous clock, and all transitions on its positive edge)18:23
maikmertenno $global_clock18:24
ZipCPUHow about clocks and clock edges?  Are you using only the one edge of one clock?18:24
maikmertenin that design, I only use posedge I_clk to do stuff18:25
ZipCPUOk, good ... let's keep going with removing "multiclock on" then18:25
maikmertenhttps://github.com/maikmerten/spu32/blob/master/cpu/alu.v <-- currently messing around with that18:26
tpbTitle: spu32/alu.v at master · maikmerten/spu32 · GitHub (at github.com)18:26
maikmertenremoving multiclock provides the same counterexample18:26
ZipCPUReally?  Can you post it again?18:26
ZipCPUAlso ... does any of your logic use I_clk for anything other than a posedge?18:27
maikmertenhttps://pasteboard.co/INwUyEf.png <-- fresh trace18:29
tpbTitle: Pasteboard - Uploaded Image (at pasteboard.co)18:29
ZipCPUCheck I_aluop18:30
maikmertenit's constant zero, which is ALUOP_ADD18:30
ZipCPUAlso be aware, when using a test in a clocked logic block, the error will be one step prior to the final step of the trace.  In this case, your error is that the MSB is set.18:30
ZipCPUHow about I_reset?18:30
maikmertenconstant zero18:31
ZipCPUHmm ...18:33
ZipCPUHow old is your Yosys distro?18:33
maikmertengit master from ~2 days ago18:33
maikmertenbut quite frankly, I'll assume I messed up before assuming this really is a yosys thing18:34
ZipCPUAnd your yices distro?18:34
ZipCPU... a not unlikely assumption ...18:34
maikmertenYices 2.6.118:34
maikmertenCopyright SRI International.18:34
maikmertenLinked with GMP 6.1.218:34
maikmertenCopyright Free Software Foundation, Inc.18:34
maikmertenBuild date: 2019-05-1718:34
ZipCPUOk, your yices is more recent than mine, so I'll assume that's not a problem then18:35
maikmertenfresh bugs, fresh bugs ;-)18:35
maikmerten(nah)18:35
ZipCPULol18:35
ZipCPUHow about a verilator -Wall check, to see if you are missing anything?18:35
* ZipCPU steps away for lunch --will look back again later18:36
ZipCPUAlso ... adding `default_nettype none should find a couple bugs too18:37
*** fsasm has joined #yosys18:37
maikmertenenjoy your lunch :)18:38
maikmerten(it's not verilator, but iverilog -Wall is perfectly happy)18:39
maikmertenZipCPU, it *was* the reset18:48
maikmertenhttps://paste.debian.net/1123066/ <-- this is PASS18:50
tpbTitle: debian Pastezone (at paste.debian.net)18:50
maikmertenSBY 19:47:20 [alu_prf] summary: successful proof by k-induction.18:50
maikmerten^^ that sounds nice18:50
maikmerten(pretty amazing that such an automated proof finishes in around 2 seconds)18:59
maikmerten(also passes without truncating the addition)19:03
ZipCPUI thought you had told me reset was low in the trace?19:07
maikmertenyes, and my current theory is that I done goofed badly by confusing GTKWave instances... :(19:09
maikmertengetting a hinch of "let's start over" I cleaned up my window mess, rm -rf'ed some dirs and started fresh19:10
maikmertenand then I could indeed observe a counterexample of I_reset being non-zero at the first clock edge, so that was that...19:11
maikmertenI'm seriously sorry for wasting your time :(19:11
*** vidbina has quit IRC19:55
*** fsasm has quit IRC20:10
*** kraiskil has joined #yosys20:36
*** maikmerten has quit IRC20:49
*** emeb_mac has joined #yosys20:57
*** X-Scale has quit IRC21:00
ZipCPUOh, ah, okay then.  I'm glad you were able to discover the problem!21:16
*** vidbina has joined #yosys21:18
*** m_w has joined #yosys21:28
*** m_w has quit IRC21:28
*** m_w has joined #yosys21:30
*** m_w has quit IRC21:30
*** m_w has joined #yosys21:32
*** X-Scale has joined #yosys21:38
*** vidbina has quit IRC21:47
whitequarkdaveshah:   what():  no enum named 'SLICED.REG0.LSRMODE'22:06
whitequarkany idea what can cause this error in ecppack?22:07
daveshahOut o d22:07
daveshah*out of date trellis22:07
daveshah?22:07
whitequarkI just rebuilt prjtrellis and nextpnr-ecp5 twice22:07
daveshahhmm22:07
whitequarklet's try third time?22:07
daveshahbet you it's a git issue with the database submodule then22:07
whitequarkuh ugh22:08
whitequarki'll try to update that22:08
daveshahor a cmake issue and you have two trellises installed22:08
whitequarkbtw, do you happen to know what are the conditions for LDR to work?22:08
daveshahI've never actually tried it22:08
whitequarki got it to work, actually22:08
whitequarki had to add TDRV_SLICE_* parameters22:08
whitequarkwhich is... strange22:09
daveshahI guess it's because it still ultimately uses the output H-bridge22:09
whitequarkohh right, so even the BSCAN cell would use the SERDES output?22:10
daveshahYeah, it still uses the same final output stage22:11
whitequarkoh yes I see it now, thanks22:11
daveshahBecause they recommend it for things like doing low speed standard and HD SDI on the same pins22:11
daveshahso it would be odd if the signalling level changed22:11
whitequarkI'm not sure I understand how the TDRV slices actually work in that case22:12
whitequarkbut then again it's the sort of thing I can directly observe now22:12
whitequarkdaveshah: yep, it was the database submodule, thanks!22:14
whitequarkdaveshah: do you know if there's a way to get EXTREFB.REFCLKO to fabric?22:19
daveshahI don't think there is a direct route, no22:22
whitequarkhm, so there's actually no way to get the onboard clock from lfe5um5g-85f-evm to some sort of connector22:30
whitequarki continue to be impressed how useless lattice devboards are22:30
whitequarkright now i'm grabbing PCLK and routing it through LDR to one of the SMAs22:30
whitequarkbut there's something pretty weird about it22:30
daveshahYou could just use one of the IO pins and route PCLK to an ODDRX1F?22:35
daveshahif you think LDR is the issue22:35
*** lutsabound has joined #yosys22:37
whitequarkI actually think PCLK might be the issue22:40
whitequarkor rather, there's something about PCLK I don't understand22:40
whitequarkoh I figured it out22:46
whitequarkthe PCLK duty cycle is very strange22:48
whitequarkcan be as large as 55%22:48
whitequarkdaveshah: is this an ecppack bug or is it more likely some issue with prjtrellis versioning again? https://github.com/SymbiFlow/prjtrellis/issues/11223:00
daveshahNo it is a genuine issue of some kind23:04
daveshahI see it here too23:04
daveshahwhitequark: I think the problem is nextpnr used a connection that doesn't exist any more23:08
whitequarkhmm23:09
daveshahCan you try `touch ecp5/trellis_import.py` and rebuild nextpnr now the db issue is solved (sorry in advance for the CPU time)23:09
whitequarkbuilding23:09
whitequarki think that fixed it23:27
*** emeb has quit IRC23:39
*** kraiskil has quit IRC23:40
*** m_w has quit IRC23:46
*** Jybz has quit IRC23:47

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!