Saturday, 2020-06-06

*** tpb has joined #yosys00:00
jmamishHi everyone!  I'm trying to start learning about Formal Verification on my own, and I'm using symbiyosys (Claire and co., y'all are absolute superstars. If I could do 1/10th the work y'all have done, I'd be very proud of myself).00:40
jmamishI've been reading "Formal Verification: an Essential Toolkit" by Seligman, Schubert, and Kumar and also reading ZipCPU's excellent blog posts. I'm having trouble using SVA things like `default clocking ... endclocking`, presumably because the verific frontend is needed.00:40
jmamishI'm wonder if SVA's `default clocking ... endclocking` can be replaced by an `always @($global_clock) assume(clk == !clk_prev)` like what ZipCPU suggests in his "my first experience with Formal Methods" blogpost00:41
jmamishs/wonder/wondering/00:41
jmamishOr even better, if I'm somehow misusing symbiyosys and it can support `default clocking ... endclocking` even without verific.00:42
ZipCPUjamish: Do you need to?00:44
ZipCPUHow many clocks are in your design?00:44
jmamishJust one clock, but I think I don't fully understand the utility of `default clocking` or the utility of the always @($global_clock) statement in your blog.00:45
jmamishSorry to bring these basic questions to this channel, but there's not a lot of good stuff on FV for free on the web.  Well, aside from @ZipCPU's blog posts.00:45
ZipCPUSo, if you only have one clock, then don't worry about the default clocking statement00:50
ZipCPU... and don't use $global_clock (it's deprecated anyway)00:50
ZipCPUWith just one clock.... things are easy00:50
jmamishhahaha thanks. I'm guessing that yosys and the provers know which one is the clock cause it's the only thing in the sensitivity lists?00:51
ZipCPUYou also don't need to do anything like assume(clk == !clk_prev)00:51
ZipCPUYou only need to do that if you are using multiple clocks00:51
ZipCPUIf you aren't using multiple clocks, it'd just double the workload of the formal solver00:51
ZipCPUYes, if there's only one clock in the sensitivity list, Yosys will know what's going on00:53
jmamishThanks a ton; this cleared up some major misunderstandings for me.00:53
ZipCPUGlad to help00:54
jmamishI was confused before about how you can communicate to the solver that it doesn't matter if inputs change in-between clock cycles..... but the solver already knows that.00:54
ZipCPUWell, there's two modes00:54
ZipCPUIn one mode, everything is synchronous00:55
ZipCPUIn the second mode, you have to assume the clock00:55
jmamishWhat are the terms for the 2 modes?00:55
ZipCPUThe second mode allows you to handle asynchronous time steps and such00:55
ZipCPUHave you found my formal lesson slides?00:55
jmamishI have. I'm about 30% of the way through them.00:55
ZipCPUSo, towards the end there's a lesson on multiple clocks00:56
ZipCPUThat lesson discusses how to go about assuming the existence of more than one clock00:56
ZipCPUThat's also the time where I introduce the SymbiYosys option, "multiclock on"00:56
jmamishawesome, I'll keep looking through them.00:56
ZipCPUBut there is a caution: Don't use the clock in any logic context before then00:56
ZipCPUThe tool ... won't do what you want if you do00:57
ZipCPUSo, for example, you'd want to avoid things like: assign OUT = (CLK) ? A : B;00:57
jmamishwell, that seems like a pretty bad idea in the first place.00:58
ZipCPU(You should be avoiding those in general anyway, but that's another issue)00:58
ZipCPUYep!00:58
*** az0re has joined #yosys00:58
jmamishhahaha I wish someone would have told me that during my bachelor's degree :P00:58
ZipCPUHow so?00:58
ZipCPUOh, don't tell me, you tried that?00:58
ZipCPUOuch!00:58
jmamishI tried something similar....00:58
jmamishI thought I was being creative.00:58
ZipCPU... and ... it didn't do what you wanted, did it?00:58
jmamishIt did... sometimes...00:59
ZipCPUHeh, yeah, "sometimes"00:59
ZipCPULeaving you in "FPGA Hell" every other time00:59
jmamishhahaha oohhhh yeah.00:59
ZipCPU"My design doesn't work.  Why not, teacher?"00:59
ZipCPUSigh.00:59
jmamishThankfully It's been 5 or 6 years since then and Ive gotten a bit smarter about things01:00
ZipCPUOk, I was just about to ask01:00
ZipCPUSo, what sort of projects bring you this way?01:00
jmamishI worked as a robotics engineer for 2 years out of undergrad, but went back to get a PhD doing low power embedded systems.01:00
ZipCPULow power is ... it's own challenge.01:01
ZipCPUIs that what you are working with now?  Low power?01:01
jmamishyeah, but for the project I've got here, 'low power' is a little loose.01:01
jmamishI'm working on a jpeg compression core that will hopefully take 10 - 20 mW on an iCE40.01:02
ZipCPUWow, JPEG compression on an iCE40?01:02
ZipCPUDoes it ... fit?01:02
jmamishI don't know yet...01:02
ZipCPUHow many multiplies?01:03
jmamish501:03
jmamishwell, it's configurable01:03
ZipCPUHow many bits each?01:03
ZipCPU18x18?01:03
ZipCPU16x16?01:03
jmamishno, 16x1501:03
jmamish16x1601:03
ZipCPUOk ...01:03
ZipCPUWill you be needing DSP's?01:03
jmamishto fit inside the sysdsp blocks01:03
ZipCPUSo, you are using the UP5k's then??01:03
jmamishyep.01:04
ZipCPUThe room just got smaller01:04
jmamish???01:04
ZipCPU(Fewer LUTs)01:04
ZipCPUHave you found Yosys' capability of estimating logic usage?01:04
jmamishohhh yeah.  but most of what I'm doing is going to be in EBR RAM and DSP blocks.01:04
jmamishI should do that ASAP.01:05
ZipCPUIt's easy to use01:05
ZipCPUFor most things, you can just run "synth_* ..." and it'll synthesize the design and report usage to you01:05
ZipCPUYou can also use that "stat" command to get logic usage01:05
jmamishthat's awesome. I'm really glad that it supports the iCE4001:06
ZipCPUMany of my designs have nearby yosys scripts for logic usage measurements01:06
ZipCPUOh, yeah ;)01:06
ZipCPUI also tend to keep my logic usage notes in the Yosys script01:06
jmamishprobably a good idea resynth like that the same way that running unit tests in software land is a good idea.01:06
ZipCPUAfter everytime I run it, I'll scribble the usage down at the end of the script.  Start lines with "#" commentsto create01:06
ZipCPUYou've been doing logic design for 5-6 years you said?  Or has it been 5-6 years since you've done any, since way back in college?01:07
jmamishI did it in undergrad for about 3 semesters and have done a few side projects since then.01:07
ZipCPUOk.  Next question ...01:08
ZipCPUHave you given any thought to how you'll get your JPEG images on and off the FPGA?01:08
jmamishWe have an hm01b0 camera that we're pulling images from.01:08
jmamishand the FPGA is attached to an STM32Fsomething01:08
ZipCPUOk, so that's well defined ... will you be taking images off via the STM then?01:08
jmamishyep.01:08
ZipCPUNext question, Jpeg 2K?01:09
jmamishhaha no,01:09
jmamishI'm not that good at DSP math01:09
jmamishdo you think I should grit my teeth for 2 or 3 weeks and figure it out?01:09
ZipCPUThat's a shame.  I would've loved to connect you w/ someone whose wanted some JPEG2k help, but isn't an FPGA type01:09
jmamishhmmmmm01:09
ZipCPUDSP math?  Not sure01:09
ZipCPUDo you have two solid weeks to devote to it?01:09
ZipCPU... and would two weeks be enough?01:10
jmamishI mean, you know how time estimates are always too small when you're relatively green.01:10
jmamishand I might have 2 weeks, but my PhD advisor would probably disagree.01:10
ZipCPULol ... yes, I do01:10
ZipCPUDo you have a "working" design to start from, say from the last PhD student, or are you starting from scratch?01:11
jmamishI'm starting from scratch on my jpeg compressor, but I wrote one from scratch in C01:11
ZipCPUOkay.01:11
CerpinHrm, quick q: third solution seems best/most logical of any here to me, is it still flawed or not? https://stackoverflow.com/questions/21263968/reduce-array-to-sum-of-elements01:11
tpbTitle: verilog - Reduce array to sum of elements - Stack Overflow (at stackoverflow.com)01:11
ZipCPUCerpin: Depends on the application01:12
ZipCPUI've used adder trees before, and then I found a simpler solution01:12
ZipCPUThe other thing is ... I like to insist on one clock per addition--it helps keep the clock rate high01:12
jmamish>one clock per addition01:13
CerpinThis isn't an explicit adder tree though, no? Just handled by the synth?01:13
jmamishtotally agree01:13
CerpinThat's a fair point01:13
ZipCPUThat will also keep you from using lots of combinatorial logic to do the sumamtion01:13
ZipCPUCerpin: See https://zipcpu.com/dsp/2017/09/29/cheaper-fast-fir.html01:13
tpbTitle: A Cheaper Fast FIR Filter (at zipcpu.com)01:14
CerpinI suppose I do have -a- higher clock in play I could run this off01:14
CerpinThe application is pulse shaping01:14
ZipCPUSo ... filtering, right?01:14
CerpinYes01:14
ZipCPUMulticlock filtering?01:14
ZipCPUPulse shaping is often done in connection with an upsampler, no?01:14
CerpinWell, I don't think it has to be01:14
CerpinYes01:14
CerpinSo here's how I was planning to achieve said upsampling01:15
* ZipCPU sits down to listen01:15
CerpinBasically, I have the time-domain pulse shaping filter coefficients stored in a memory, truncated +/- some MT_s where T_s is the -symbol- period01:15
ZipCPUThat's a good start.  Keep going01:16
CerpinAnd every L clocks, if L is the upsampling factor, I read a new symbol. I want to have a mod-L counter that loops over the constants01:16
CerpinAnd basically each cycle you multiply by the sample at the value of that counter offset by each multiple of T_s within the window you truncated the filter response to01:17
CerpinSo you if you had say, M=3, you'd multiply 7 of these numbers, then sum them all01:17
ZipCPU7 number on one clock cycle?01:17
ZipCPU7 numbers on one clock cycle?01:17
CerpinIn parallel, surely that's not an issue other than the DSP block usage, no?01:18
ZipCPUNot really01:18
CerpinIf even -then- it's one somehow, I can explore another idea01:18
ZipCPUBut the algorithm in the article above would work nicely for the task01:18
ZipCPURather than an adder tree, you use an adder chain01:18
ZipCPUYou schedule the multiplies carefully, though, to make certain everything aligns properly when done01:19
ZipCPUWell ... you would need to modify the algorithm a bit.  The one in the article is a straight up FIR, running at the system clock rate, but your adder "chain" would also run at the system clock rate01:20
CerpinThat assumes the sample rate at in/out is the same, no? I guess I could just make the module itself pad zeroes on each symbol01:20
ZipCPUNo, no, no ... don't pad zeros.  It's too expensive to do01:20
ZipCPUI mean, yes, pad zeros, but then don't build the logic to handle the multiplied by zero stuff--since you already know the result would be zero01:20
CerpinYes, I didn't think that was a good idea01:20
ZipCPUI just mean that the idea of the adder chain would work nicely01:21
ZipCPUSort of like Fig 201:21
ZipCPUYou'd update the incoming value every couple cycles, and rotate the coefficients in the meantime01:22
ZipCPUjmamish: Before you wander off, let me invite you to join the ##dsp channel01:23
jmamishZipCPU: I wasnt gonna wander anywhere :)01:24
jmamishThanks!01:24
ZipCPUHeh ... yeah, it's just too often that someone shows up, asks a question, and then vanishes before you can get back to them01:24
ZipCPUIt's one of my frustrations with IRC01:25
CerpinApologies if I derailed things a bit, I'll have a more detailed look at using the chain modification there later tonight01:25
jmamishI *love* the stuff you write about, so I wouldn't wander off on you01:25
jmamishCerpin: no worries, IRC is always a little mercurial01:25
ZipCPUCerpin, yeah, no worries01:26
ZipCPUCerpin: Do you need to?01:27
ZipCPUOh, dear, responding to backlog01:27
ZipCPULet me scroll back to the here and now, sorry 'bout that01:27
* ZipCPU looks around for his sanity, just to check if it's still around somewhere01:28
CerpinIf that was at the clock thing, yes there is a PWM later that absolutely -requires- higher clock relative to this01:28
ZipCPUReally?  Okay, so ... how much faster will the PWM run then?01:28
CerpinI'm not sure what the minimum I can get away with is yet; I suppose I should check that with the hardware before going much further01:30
CerpinBut it needs to reproduce the passband signal in PWM form (this is fairly low-freq, for a rather niche application)01:31
jmamishCerpin: Can you tell us what the niche app is?01:32
CerpinIf anything from what I saw with this system before with another person working with the frontend, the limiting factor is going to be how fine my phase control needs to be01:32
CerpinUnderwater acoustic comms01:32
jmamishahhh that's fun!01:32
CerpinCarrier frequency should be in the hundreds of kHz01:32
CerpinI want to put a lot of channels of this on one FPGA01:32
jmamishHow many bits / symbol? What sort of coding scheme?01:32
CerpinConvolutional right now, QPSK right now but I'm designing it to generalize to higher order PSK and support precoding01:33
CerpinThe receiver side uses a turbo equalization scheme, so there's also an interleaver, etc.01:33
CerpinThere's another person doing that bit though01:34
jmamishSuper cool. Is this just for fun, or...?01:34
ZipCPUThat underwater PWM thing is ... a crazy beast, at least for the hardware I've applied it to01:35
Cerpinjmamish: nope, am grad student01:35
jmamishCerpin: Cheers! me too.01:35
ZipCPULet's see ... lots of channels in one FPGA, are we doing beamforming?  So, are all the channels coming from one source?01:36
CerpinYes, precoding = generalization of beamforming01:36
CerpinWhat do you mean one source?01:36
Cerpindatawise?01:36
CerpinThere will be multiple transducers for sure01:37
ZipCPUDatawise, definitely, signal generation wise too ... as in one signal that is then formed into a shaped beam via a series of delays01:37
*** rrika_ is now known as rrika01:37
ZipCPUWhen I did that recently, I generated the PWM waveform and then handled all the delays01:37
ZipCPUI think I was building for ... 20 delay elements or so IIRC01:38
ZipCPUGetting all of those delays to fit in the FPGA was quite the challenge01:38
CerpinI guess this is another good point; if I don't intend to transmit more than one kind of data, this would take care of the need to have a coordinator phase-locking all the PWMs etc.01:38
ZipCPUThere are physical rules on those transducers too01:38
CerpinIndeed01:39
ZipCPUAre you using bipolar ones?  Or just unipolar?  Does the PWM have outputs of 0,1, or -1,0,1 ?01:39
CerpinSo the frontend really is pretty well tested via microcontroller already01:39
Cerpin50% duty is 001:40
CerpinI don't want to get into the hardware details really, but that should give you an idea how to control it01:40
ZipCPUFair enough01:40
ZipCPUJust one caution: beware of the amount of logic that the beamformer will use01:40
ZipCPUOh, one other question for you, Cerpin: Will you be publishing a paper on your work and results, and if so ... in what time frame?01:41
CerpinThe plan is to use a linear precoding technique like WF01:41
CerpinEnd of summer, hopefully?01:41
ZipCPUAwesome!01:42
ZipCPUI'd like to read it when you publish it01:42
ZipCPUCan you give me a heads up on it when you get there?01:42
jmamishMe too.01:42
CerpinAlright01:42
ZipCPUAnd, in the meantime, come back if you have problems or need any help.  I'll be around01:42
CerpinThank you! Will do my best01:46
ZipCPUEnjoy!01:46
jmamishZipCPU: I could be enticed to write a jpeg 2k compressor if an open source one doesn't already exist, and if you think that could be a useful thing.01:46
ZipCPU:D01:47
jmamishalso, my 8x8 DCT engine takes about 860 logic cells. IDK if it's using the SysDSP or not.01:49
ZipCPUOh, and ... and how many of those DCT's do you need to run in parallel?01:49
jmamishI was hoping for 4 or 5, but that's not looking so likely anymore.01:50
jmamishIt'll work fine with just 1, but it will be less efficient.01:50
ZipCPUSee ... I remember going through this work some time back ...01:50
ZipCPUIt'd be a shame to have you reinvent the wheel, but I'd need to make an introduction ... Hmm ...01:51
ZipCPUAt least, when I did it last, I was doing a wavelet transform and the limit turned out to be memory bandwidth01:51
jmamishI dimly remember avoiding jpeg2k because of something memory related.01:52
jmamishbut I could be inventing memories.01:52
ZipCPUWell, that was only the first half of the algorithm.  There was another half that needed to be done as well that I hadn't dug into.  He had01:52
ZipCPUIn that case, it turned out the ZipCPU was just as fast as the raw hardware.  Kind of a surprise that way01:54
ZipCPUI would've expected a raw hardware, doing nothing but the wavelet transform, tuned to the purpose, to have been faster.  It was, but not by that much01:55
jmamishWorking on my own little jpeg thing, I was surprised to find that mine takes much fewer cycles than an ARM doing something similar.01:56
jmamishI've ended up with a microcoded core to do the DSPs that just does fetch, multiply, and accumulate01:56
jmamishbut I think I've been able to pipeline mine more smoothly than an ARM cortex m4 would've01:56
ZipCPUThe ARM... is that the attached STM that youare referencing?01:56
jmamishoriginally this project had 2 ARMs on it01:57
jmamishone for compression and one for system control01:57
jmamishwe were using the Ambiqmicro near-threshold Apollo3 blue01:57
jmamishBut the arm took WAY more cycles than I expected, probably because of wait states and stalls on the SRAM bus... also probably because that MCU lets you operate the core 2x as fast as the SRAM bus.01:58
ZipCPUWas the design bus limited?  That's a key question01:58
jmamishNo idea. I found the documentation for the Apollo3 blue hard to read.01:59
jmamishso I had a hard time reasoning about what the bus would be doing, and I didn't know how to measure how well its prefetch engine was doing.01:59
jmamishSo as far as I can tell, the benefits for me doing it in Verilog are that I can run multiple DCT engines in parallel, and the DCT engines can all have perfect data fetching02:00
ZipCPUYeah, that's a "key" question.  For any design.  You'll need/want to know where your bottlenecks are02:01
jmamishWell, as far as I can tell, using an FPGA instead of a microcontroller will totally eliminate that bottleneck.02:04
ZipCPUNot if data memory is the bottleneck02:06
ZipCPUPerhaps if memory is shared between data and instructions--but that would only be true if there were no cache02:06
jmamishThe microcontroller was buffering an entire image and then operating on it, and all reads and writes were shared on one bus.02:07
jmamishOn the FPGA, I'm doing it line-by-line, and the input buffer and intermediate buffers are all in seperate EBRs, so there's no bus contention02:07
jmamish(when I say line-by-line, I mean lines 8 pixels tall)02:08
ZipCPUSo, you are able to operate on an image in sections of 8x8 pixels?02:09
jmamishwith ancient jpeg, yes.02:10
ZipCPUThe challenge I had been struggling with was trying to operate on images in sections of 256x256 pixels--nothing that would fit in any block RAM02:10
jmamishohhhhhhh lol02:10
jmamishwith ancient jpeg, the fundamental unit is 8x8 'samples', never bigger, never smaller. One sample can be an average of up to 16 pixels02:10
ZipCPUThe algorithm wanted to first operate on the image section in horizontal rows.  That was easy for the memory.  Then it wanted to operate in vertical columns.  That ... hurt02:10
jmamishthis was jpeg2000?02:11
ZipCPUYes02:11
jmamishI thought the wavelet transform was on 8x8 pixel blocks....02:11
jmamishI think even with the newest jpeg, 'jpeg XL', the max block size is 32x3202:11
ZipCPUCould be this was just how this user wanted it done02:12
jmamishI should go back and digest the jpeg2k spec a little more carefully, but something about that doesn't sound right to me.02:13
jmamishmy problem with reading thick specifications is that after about 10 pages my eyes start to glaze over02:13
jmamishor else I'd do it more often :P02:13
ZipCPUYeah ... I never got that far02:14
ZipCPUI think I'd want to pick up a USB spec first02:14
ZipCPUOr perhaps a good fiction book, you know, something like the Mueller report or some such :D02:15
jmamishhahahaha I had a much harder time with the USB spec than the jpeg spec.02:15
ZipCPU:D02:16
jmamishWhen I was a sophomore in undergrad, the place I was working at asked me to implement USB 2.0 device firmware on bare metal02:16
jmamishFor a few weeks I thought I was gonna switch back to my music degree02:16
ZipCPULol02:17
jmamishBut then I found Jan Axelson's books02:17
ZipCPUtinyfpga did implement USB 2.0 on an iCE4002:17
jmamish??????02:18
jmamishno way.02:18
jmamishan iCE40 can go that fast??02:18
ZipCPUYeah, I was a bit surprised myself02:18
ZipCPUAs I recall, it only  went up to a bit rate of 12Mbps02:18
jmamishohhhhhhh02:18
ZipCPUSo, perhaps not the entire protocol ...02:18
ZipCPUBut that 12Mbps rate required some fancy physical footwork, and a 48MHz clock02:19
jmamishI was thinking the 480Mbps one, with the 12 --> 480 handshaking and the current-based signalling.02:19
ZipCPUYeah, not sure it'd go that fast02:19
ZipCPUThat said, I've been surprised at a lot of things so far02:19
jmamishI'd be awfully pleased with myself if I got full-speed usb on an FPGA02:19
jmamishI haven't seen much, so I'm still surprised by a lot of things02:20
jmamishbut yosys absolutely blew me away once I figured how much work it took02:20
ZipCPUHow much work it took to ... build and run Yosys?02:20
jmamishto write yosys02:21
jmamishlol02:21
ZipCPUAhh, yes, and the task remains far from finished02:21
jmamishI've looked through some of the github issues, and I don't see many good places to dip my toe in02:22
jmamishIs there another list of issues?02:22
ZipCPUThat's really a question for others on the team.  I'm more of a formal methods guy myself.02:24
jmamishWell, I feel like I'd be fooling myself if I thought I had the time or discipline right now to contribute to such a big project.02:25
jmamishZipCPU: Thanks a ton for the brief chat about formal methods and for the more extensive chat about other stuff.02:26
ZipCPUGlad I could help02:26
jmamishYou cleared up some fundamental misunderstandings I had about this stuff.02:26
ZipCPUPM me some time if you want to know more about my contact w/ JPEG stuffs02:26
jmamishSounds good!02:26
jmamishAnd now that I know how friendly people on this IRC are I'll stop by more often.02:27
ZipCPUYou might want to find a way to stay logged in02:27
ZipCPUIRC stays open 24/7, and not everybody operates on the same time zones02:27
jmamishI appreciate the suggestion.02:28
jmamishIt's been a long time since I've used IRC, so I don't really know the ins and outs of how to use it effectively02:28
CerpinThere are bouncers you can use for that purpose if maintaining the connection yourself is burdensome02:28
CerpinMy desktop is always on though, so I just stick irssi in a tmux session and leave it02:28
jmamishI've only got a laptop, so that doesn't work well for me02:30
ZipCPUYes, mine is always on as well02:30
ZipCPUThere's also channel logs that can be useful--see the title bar02:30
jmamishwell, I don't want to pollute this IRC talking about IRC bouncers. I can just google it02:30
jmamishIt seems like the channel logs don't capture everything?02:30
jmamishI see lots of conversations on the channel logs that look half-finished.02:31
ZipCPUSometimes folks leave before they get answers02:32
ZipCPUNot everyone is online 24/702:32
ZipCPUI will also often stay silent if not directly addressed, or if I don't know anything about the issue being discussed02:32
jmamishAh, so you responded because I mentioned your nick when talking about your blog posts?02:33
ZipCPUExactly02:33
ZipCPUI like to use HexChat.  If anyone mentions my nick, it notifies me, so I then take a look if I'm not otherwise watching the channel02:34
jmamishZipCPU: until I figure out how to get a bouncer set up although I don't have a desktop, I can just look at the logs for this channel.02:35
ZipCPU;)02:35
jmamishIt's evening where I am, so have a good evening everyone.02:36
*** jmamish has quit IRC02:37
*** Degi has quit IRC02:39
*** Degi has joined #yosys02:42
*** SpaceCoaster has joined #yosys03:43
*** adjtm has quit IRC03:52
*** _whitelogger has quit IRC04:00
*** _whitelogger has joined #yosys04:02
*** N2TOH has joined #yosys04:25
*** N2TOH_ has quit IRC04:28
*** adjtm has joined #yosys04:30
cr1901_modernhttps://twitter.com/latticesemi/status/1269115302140231682 Wow04:51
cr1901_modernThey actually said something04:51
*** Cerpin has quit IRC05:05
awygleAnybody check the new text yet? I cannot conveniently log into my lattice account atm05:06
whitequarki checked the text, (3) is just gone05:10
az0reBefore anyone flies in on a fighter jet to celebrate in front of a "mission accomplished" banner, how can anyone have confidence this won't happen again?  The process here is totally opaque, and it's not clear just how committed to open source they really are.05:11
az0reHow did that clause get there in the first place?05:11
*** Cerpin has joined #yosys05:12
*** proteusguy has quit IRC05:12
whitequarkso, lattice has historically been friendly to OSS efforts, in the sense that they have never (before yesterday's incident) actively opposed it, have been in the loop, and donated small amounts of hardware towards that end05:13
whitequarkbased on that and the indication that it hasn't changed, my understanding is that we see an example of corporate dysfunction rather than an u-turn05:14
whitequarkwhich means that it could as well happen again and we should probably be ready for it05:14
*** Cerpin has quit IRC05:27
thardincool, good on themfor fixing it05:33
*** Cerpin has joined #yosys05:34
*** _whitelogger has quit IRC05:45
*** _whitelogger has joined #yosys05:47
thardinaz0re: there's never a way to be sure when you're dealing  with a company beholden to shareholders05:51
*** N2TOH_ has joined #yosys06:05
*** N2TOH has quit IRC06:08
*** Cerpin has quit IRC06:32
*** Cerpin has joined #yosys06:32
*** Cerpin has joined #yosys06:33
*** proteusguy has joined #yosys06:43
*** emeb_mac has quit IRC07:09
*** hitomi2500 has joined #yosys07:45
LoftyIsn't this the first public support for FOSSi from Lattice, though?08:09
LoftyMy understanding is before we've had just private "we don't mind" type statements from people.08:09
*** cyrozap has quit IRC08:18
daveshahYes, as far as I know it is08:21
daveshahTheir European sales office invited us to give a talk at a workshop in Italy (and paid for hotel iirc) but I don't know if Lattice HQ endorsed that08:21
LoftySo, even though it sucks that clause was there, we have a small silver lining, I suppose?08:28
daveshahOh, I don't mean as a response, that was two years ago08:29
daveshahIn terms of 'previous support for open source'08:30
LoftyMm08:30
daveshahBut yeah, given how quickly they turned around maybe it was just a legal team error rather than anything more problematic08:31
LoftyAnd I suppose this means we the community have a surprisingly loud voice08:35
LoftyCollective action: it works08:35
daveshahI mean Lattice's poor twitter team must have been a bit inundated if they read their mentions08:36
LoftyI thought asking a company to read their Twitter feed was a bit too much to ask08:37
LoftyApparently not08:37
*** kraiskil has joined #yosys08:40
*** cyrozap has joined #yosys08:50
thardinthe squeaky wheel gets the grease08:55
*** kraiskil has quit IRC08:57
*** kraiskil has joined #yosys09:03
*** Asu has joined #yosys09:21
*** dys has joined #yosys10:46
*** kraiskil has quit IRC11:08
*** kraiskil has joined #yosys11:51
*** hitomi2500 has quit IRC12:06
*** kraiskil has quit IRC12:09
*** craigo has quit IRC12:50
*** carlomaragno has joined #yosys13:17
*** kgugala_ has joined #yosys13:28
*** kgugala has quit IRC13:30
Loftydaveshah: does anything actually consume BLIF from synth_ecp5?13:31
daveshahNope13:31
daveshahIf someone hypothetically did a vpr flow then it would be needed13:32
LoftyHmm.13:32
LoftyBLIF on iCE40 was for arachne-pnr, right?13:32
daveshahYes13:33
whitequarkdoes arachne even still work?13:33
whitequarkweren't there some primitive changes, like LUT order or something?13:34
*** kgugala_ has quit IRC13:36
LoftyLikewise, what actually uses EDIF on iCE40/ECP5? Lattice's toolchain?13:36
*** kgugala has joined #yosys13:36
daveshahNo idea about arachne, but the lack of constraints make me think it still works13:54
daveshahI don't think the LUT order change affects the final netlist13:54
daveshahThe ice40 tools could take EDIF in theory but it crashed on Yosys' output, idk about ECP513:55
* whitequark shudders at EDIF14:04
whitequarkthe ATF15xx tools are extremely picky about EDIF in a bad way14:04
daveshahAlmost everything is tbh14:05
mwkas far as I'm aware, yosys write_edif is really "write EDIF that ISE/Vivado can read" and isn't actively used with anything else14:24
whitequarkthen let's drop it on non-xilinx?14:26
mwkyou mean the `-edif` option?14:28
whitequarkyeah14:30
mwkyeah, I mean, if it really doesn't work and/or has better alternatives14:32
mwkI have no idea what's the state of a lot of targets in yosys tbh14:32
whitequarkshould we have like... a doc section about them?14:33
mwkfor all targets but xilinx and sf2 (whatever that is), the `-edif` option is no different from `yosys -o <file>.edif`14:33
mwkwhile xilinx and sf2 pass some extra options14:33
whitequarkoh yeah what's the point in synth_ice40 -json anyway14:33
mwkthat's a bit annoying btw, and perhaps worth rethinking14:34
mwklike14:34
mwk-json option is definitely redundant for every target, since we don't ever want to have target-specific options here14:35
mwkat the same time, this is not true for -edif, with all its variants14:35
mwkmaybe it would be good to kill all -edif options in favor of having the target implicitely set the proper EDIF options via some side channel, so that `-o file.edif` works right?14:36
LoftyScratchpad? Scratchpad.14:36
FL4SHKwhitequark:  is it crazy if my custom HDL's compiler has a handwritten parser?14:37
LoftyLike, synth_intel_alm behaves differently between default mode and -vqm.14:37
mwkI mean, it's magicky14:37
LoftyFL4SHK: why would it?14:37
Lofty*why would it be14:37
mwkand I don't particularly like it14:37
whitequarkFL4SHK: not really? i write a lot of parsers by hand, fsvo "by hand"14:37
mwkbut then, I'm also annoyed by having both `-o x.json` and `synth_whatever -json x.json`14:37
LoftyHonestly, I *could* make -quartus the default, but I like synthesis printing the more detailed stats about what it's doing14:38
LoftyWhich is information that kinda gets lost if you use the vendor primitives directly.14:39
*** SpaceCoaster has quit IRC14:44
*** emeb_mac has joined #yosys15:05
FL4SHKI see15:13
FL4SHKI've been writing this parser with a framework I've developed myself15:29
FL4SHKalso working, as a side project, on SNES Binutils15:30
FL4SHKfollowed by a SNES GCC backend15:30
Loftyhttps://github.com/ZirconiumX/yosys-cookbook <-- can people take a look at this?15:31
tpbTitle: GitHub - ZirconiumX/yosys-cookbook: User-friendly explanation of Yosys options (at github.com)15:31
*** kgugala has quit IRC15:33
*** kgugala has joined #yosys15:33
whitequarknice15:35
whitequarknit: I don't like the use of "bloat" very much as people have a strong negative connotation to it15:35
whitequarkbut if you're using -nocarry you probably know what you are doing15:36
whitequarkalso, the increase in size from -nocarry is a lot smaller than from -nobram15:36
FL4SHKI heard that yosys struggles with inferring block RAM15:36
FL4SHKI also heard that Lattice is out15:36
*** develonepi3 has joined #yosys15:36
LoftyThe latter is out of date15:37
whitequarkyeah, they fully backtracked15:37
LoftyThey retracted the clause that forbids bitstream RE15:37
FL4SHKOh neat15:37
FL4SHKso yosys does indeed struggle with inferring block RAM?15:37
whitequarkregarding yosys and BRAM, I wouldn't say it struggles exactly15:37
FL4SHKI see15:37
LoftyAs for the former; kinda - Yosys struggles with inferring true dual port RAMs, and with multiple write ports15:37
whitequarkIME all toolchains have some difficulty with inferring RAM in Verilog15:37
whitequark(because the entire idea is flawed)15:38
FL4SHKThe idea is flawed?15:38
whitequarkyeah15:38
FL4SHKI've done it in SV a number of times.15:38
whitequarkyou write a behavioral definition of a RAM instead of a structural, and expect the tools to follow an undocumented heurstic algorithm to guess what you mean15:38
LoftyYou have to describe how a RAM is made, and the tool has to guess what you're actually looking for15:38
whitequarkthis is stupid. you should just request a specific kind of RAM15:38
FL4SHKmakes your code non-portable15:38
whitequark(well, sometimes undocumented, sometimes it is)15:38
whitequarkit only does because Verilog doesn't offer a standard way to do it15:39
FL4SHKThat is fair15:39
LoftyOr VHDL15:39
FL4SHKVHDL seems to, kind of15:39
FL4SHKshared stuff15:39
whitequarkthere's no reason it couldn't other than Verilog being unsuitable for synthesis of synchronous logic15:39
whitequarkor "not well suited" would be a less inflammatory way to put it15:39
FL4SHKI haven't really had it fail on me?15:40
FL4SHKI do like that VHDL doesn't have undefined semantics15:40
whitequarkXilinx has a few serious footguns15:40
FL4SHKI honestly might switch to defining my HDL in terms of VHDL15:41
FL4SHKOr at least I'd do so if I could do formal verification in VHDL...15:41
whitequarkthe worst one is when you describe a RAM with an async output but it infers a transparent synchronous output15:41
develonepi3jmamish: Are you on this board, now? ZipCPU said you were interest in jpeg.15:41
whitequarkbecause it finds a register somewhere else in the design15:41
whitequarkand the pattern it looks for happens to match, even though it is not your intent15:41
whitequarkwhat do you mean by VHDL not having undefined semantics?15:42
FL4SHKwell, maybe I remembered wrongly15:42
whitequarkare you perhaps referring to simulation determinism?15:42
FL4SHKyes15:42
whitequarkVHDL's simulator is awesome and IMO the single best thing that came out of Verilog and VHDL together15:42
whitequarkbut... it doesn't help synthesis much15:42
whitequarkconsider that most toolchains don't differentiate VHDL and Verilog past the frontend15:43
FL4SHKThat is true15:43
FL4SHKI honestly really want to have my own HDL done15:43
FL4SHKI want to use that language.15:43
FL4SHKIt's difficult15:43
FL4SHKI shrunk the language, even15:43
LoftyFIRRTL :P15:43
FL4SHKI still have to do all the lowering15:44
LoftyYou can tell something is a good idea when none of the proprietary tools support it15:44
whitequarklike what?15:45
LoftyPortable memory instantiation for example :P15:46
LoftyAlso, I fixed your nit, wq15:46
LoftyAnd also posted about it on Twitter15:46
Lofty*about my cookbook on Twitter15:47
whitequarkoh, yeah16:14
*** GenTooMan has quit IRC16:17
*** dys has quit IRC16:51
*** GenTooMan has joined #yosys16:55
*** kraiskil has joined #yosys17:02
*** kraiskil has quit IRC17:25
*** strongsaxophone has joined #yosys17:42
*** kraiskil has joined #yosys17:42
*** mirage335 has quit IRC17:55
*** mirage335 has joined #yosys18:00
*** dys has joined #yosys18:11
*** strongsaxophone has quit IRC18:22
*** FFY00 has quit IRC18:27
*** FFY00 has joined #yosys18:27
*** Laksen has joined #yosys18:36
*** oldtopman has quit IRC18:47
*** oldtopman has joined #yosys18:50
*** Cerpin has quit IRC19:17
*** Laksen has quit IRC19:31
*** Cerpin has joined #yosys19:33
*** kraiskil has quit IRC20:04
*** kraiskil has joined #yosys20:17
*** smkz has quit IRC20:40
*** smkz has joined #yosys20:41
*** smkz has quit IRC20:41
*** smkz has joined #yosys20:43
*** craigo has joined #yosys21:39
*** kraiskil has quit IRC21:54
*** Asuu has joined #yosys21:59
*** Asu has quit IRC21:59
*** Cerpin has quit IRC22:23
*** Cerpin has joined #yosys22:43
*** craigo has quit IRC22:49
*** oldtopman has quit IRC22:51
*** oldtopman has joined #yosys23:02
*** X-Scale` has joined #yosys23:05
*** X-Scale has quit IRC23:06
*** X-Scale` is now known as X-Scale23:06
*** Cerpin has quit IRC23:47

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