Wednesday, 2020-04-29

*** tpb has joined #yosys00:00
*** emeb has quit IRC00:03
ross_sCreated this PR, based on how I currently understand the registers to affect the timing https://github.com/YosysHQ/nextpnr/pull/43500:07
tpbTitle: Alter MULT18X18D timing db based on register config by rschlaikjer · Pull Request #435 · YosysHQ/nextpnr · GitHub (at github.com)00:07
*** Vinalon_ has quit IRC00:34
*** Vinalon has joined #yosys01:07
*** adjtm_ has quit IRC01:16
*** adjtm has joined #yosys01:16
*** adjtm has quit IRC01:18
*** adjtm has joined #yosys01:20
*** Vinalon has quit IRC01:51
*** craigo has joined #yosys03:19
*** Degi has quit IRC03:55
*** Degi has joined #yosys03:58
*** lambda has quit IRC04:23
*** lambda has joined #yosys04:30
*** mwalle has quit IRC04:41
*** pie_[bnc] has quit IRC06:08
*** pie_[bnc] has joined #yosys06:17
*** emeb_mac has quit IRC06:30
*** az0re has joined #yosys06:37
*** citypw has quit IRC07:31
*** dys has joined #yosys07:35
*** jakobwenzel has joined #yosys07:40
*** Asu has joined #yosys08:21
*** adjtm has quit IRC08:33
*** craigo has quit IRC09:01
*** m4ssi has joined #yosys10:09
*** adjtm has joined #yosys10:11
*** adjtm has quit IRC10:51
*** adjtm has joined #yosys10:52
*** anuejn_ has joined #yosys11:19
*** yosys-questions has quit IRC11:38
*** keith-man has quit IRC11:54
*** Nazara has quit IRC13:14
*** Nazara has joined #yosys13:15
*** N2TOH has quit IRC14:11
*** N2TOH has joined #yosys14:14
*** N2TOH_ has joined #yosys14:18
*** N2TOH has quit IRC14:22
*** emeb has joined #yosys14:31
*** N2TOH_ has quit IRC14:41
*** N2TOH has joined #yosys14:41
*** N2TOH_ has joined #yosys14:44
*** N2TOH has quit IRC14:46
*** jfcaron_ has joined #yosys14:54
*** craigo has joined #yosys15:10
ross_sdaveshah: thanks for the feedback on the PR. I've updated the getPortTimingClass section, but when verifying the change to getPortClockingInfo I never actually seem to hit my cell->type == id_MULT18X18D check, even though I have one directly instantiated. Is there some other mechanism that causes this check to be skipped?15:10
ross_s(this check = getPortClockingInfo call)15:12
daveshahross_s: you need to set clockInfoCount15:13
ross_saha15:13
ross_sshould it be one if any clocks are detected, or to the number of distinct clocks? It looks like the mult can have up to 415:14
daveshahThe number of clock edges affecting a pin15:14
daveshahWhile it is true this could be up to 4 for a DSP15:14
daveshahfor now the common case of a single clock is enough imo15:14
ross_sok, sounds good15:15
daveshah(Technically up to 8 in fact if you used the DSPs in DDR mode but even Diamond doesn't officially support this...)15:15
ross_sinteresting15:15
ross_salso, do you happen to know of any good resources on the ecp5 dsp internals? I've been trying to grok some of the diamond generated code and it seems to involve both the parallel in/out and shift register in/out, but TN1267 doesn't elaborate much on how the shift setup works15:17
daveshahNo, there aren't any15:19
daveshahLooking at the sim models is the only option15:20
daveshahbut I've never actually looked into the shift register stuff15:20
ross_sBaffling that there is no documentation. How do Diamond users get by? Just plugging in autogenerated black boxes?15:20
tntYeah, I think you're supposed to use the clarity designer ...15:21
tntCompared to the detailled docs of the ice40 (on the lower end) or the 7-series (on the upper end), the ecp5 dsp docs are definitely lacking.15:21
daveshahI think the assumption, sadly incorrect, is anyone doing complex DSP stuff has access to a Lattife FAE15:23
daveshah*Lattice15:23
ross_sI guess sim models it is then. Though, do you have to have a non-free license to generate those? I was testing out diamond yesterday and it wouldn't deign to open the simulation wizard15:24
daveshahYou can just look at the Verilog all the DSP related stuff isn't encrypted15:24
daveshahin the cae_library folder of the install15:25
*** jfcaron_ is now known as jfcaron15:25
ross_sgood to know. hopefully I can use those for verliator as well15:26
daveshahNo, they use a load of sim stuff that probably breaks in Verilog15:27
daveshahshould work in icarus though15:27
daveshahs/Verilog/Verilator15:27
tntdaveshah: did you ever try the ice40 models in iverilog ?  I couldn't get them to run.15:29
daveshahNo, I've tried the ECP5 RAM and IO models in the past and they've worked though15:30
daveshahdon't know about the DSPs15:30
daveshahI think part of the Yosys testing involved running the SB_MAC16 model in iverilog and that worked fine15:31
*** dys has quit IRC15:57
*** yosys-questions has joined #yosys15:59
*** jakobwenzel has quit IRC16:08
ross_shmm it looks like the timing db might be a bit sparse for the mult18x1816:08
ross_sit only has a timing for CLK0 -> P16:08
ross_swhereas the dp16kd has timings for both clocks to each output pin16:09
ross_sso currently when I call getDelayFromTimingDatabase for CLK0 and P35, it fails16:09
ross_ssince it can only handle the call CLK0, P16:09
ross_sis the better approach here to expand the timing db, or try and do some ID rewriting before calling getDelay?16:10
daveshahYou would need to do some rewriting16:30
daveshahThis was done to stop the database from getting too massive16:30
daveshahparticularly once all timings are considered16:30
*** jfcaron_ has joined #yosys16:41
*** jfcaron has quit IRC16:45
ross_salright, can work with that.16:53
emebgetting an interesting error from nextpnr-ice40: ERROR: JSON module blackbox attribute value is not a number16:53
daveshahSounds perhaps like old next nextpnr and new yosys, or vice versa?16:55
emebYosys 0.9+1706 (git sha1 036c46de, clang 8.0.0 -fPIC -Os) +  nextpnr-ice40 -- Next Generation Place and Route (git sha1 8f28132)16:55
daveshahTry updating nextpnr16:57
emebWill do. Thanks.16:57
emebHmm... that didn't fix it.17:05
emebWill try updating Yosys17:05
emebUpdating yosys and nextpnr did not fix this17:27
emebYosys 0.9+2406 (git sha1 a66200ed, clang 8.0.0 -fPIC -Os) + nextpnr-ice40 -- Next Generation Place and Route (git sha1 5c6b2cba)17:28
emebOK - this appears to be a design that has never really worked in the yosys / nextpnr flow for up5k. It's got a bunch of hairy DSP stuff in it (multiplier inferences and huge adder trees)17:30
daveshahIt still shouldn't be failing this way...17:31
emebhere's the nextpnr cmd: nextpnr-ice40  --up5k --json rxadc_14.json --pcf ../src/rxadc_14.pcf --asc rxadc_14.asc17:32
daveshahLooks fine17:34
daveshahwhat does `grep blackbox rxadc_14.json` give?17:34
emeba whole lot of lines of this form -> "blackbox": "00000000000000000000000000000001",17:39
daveshahThat sounds fine17:41
emebI can send a testcase as zipfile if that would be of any interest17:47
daveshahYes please, thanks17:48
emebhttps://www.dropbox.com/s/4sd5898r3bpvza3/emeb_testcase_04-29-20.zip?dl=017:48
tpbTitle: Dropbox - emeb_testcase_04-29-20.zip - Simplify your life (at www.dropbox.com)17:48
daveshahSeems to build fine here17:52
emebVery interesting17:52
daveshahAre you sure you installed latest nextpnr-ice40?17:53
emebI'll try rebuilding from a fresh git clone17:53
emebpreviously just did a make clean / git pull /17:53
ross_sdaveshah: I think I'm about done here, but have one question about how exactly the registers work - currently, I separately mark A/B/P as registered or not based on the register clock setting. 1) Is that definitely the parameter that sets whether they are registered? and 2) Is it correct to have a mixed comb & register timing, or should _any_ registered input mark _all_ IOs as registered?17:55
daveshah1) yes as far as I know17:56
daveshah2) mixed is fine, but any register means it is counted as registered in the port class17:57
*** Nazara has quit IRC18:00
*** Nazara has joined #yosys18:02
emebdaveshah: OK - did a clean build of nextpnr and it works here now. Thanks and sorry for the low SNR18:03
ross_sso, should the timing db then be regs=input if (a_clk != none || b_clk != none) as opposed to (a_clk != none && b_clk != none)?18:03
ross_sor, in the event that only one of a/b is registered, say that both of them are not18:04
daveshahYes, if you want to be strictly correct then you would need to mix and match between regs=input and no regs18:04
ross_shmm ok18:04
daveshahIf you only want to support both or none being registered and warn on the unsupported mixed possibility, I don't mind that either18:06
*** klotz has joined #yosys18:41
ross_sAlright; this ended up involving a lot more false starts than I expected but I _think_ this is now correct https://github.com/YosysHQ/nextpnr/pull/435/files18:53
tpbTitle: Alter MULT18X18D timing db based on register config by rschlaikjer · Pull Request #435 · YosysHQ/nextpnr · GitHub (at github.com)18:53
ross_sIn the case where A/B have different clock modes it issues a warning and treats both as not registered18:54
daveshahThanks, I'll have a proper look tomorrow18:58
*** klotz has quit IRC18:58
daveshahI was in a similar situation with the ALU54B, seems that the bitstream data isn't complete for the cascade configuration18:59
ross_sI guess these are less commonly used features for FOSS designs19:02
ross_swhich makes sense given that you don't get to know how they work outside clarity designer19:02
daveshahYeah, I got a bit bored half way through the original DSP fuzzing work last year19:06
daveshahit was hard to work out what was even supposed to work together19:06
*** yosys-questions has quit IRC20:03
*** yosys-questions has joined #yosys20:16
*** m4ssi has quit IRC20:34
*** N2TOH_ has quit IRC20:37
*** N2TOH has joined #yosys20:38
*** N2TOH has quit IRC21:26
*** N2TOH has joined #yosys21:28
*** yosys-questions has quit IRC21:34
*** N2TOH has quit IRC21:35
*** N2TOH has joined #yosys21:50
*** N2TOH has quit IRC21:55
*** jfcaron_ has quit IRC21:57
*** Cerpin has quit IRC22:00
*** Cerpin has joined #yosys22:09
*** N2TOH has joined #yosys22:32
*** Thorn has quit IRC22:38
*** N2TOH has quit IRC22:44
*** N2TOH has joined #yosys22:46
*** N2TOH has quit IRC22:51
*** N2TOH has joined #yosys23:01
*** X-Scale` has joined #yosys23:03
*** N2TOH has quit IRC23:06
*** X-Scale has quit IRC23:06
*** X-Scale` is now known as X-Scale23:06
*** Asu has quit IRC23:06
*** N2TOH has joined #yosys23:09
*** N2TOH has quit IRC23:16
*** N2TOH has joined #yosys23:20
*** emeb has quit IRC23:56

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!