Sunday, 2019-11-03

*** tpb has joined #yosys00:00
ZirconiumXIs there any way to communicate to Yosys that a black-box cell does drive a wire?00:05
whitequarkmake it an output?00:10
ZirconiumXGuess I'll have to give it a prototype. Have I mentioned I hate the Quartus IP cores?00:11
ZirconiumXAt least Quartus itself hasn't ICEd yet00:17
ZirconiumXSmall blessings.00:17
mwkyou mean, hasn't ICEd today?00:20
ZirconiumXYes00:21
ZirconiumXMostly because I've only recently-ish started doing FPGA stuff00:21
ZirconiumXhttps://gist.github.com/ZirconiumX/2e7888e99e8db8cb23f8f0741caaf0db00:27
tpbTitle: sigh.txt · GitHub (at gist.github.com)00:27
ZirconiumXmwk: On the other hand "FALSE" is apparently not within the valid parameter values of "TRUE" and "FALSE"00:27
ZirconiumXso00:27
ZirconiumXOh, it's "ENABLE_BUS_HOLD"00:29
ZirconiumXUgh00:29
*** _whitelogger has quit IRC00:33
*** _whitelogger has joined #yosys00:35
ZirconiumX89.61 MHz for PicoSoC on a Cyclone V is...probably not great.00:36
ZirconiumXLet's compare with a pure-Quartus flow00:37
mwkis this still without RAM?00:41
ZirconiumXWith RAM00:42
mwkhmm, yeah, not good00:42
ZirconiumXGranted, this is semi-incomplete; I haven't got pin assignments or clock constraints at present.00:44
ZirconiumXActually, hah00:48
ZirconiumXPure-quartus flow on the same source is 90.32 MHz00:48
ZirconiumXmwk: ^00:49
ZirconiumXOn the other hand I'm not sure Quartus is inferring RAM properly here.00:49
ZirconiumXHow do I get the number of bits required for a given constant value? Quartus doesn't support $size or $bits.01:18
mwk$clog2?01:19
ZirconiumXThat works, thank you!01:20
ZirconiumX85.21 MHz. Even accounting for error, explicit RAM instantiation should make it much faster.01:25
ZirconiumXHm.01:25
ZirconiumXEh, it's 1:30am01:27
ZirconiumXI'll come back to it later01:28
ZirconiumXStill, though01:28
ZirconiumXComplex-ish thing synthesised qith Quartus01:28
ZirconiumX*with01:28
ZirconiumXMy brain is very definitely dead01:28
ZirconiumXSynthesized with Yosys, PnR'd with Quartus.01:28
mwkheh, congrats :)01:55
mwknight01:55
*** cr1901_modern has quit IRC02:01
*** kraiskil has quit IRC02:41
*** citypw has joined #yosys02:43
*** cr1901_modern has joined #yosys02:47
*** kraiskil has joined #yosys02:54
*** PyroPeter has quit IRC03:06
*** PyroPeter has joined #yosys03:19
*** X-Scale` has joined #yosys04:38
*** X-Scale has quit IRC04:38
*** X-Scale` is now known as X-Scale04:39
*** X-Scale` has joined #yosys04:54
*** X-Scale has quit IRC04:55
*** X-Scale` is now known as X-Scale04:55
*** _whitelogger has quit IRC05:51
*** _whitelogger has joined #yosys05:53
*** emeb_mac has quit IRC06:13
*** _whitelogger has quit IRC07:27
*** _whitelogger has joined #yosys07:29
*** kraiskil has quit IRC08:01
*** _whitelogger has quit IRC08:36
*** _whitelogger has joined #yosys08:38
*** Twix has quit IRC09:02
*** Jybz has joined #yosys09:02
*** Twix has joined #yosys09:08
pepijndevosSometimes I hate formal... I probably have some uninitialised thing or missing whatever, which make sby just go "yay, proved in step 0" obviously not giving me a trace or any clue what happened.09:09
pepijndevosMy quite modest module has a clock, reset, and *one* std_logic input, but past 30 cycles it just completely bogs down, and it needs to run at least 12*8 cycles to do anything interesting at all09:25
pepijndevosCan you do anything to limit the search space? Will adding assumptions make it faster?09:31
ZirconiumXYes, assumptions make it drop parts of the search space that don't match the assumption.10:14
ZirconiumXpepijndevos: ^10:14
pepijndevosHm ok10:14
pepijndevosMy code is one big off-by-one error because the C code assumed everything happens sequentially and I'm still figuring out new stupid interdependencies10:23
*** Jybz has quit IRC10:50
pepijndevosI decided to use one or two variables to stay sane... but I don't think a longest topological path of 200 is quite sane.11:10
pepijndevosOh well... Gowin IDE thinks it'll run at 65.4 MHz, and it only needs to do 33 MHz, so whatevs11:22
*** Jybz has joined #yosys11:32
ZirconiumXBleh. Quartus says that some I/O pins are held at GND, which means somewhere something got lost in translation.12:51
ZirconiumXmwk: Found the lut-shaming article: https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/wp/wp-01003.pdf13:12
*** adjtm has quit IRC13:12
mwkZirconiumX: hah, nice13:28
mwkdamn, the whole paper really is "look how much virtex 5 sucks"13:28
mwkwhile conveniently ignoring that virtex 5 LUT6s can, in fact, be split into LUT5s as well13:29
ZirconiumXI mean, it does raise a question of how best to weight LUT sizes13:29
ZirconiumXAlthough the ALM in the Cyclone V grew two more DFFs.13:30
ZirconiumXI think it should be weighted to prefer LUT3 over LUT2, but LUT5 over LUT6?13:32
ZirconiumXIt'd be nice to have numbers on the internal delays here13:32
ZirconiumXBut oh well13:32
*** togo has joined #yosys13:51
ZipCPUpepijndevos: LTP of 200 is "sane"???  I typically think of an LTP of 20 as bordering on insanity--and that's for an ASIC topological path too (not that I've ever done ASIC design ....)13:59
pepijndevosZipCPU, no, that's my point. Porting C code becomes a whole lot more trivial by sneaking in a variable here and there, but it really, really messes up synthesis it turns out.14:01
ZipCPUMay I ask what the algorithm's supposed to do?  I mean ... how complicated is it?  Is it a data flow algorithm, or something more complex?14:02
pepijndevosZipCPU, don't laugh... it's an RF receiver that has to talk to a particular Arduino library on the other end.14:06
janrinzeooohh! nice. does it use the differential inputs for radio input?14:07
pepijndevosSo I'm sure there are millions of better ways to do this, but for compatibility on a lazy sunday, porting said Arduino library to C seemed the easiest thing to do given my failed attempt at doing a more demanding receiver as a university project.14:08
pepijndevosjanrinze, no, it's a pretty boring thing. These things are ment to run at 2kbps with 8-bit micros, so no fancy FPGA stuff needed. The demodulation is all done inside the board, so you just get a 2kbps binary output14:09
pepijndevosBasically all the C code does is clock recovery, some preamble, and 6-to-4 decoding14:10
janrinzeLORA?14:11
pepijndevosNah, still thinking too fancy. FS1000A and XY-MK-5V14:11
pepijndevosIt's impossible to find a proper datasheet for these things, but they appear to be some ASK thing14:12
pepijndevoshttps://github.com/PaulStoffregen/RadioHead/blob/master/RH_ASK.cpp#L72114:13
tpbTitle: RadioHead/RH_ASK.cpp at master · PaulStoffregen/RadioHead · GitHub (at github.com)14:13
janrinzenice.14:15
pepijndevosSo... all of these small dev boards have USB FTDI chips, right? Can you use those to UART stuff from your FPGA to the PC, or are they not set up to do anything else besides write the flash?14:18
pepijndevosIn particular thinking of the Tang Nano at the moment, but I suspect not many have used it. I also have an Icebreaker...14:19
janrinzeThe icebreakers are hard to get. Similar like the small ecp5 boards.14:20
pepijndevosYea, still hoping to one day aquire a ULX3S *sigh*14:25
janrinzeI have bought the ecp5 eval board from lattice. added HDMI out. That works quite nice.14:28
pepijndevosOh! The Icebreaker actually has RX and TX pins set up. I guess I'll test on that then.14:39
janrinzeanyone who knows a good random number generator in verilog? :)15:03
janrinzeonly need 16 bits :D15:03
ZirconiumXBuild a ring oscillator and extract randomness from frequency variation /s15:04
whitequarkbuild two ring oscillators and race them against each other15:06
whitequarkthat's almost a reasonable solution15:06
whitequarkalmost, because it is prone to lock-in due to interference, especially if they're placed close together15:07
whitequarkbut in general, racing two asynchronous clocks is a perfectly fine way to generate entropy15:07
janrinzeyosys doesn't seem to like ring oscillators, right>15:10
*** Laksen has joined #yosys15:16
whitequarkuse (*keep*) and it'll be fine15:17
whitequarkyou need to instantiate the LUTs of course15:17
*** pie_ has quit IRC15:28
ZirconiumXWhat units are the ABC9 .lut delays in?15:28
*** pie_ has joined #yosys15:29
ZirconiumXSeems like picoseconds?15:45
daveshahArbitrary units15:49
daveshahBut convention is picoseconds15:50
*** gorbak25 has quit IRC16:27
*** fsasm_ has joined #yosys16:28
janrinzehow to tell yosys that two clock delay is fine for timing?16:34
janrinzeehrm, next-pnr of course.16:34
daveshahI'm afraid that's not supported yet16:34
daveshah(it's called a multicycle constraint)16:34
*** citypw has quit IRC16:39
*** adjtm has joined #yosys16:42
*** emeb_mac has joined #yosys16:55
*** Laksen has quit IRC17:00
*** emeb has joined #yosys17:26
ZirconiumXdaveshah: I am trying to crib timing information for ABC9 LUT delay from the Quartus Timing Analyzer. It models four different types of unateness, and I should probably standardise on one. Which do you recommend?17:51
daveshahZirconiumX: worst case17:52
ZirconiumXSo collect all four and pick the worst?17:52
daveshahUnless one is explicitly worst case17:53
ZirconiumXdaveshah: And fanout?18:04
daveshahThat's unlikely to be significant enough at synthesis time18:06
ZirconiumXFair18:06
daveshahIn any case most routing resources are buffered, so physical fanout will differ significantly from logical fanout18:07
ZirconiumXFair.18:08
ZirconiumXThe data here is a bit interesting.18:09
ZirconiumXFor example, of the inputs A-F of a cyclonev_lcell_comb primitive, F has the least delay and A the most.18:09
daveshahThat sounds quite typical18:10
daveshahI think ecp5 is the same for A-D18:10
ZirconiumXAh, I see the ECP5 LUT library is labeled D-A not A-D18:11
daveshah For some esoteric reason I think abc needs delays in non-decreasing order18:11
daveshahDon't ask why18:11
ZirconiumXThat presents a bit of an issue, because the only data point I have for input C so far gives it lower delay than input D18:14
ZirconiumXI'll fudge it, and use the one data point lower than input C for testing18:14
ZirconiumXSame for B having lower delay than A18:16
ZirconiumX...Vice versa18:16
daveshahWell for ECP5 I just mirrored the inputs :/18:27
daveshahGiven that pnr probably permutes inputs anyway, giving them all the max of any of them would probably work fine18:28
ZirconiumXIt also appears to depend on the specific LUT in the tile19:18
ZirconiumX(yay)19:18
ZirconiumXThese numbers look quite weird to me...19:24
ZirconiumXF: 356 E: 558 D: 541 C: 579 B: 579 A: 57219:26
ZirconiumXdaveshah, does https://gist.github.com/ZirconiumX/5c75a9592d0591ea1449591f66a505c1 look sane?19:44
tpbTitle: abc9_cyclonev.lut · GitHub (at gist.github.com)19:44
daveshahSeems reasonable19:44
daveshahBecause each layer is probably a layer of a mux tree one way or another, the delay can differ a lot19:45
ZirconiumXThis isn't strictly "the max delay", more "maximum of the ones I scavenged before datamining"19:46
ZirconiumXDatamining is not quite the right term here, but it will do19:47
ZirconiumXdaveshah: So now presumably I need to build a box library for the DFFs?19:49
daveshahI don't know what the deal with ABC9 and DFFs is19:49
*** dys has joined #yosys20:21
*** futarisIRCcloud has quit IRC20:34
*** Jybz has quit IRC20:45
*** Jybz has joined #yosys20:45
*** attie has quit IRC20:45
*** fsasm_ has quit IRC21:34
*** kmehall has quit IRC21:49
*** jhol has quit IRC21:49
*** pointfree has quit IRC21:49
*** jhol has joined #yosys21:54
*** kmehall has joined #yosys21:54
*** pointfree has joined #yosys21:54
janrinzedaveshah: when I run nextpnr with the same seed for 90 MHz target it returns 88 MHz, and 85Mhz target it returns 84.. looks like it dodges the target frequency.23:02
janrinze88 Mhz target returns 85 Mhz..23:12
*** lutsabound has joined #yosys23:13
*** emeb has quit IRC23:19
*** futarisIRCcloud has joined #yosys23:21
*** Jybz has quit IRC23:25
*** adjtm has quit IRC23:59
*** adjtm has joined #yosys23:59

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