*** tpb has joined #yosys | 00:00 | |
jmamish | Hi 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 |
---|---|---|
jmamish | I'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 |
jmamish | I'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" blogpost | 00:41 |
jmamish | s/wonder/wondering/ | 00:41 |
jmamish | Or even better, if I'm somehow misusing symbiyosys and it can support `default clocking ... endclocking` even without verific. | 00:42 |
ZipCPU | jamish: Do you need to? | 00:44 |
ZipCPU | How many clocks are in your design? | 00:44 |
jmamish | Just 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 |
jmamish | Sorry 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 |
ZipCPU | So, if you only have one clock, then don't worry about the default clocking statement | 00:50 |
ZipCPU | ... and don't use $global_clock (it's deprecated anyway) | 00:50 |
ZipCPU | With just one clock.... things are easy | 00:50 |
jmamish | hahaha 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 |
ZipCPU | You also don't need to do anything like assume(clk == !clk_prev) | 00:51 |
ZipCPU | You only need to do that if you are using multiple clocks | 00:51 |
ZipCPU | If you aren't using multiple clocks, it'd just double the workload of the formal solver | 00:51 |
ZipCPU | Yes, if there's only one clock in the sensitivity list, Yosys will know what's going on | 00:53 |
jmamish | Thanks a ton; this cleared up some major misunderstandings for me. | 00:53 |
ZipCPU | Glad to help | 00:54 |
jmamish | I 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 |
ZipCPU | Well, there's two modes | 00:54 |
ZipCPU | In one mode, everything is synchronous | 00:55 |
ZipCPU | In the second mode, you have to assume the clock | 00:55 |
jmamish | What are the terms for the 2 modes? | 00:55 |
ZipCPU | The second mode allows you to handle asynchronous time steps and such | 00:55 |
ZipCPU | Have you found my formal lesson slides? | 00:55 |
jmamish | I have. I'm about 30% of the way through them. | 00:55 |
ZipCPU | So, towards the end there's a lesson on multiple clocks | 00:56 |
ZipCPU | That lesson discusses how to go about assuming the existence of more than one clock | 00:56 |
ZipCPU | That's also the time where I introduce the SymbiYosys option, "multiclock on" | 00:56 |
jmamish | awesome, I'll keep looking through them. | 00:56 |
ZipCPU | But there is a caution: Don't use the clock in any logic context before then | 00:56 |
ZipCPU | The tool ... won't do what you want if you do | 00:57 |
ZipCPU | So, for example, you'd want to avoid things like: assign OUT = (CLK) ? A : B; | 00:57 |
jmamish | well, 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 |
ZipCPU | Yep! | 00:58 |
*** az0re has joined #yosys | 00:58 | |
jmamish | hahaha I wish someone would have told me that during my bachelor's degree :P | 00:58 |
ZipCPU | How so? | 00:58 |
ZipCPU | Oh, don't tell me, you tried that? | 00:58 |
ZipCPU | Ouch! | 00:58 |
jmamish | I tried something similar.... | 00:58 |
jmamish | I thought I was being creative. | 00:58 |
ZipCPU | ... and ... it didn't do what you wanted, did it? | 00:58 |
jmamish | It did... sometimes... | 00:59 |
ZipCPU | Heh, yeah, "sometimes" | 00:59 |
ZipCPU | Leaving you in "FPGA Hell" every other time | 00:59 |
jmamish | hahaha oohhhh yeah. | 00:59 |
ZipCPU | "My design doesn't work. Why not, teacher?" | 00:59 |
ZipCPU | Sigh. | 00:59 |
jmamish | Thankfully It's been 5 or 6 years since then and Ive gotten a bit smarter about things | 01:00 |
ZipCPU | Ok, I was just about to ask | 01:00 |
ZipCPU | So, what sort of projects bring you this way? | 01:00 |
jmamish | I 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 |
ZipCPU | Low power is ... it's own challenge. | 01:01 |
ZipCPU | Is that what you are working with now? Low power? | 01:01 |
jmamish | yeah, but for the project I've got here, 'low power' is a little loose. | 01:01 |
jmamish | I'm working on a jpeg compression core that will hopefully take 10 - 20 mW on an iCE40. | 01:02 |
ZipCPU | Wow, JPEG compression on an iCE40? | 01:02 |
ZipCPU | Does it ... fit? | 01:02 |
jmamish | I don't know yet... | 01:02 |
ZipCPU | How many multiplies? | 01:03 |
jmamish | 5 | 01:03 |
jmamish | well, it's configurable | 01:03 |
ZipCPU | How many bits each? | 01:03 |
ZipCPU | 18x18? | 01:03 |
ZipCPU | 16x16? | 01:03 |
jmamish | no, 16x15 | 01:03 |
jmamish | 16x16 | 01:03 |
ZipCPU | Ok ... | 01:03 |
ZipCPU | Will you be needing DSP's? | 01:03 |
jmamish | to fit inside the sysdsp blocks | 01:03 |
ZipCPU | So, you are using the UP5k's then?? | 01:03 |
jmamish | yep. | 01:04 |
ZipCPU | The room just got smaller | 01:04 |
jmamish | ??? | 01:04 |
ZipCPU | (Fewer LUTs) | 01:04 |
ZipCPU | Have you found Yosys' capability of estimating logic usage? | 01:04 |
jmamish | ohhh yeah. but most of what I'm doing is going to be in EBR RAM and DSP blocks. | 01:04 |
jmamish | I should do that ASAP. | 01:05 |
ZipCPU | It's easy to use | 01:05 |
ZipCPU | For most things, you can just run "synth_* ..." and it'll synthesize the design and report usage to you | 01:05 |
ZipCPU | You can also use that "stat" command to get logic usage | 01:05 |
jmamish | that's awesome. I'm really glad that it supports the iCE40 | 01:06 |
ZipCPU | Many of my designs have nearby yosys scripts for logic usage measurements | 01:06 |
ZipCPU | Oh, yeah ;) | 01:06 |
ZipCPU | I also tend to keep my logic usage notes in the Yosys script | 01:06 |
jmamish | probably a good idea resynth like that the same way that running unit tests in software land is a good idea. | 01:06 |
ZipCPU | After everytime I run it, I'll scribble the usage down at the end of the script. Start lines with "#" commentsto create | 01:06 |
ZipCPU | You'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 |
jmamish | I did it in undergrad for about 3 semesters and have done a few side projects since then. | 01:07 |
ZipCPU | Ok. Next question ... | 01:08 |
ZipCPU | Have you given any thought to how you'll get your JPEG images on and off the FPGA? | 01:08 |
jmamish | We have an hm01b0 camera that we're pulling images from. | 01:08 |
jmamish | and the FPGA is attached to an STM32Fsomething | 01:08 |
ZipCPU | Ok, so that's well defined ... will you be taking images off via the STM then? | 01:08 |
jmamish | yep. | 01:08 |
ZipCPU | Next question, Jpeg 2K? | 01:09 |
jmamish | haha no, | 01:09 |
jmamish | I'm not that good at DSP math | 01:09 |
jmamish | do you think I should grit my teeth for 2 or 3 weeks and figure it out? | 01:09 |
ZipCPU | That's a shame. I would've loved to connect you w/ someone whose wanted some JPEG2k help, but isn't an FPGA type | 01:09 |
jmamish | hmmmmm | 01:09 |
ZipCPU | DSP math? Not sure | 01:09 |
ZipCPU | Do you have two solid weeks to devote to it? | 01:09 |
ZipCPU | ... and would two weeks be enough? | 01:10 |
jmamish | I mean, you know how time estimates are always too small when you're relatively green. | 01:10 |
jmamish | and I might have 2 weeks, but my PhD advisor would probably disagree. | 01:10 |
ZipCPU | Lol ... yes, I do | 01:10 |
ZipCPU | Do you have a "working" design to start from, say from the last PhD student, or are you starting from scratch? | 01:11 |
jmamish | I'm starting from scratch on my jpeg compressor, but I wrote one from scratch in C | 01:11 |
ZipCPU | Okay. | 01:11 |
Cerpin | Hrm, 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-elements | 01:11 |
tpb | Title: verilog - Reduce array to sum of elements - Stack Overflow (at stackoverflow.com) | 01:11 |
ZipCPU | Cerpin: Depends on the application | 01:12 |
ZipCPU | I've used adder trees before, and then I found a simpler solution | 01:12 |
ZipCPU | The other thing is ... I like to insist on one clock per addition--it helps keep the clock rate high | 01:12 |
jmamish | >one clock per addition | 01:13 |
Cerpin | This isn't an explicit adder tree though, no? Just handled by the synth? | 01:13 |
jmamish | totally agree | 01:13 |
Cerpin | That's a fair point | 01:13 |
ZipCPU | That will also keep you from using lots of combinatorial logic to do the sumamtion | 01:13 |
ZipCPU | Cerpin: See https://zipcpu.com/dsp/2017/09/29/cheaper-fast-fir.html | 01:13 |
tpb | Title: A Cheaper Fast FIR Filter (at zipcpu.com) | 01:14 |
Cerpin | I suppose I do have -a- higher clock in play I could run this off | 01:14 |
Cerpin | The application is pulse shaping | 01:14 |
ZipCPU | So ... filtering, right? | 01:14 |
Cerpin | Yes | 01:14 |
ZipCPU | Multiclock filtering? | 01:14 |
ZipCPU | Pulse shaping is often done in connection with an upsampler, no? | 01:14 |
Cerpin | Well, I don't think it has to be | 01:14 |
Cerpin | Yes | 01:14 |
Cerpin | So here's how I was planning to achieve said upsampling | 01:15 |
* ZipCPU sits down to listen | 01:15 | |
Cerpin | Basically, I have the time-domain pulse shaping filter coefficients stored in a memory, truncated +/- some MT_s where T_s is the -symbol- period | 01:15 |
ZipCPU | That's a good start. Keep going | 01:16 |
Cerpin | And 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 constants | 01:16 |
Cerpin | And 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 to | 01:17 |
Cerpin | So you if you had say, M=3, you'd multiply 7 of these numbers, then sum them all | 01:17 |
ZipCPU | 7 number on one clock cycle? | 01:17 |
ZipCPU | 7 numbers on one clock cycle? | 01:17 |
Cerpin | In parallel, surely that's not an issue other than the DSP block usage, no? | 01:18 |
ZipCPU | Not really | 01:18 |
Cerpin | If even -then- it's one somehow, I can explore another idea | 01:18 |
ZipCPU | But the algorithm in the article above would work nicely for the task | 01:18 |
ZipCPU | Rather than an adder tree, you use an adder chain | 01:18 |
ZipCPU | You schedule the multiplies carefully, though, to make certain everything aligns properly when done | 01:19 |
ZipCPU | Well ... 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 rate | 01:20 |
Cerpin | That assumes the sample rate at in/out is the same, no? I guess I could just make the module itself pad zeroes on each symbol | 01:20 |
ZipCPU | No, no, no ... don't pad zeros. It's too expensive to do | 01:20 |
ZipCPU | I 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 zero | 01:20 |
Cerpin | Yes, I didn't think that was a good idea | 01:20 |
ZipCPU | I just mean that the idea of the adder chain would work nicely | 01:21 |
ZipCPU | Sort of like Fig 2 | 01:21 |
ZipCPU | You'd update the incoming value every couple cycles, and rotate the coefficients in the meantime | 01:22 |
ZipCPU | jmamish: Before you wander off, let me invite you to join the ##dsp channel | 01:23 |
jmamish | ZipCPU: I wasnt gonna wander anywhere :) | 01:24 |
jmamish | Thanks! | 01:24 |
ZipCPU | Heh ... yeah, it's just too often that someone shows up, asks a question, and then vanishes before you can get back to them | 01:24 |
ZipCPU | It's one of my frustrations with IRC | 01:25 |
Cerpin | Apologies if I derailed things a bit, I'll have a more detailed look at using the chain modification there later tonight | 01:25 |
jmamish | I *love* the stuff you write about, so I wouldn't wander off on you | 01:25 |
jmamish | Cerpin: no worries, IRC is always a little mercurial | 01:25 |
ZipCPU | Cerpin, yeah, no worries | 01:26 |
ZipCPU | Cerpin: Do you need to? | 01:27 |
ZipCPU | Oh, dear, responding to backlog | 01:27 |
ZipCPU | Let me scroll back to the here and now, sorry 'bout that | 01:27 |
* ZipCPU looks around for his sanity, just to check if it's still around somewhere | 01:28 | |
Cerpin | If that was at the clock thing, yes there is a PWM later that absolutely -requires- higher clock relative to this | 01:28 |
ZipCPU | Really? Okay, so ... how much faster will the PWM run then? | 01:28 |
Cerpin | I'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 further | 01:30 |
Cerpin | But it needs to reproduce the passband signal in PWM form (this is fairly low-freq, for a rather niche application) | 01:31 |
jmamish | Cerpin: Can you tell us what the niche app is? | 01:32 |
Cerpin | If 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 be | 01:32 |
Cerpin | Underwater acoustic comms | 01:32 |
jmamish | ahhh that's fun! | 01:32 |
Cerpin | Carrier frequency should be in the hundreds of kHz | 01:32 |
Cerpin | I want to put a lot of channels of this on one FPGA | 01:32 |
jmamish | How many bits / symbol? What sort of coding scheme? | 01:32 |
Cerpin | Convolutional right now, QPSK right now but I'm designing it to generalize to higher order PSK and support precoding | 01:33 |
Cerpin | The receiver side uses a turbo equalization scheme, so there's also an interleaver, etc. | 01:33 |
Cerpin | There's another person doing that bit though | 01:34 |
jmamish | Super cool. Is this just for fun, or...? | 01:34 |
ZipCPU | That underwater PWM thing is ... a crazy beast, at least for the hardware I've applied it to | 01:35 |
Cerpin | jmamish: nope, am grad student | 01:35 |
jmamish | Cerpin: Cheers! me too. | 01:35 |
ZipCPU | Let's see ... lots of channels in one FPGA, are we doing beamforming? So, are all the channels coming from one source? | 01:36 |
Cerpin | Yes, precoding = generalization of beamforming | 01:36 |
Cerpin | What do you mean one source? | 01:36 |
Cerpin | datawise? | 01:36 |
Cerpin | There will be multiple transducers for sure | 01:37 |
ZipCPU | Datawise, definitely, signal generation wise too ... as in one signal that is then formed into a shaped beam via a series of delays | 01:37 |
*** rrika_ is now known as rrika | 01:37 | |
ZipCPU | When I did that recently, I generated the PWM waveform and then handled all the delays | 01:37 |
ZipCPU | I think I was building for ... 20 delay elements or so IIRC | 01:38 |
ZipCPU | Getting all of those delays to fit in the FPGA was quite the challenge | 01:38 |
Cerpin | I 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 |
ZipCPU | There are physical rules on those transducers too | 01:38 |
Cerpin | Indeed | 01:39 |
ZipCPU | Are you using bipolar ones? Or just unipolar? Does the PWM have outputs of 0,1, or -1,0,1 ? | 01:39 |
Cerpin | So the frontend really is pretty well tested via microcontroller already | 01:39 |
Cerpin | 50% duty is 0 | 01:40 |
Cerpin | I don't want to get into the hardware details really, but that should give you an idea how to control it | 01:40 |
ZipCPU | Fair enough | 01:40 |
ZipCPU | Just one caution: beware of the amount of logic that the beamformer will use | 01:40 |
ZipCPU | Oh, 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 |
Cerpin | The plan is to use a linear precoding technique like WF | 01:41 |
Cerpin | End of summer, hopefully? | 01:41 |
ZipCPU | Awesome! | 01:42 |
ZipCPU | I'd like to read it when you publish it | 01:42 |
ZipCPU | Can you give me a heads up on it when you get there? | 01:42 |
jmamish | Me too. | 01:42 |
Cerpin | Alright | 01:42 |
ZipCPU | And, in the meantime, come back if you have problems or need any help. I'll be around | 01:42 |
Cerpin | Thank you! Will do my best | 01:46 |
ZipCPU | Enjoy! | 01:46 |
jmamish | ZipCPU: 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 | :D | 01:47 |
jmamish | also, my 8x8 DCT engine takes about 860 logic cells. IDK if it's using the SysDSP or not. | 01:49 |
ZipCPU | Oh, and ... and how many of those DCT's do you need to run in parallel? | 01:49 |
jmamish | I was hoping for 4 or 5, but that's not looking so likely anymore. | 01:50 |
jmamish | It'll work fine with just 1, but it will be less efficient. | 01:50 |
ZipCPU | See ... I remember going through this work some time back ... | 01:50 |
ZipCPU | It'd be a shame to have you reinvent the wheel, but I'd need to make an introduction ... Hmm ... | 01:51 |
ZipCPU | At least, when I did it last, I was doing a wavelet transform and the limit turned out to be memory bandwidth | 01:51 |
jmamish | I dimly remember avoiding jpeg2k because of something memory related. | 01:52 |
jmamish | but I could be inventing memories. | 01:52 |
ZipCPU | Well, 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 had | 01:52 |
ZipCPU | In that case, it turned out the ZipCPU was just as fast as the raw hardware. Kind of a surprise that way | 01:54 |
ZipCPU | I 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 much | 01:55 |
jmamish | Working 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 |
jmamish | I've ended up with a microcoded core to do the DSPs that just does fetch, multiply, and accumulate | 01:56 |
jmamish | but I think I've been able to pipeline mine more smoothly than an ARM cortex m4 would've | 01:56 |
ZipCPU | The ARM... is that the attached STM that youare referencing? | 01:56 |
jmamish | originally this project had 2 ARMs on it | 01:57 |
jmamish | one for compression and one for system control | 01:57 |
jmamish | we were using the Ambiqmicro near-threshold Apollo3 blue | 01:57 |
jmamish | But 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 |
ZipCPU | Was the design bus limited? That's a key question | 01:58 |
jmamish | No idea. I found the documentation for the Apollo3 blue hard to read. | 01:59 |
jmamish | so 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 |
jmamish | So 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 fetching | 02:00 |
ZipCPU | Yeah, that's a "key" question. For any design. You'll need/want to know where your bottlenecks are | 02:01 |
jmamish | Well, as far as I can tell, using an FPGA instead of a microcontroller will totally eliminate that bottleneck. | 02:04 |
ZipCPU | Not if data memory is the bottleneck | 02:06 |
ZipCPU | Perhaps if memory is shared between data and instructions--but that would only be true if there were no cache | 02:06 |
jmamish | The microcontroller was buffering an entire image and then operating on it, and all reads and writes were shared on one bus. | 02:07 |
jmamish | On 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 contention | 02:07 |
jmamish | (when I say line-by-line, I mean lines 8 pixels tall) | 02:08 |
ZipCPU | So, you are able to operate on an image in sections of 8x8 pixels? | 02:09 |
jmamish | with ancient jpeg, yes. | 02:10 |
ZipCPU | The challenge I had been struggling with was trying to operate on images in sections of 256x256 pixels--nothing that would fit in any block RAM | 02:10 |
jmamish | ohhhhhhh lol | 02:10 |
jmamish | with ancient jpeg, the fundamental unit is 8x8 'samples', never bigger, never smaller. One sample can be an average of up to 16 pixels | 02:10 |
ZipCPU | The 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 ... hurt | 02:10 |
jmamish | this was jpeg2000? | 02:11 |
ZipCPU | Yes | 02:11 |
jmamish | I thought the wavelet transform was on 8x8 pixel blocks.... | 02:11 |
jmamish | I think even with the newest jpeg, 'jpeg XL', the max block size is 32x32 | 02:11 |
ZipCPU | Could be this was just how this user wanted it done | 02:12 |
jmamish | I should go back and digest the jpeg2k spec a little more carefully, but something about that doesn't sound right to me. | 02:13 |
jmamish | my problem with reading thick specifications is that after about 10 pages my eyes start to glaze over | 02:13 |
jmamish | or else I'd do it more often :P | 02:13 |
ZipCPU | Yeah ... I never got that far | 02:14 |
ZipCPU | I think I'd want to pick up a USB spec first | 02:14 |
ZipCPU | Or perhaps a good fiction book, you know, something like the Mueller report or some such :D | 02:15 |
jmamish | hahahaha I had a much harder time with the USB spec than the jpeg spec. | 02:15 |
ZipCPU | :D | 02:16 |
jmamish | When I was a sophomore in undergrad, the place I was working at asked me to implement USB 2.0 device firmware on bare metal | 02:16 |
jmamish | For a few weeks I thought I was gonna switch back to my music degree | 02:16 |
ZipCPU | Lol | 02:17 |
jmamish | But then I found Jan Axelson's books | 02:17 |
ZipCPU | tinyfpga did implement USB 2.0 on an iCE40 | 02:17 |
jmamish | ?????? | 02:18 |
jmamish | no way. | 02:18 |
jmamish | an iCE40 can go that fast?? | 02:18 |
ZipCPU | Yeah, I was a bit surprised myself | 02:18 |
ZipCPU | As I recall, it only went up to a bit rate of 12Mbps | 02:18 |
jmamish | ohhhhhhh | 02:18 |
ZipCPU | So, perhaps not the entire protocol ... | 02:18 |
ZipCPU | But that 12Mbps rate required some fancy physical footwork, and a 48MHz clock | 02:19 |
jmamish | I was thinking the 480Mbps one, with the 12 --> 480 handshaking and the current-based signalling. | 02:19 |
ZipCPU | Yeah, not sure it'd go that fast | 02:19 |
ZipCPU | That said, I've been surprised at a lot of things so far | 02:19 |
jmamish | I'd be awfully pleased with myself if I got full-speed usb on an FPGA | 02:19 |
jmamish | I haven't seen much, so I'm still surprised by a lot of things | 02:20 |
jmamish | but yosys absolutely blew me away once I figured how much work it took | 02:20 |
ZipCPU | How much work it took to ... build and run Yosys? | 02:20 |
jmamish | to write yosys | 02:21 |
jmamish | lol | 02:21 |
ZipCPU | Ahh, yes, and the task remains far from finished | 02:21 |
jmamish | I've looked through some of the github issues, and I don't see many good places to dip my toe in | 02:22 |
jmamish | Is there another list of issues? | 02:22 |
ZipCPU | That's really a question for others on the team. I'm more of a formal methods guy myself. | 02:24 |
jmamish | Well, 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 |
jmamish | ZipCPU: Thanks a ton for the brief chat about formal methods and for the more extensive chat about other stuff. | 02:26 |
ZipCPU | Glad I could help | 02:26 |
jmamish | You cleared up some fundamental misunderstandings I had about this stuff. | 02:26 |
ZipCPU | PM me some time if you want to know more about my contact w/ JPEG stuffs | 02:26 |
jmamish | Sounds good! | 02:26 |
jmamish | And now that I know how friendly people on this IRC are I'll stop by more often. | 02:27 |
ZipCPU | You might want to find a way to stay logged in | 02:27 |
ZipCPU | IRC stays open 24/7, and not everybody operates on the same time zones | 02:27 |
jmamish | I appreciate the suggestion. | 02:28 |
jmamish | It'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 effectively | 02:28 |
Cerpin | There are bouncers you can use for that purpose if maintaining the connection yourself is burdensome | 02:28 |
Cerpin | My desktop is always on though, so I just stick irssi in a tmux session and leave it | 02:28 |
jmamish | I've only got a laptop, so that doesn't work well for me | 02:30 |
ZipCPU | Yes, mine is always on as well | 02:30 |
ZipCPU | There's also channel logs that can be useful--see the title bar | 02:30 |
jmamish | well, I don't want to pollute this IRC talking about IRC bouncers. I can just google it | 02:30 |
jmamish | It seems like the channel logs don't capture everything? | 02:30 |
jmamish | I see lots of conversations on the channel logs that look half-finished. | 02:31 |
ZipCPU | Sometimes folks leave before they get answers | 02:32 |
ZipCPU | Not everyone is online 24/7 | 02:32 |
ZipCPU | I will also often stay silent if not directly addressed, or if I don't know anything about the issue being discussed | 02:32 |
jmamish | Ah, so you responded because I mentioned your nick when talking about your blog posts? | 02:33 |
ZipCPU | Exactly | 02:33 |
ZipCPU | I 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 channel | 02:34 |
jmamish | ZipCPU: 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 |
jmamish | It's evening where I am, so have a good evening everyone. | 02:36 |
*** jmamish has quit IRC | 02:37 | |
*** Degi has quit IRC | 02:39 | |
*** Degi has joined #yosys | 02:42 | |
*** SpaceCoaster has joined #yosys | 03:43 | |
*** adjtm has quit IRC | 03:52 | |
*** _whitelogger has quit IRC | 04:00 | |
*** _whitelogger has joined #yosys | 04:02 | |
*** N2TOH has joined #yosys | 04:25 | |
*** N2TOH_ has quit IRC | 04:28 | |
*** adjtm has joined #yosys | 04:30 | |
cr1901_modern | https://twitter.com/latticesemi/status/1269115302140231682 Wow | 04:51 |
cr1901_modern | They actually said something | 04:51 |
*** Cerpin has quit IRC | 05:05 | |
awygle | Anybody check the new text yet? I cannot conveniently log into my lattice account atm | 05:06 |
whitequark | i checked the text, (3) is just gone | 05:10 |
az0re | Before 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 |
az0re | How did that clause get there in the first place? | 05:11 |
*** Cerpin has joined #yosys | 05:12 | |
*** proteusguy has quit IRC | 05:12 | |
whitequark | so, 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 end | 05:13 |
whitequark | based 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-turn | 05:14 |
whitequark | which means that it could as well happen again and we should probably be ready for it | 05:14 |
*** Cerpin has quit IRC | 05:27 | |
thardin | cool, good on themfor fixing it | 05:33 |
*** Cerpin has joined #yosys | 05:34 | |
*** _whitelogger has quit IRC | 05:45 | |
*** _whitelogger has joined #yosys | 05:47 | |
thardin | az0re: there's never a way to be sure when you're dealing with a company beholden to shareholders | 05:51 |
*** N2TOH_ has joined #yosys | 06:05 | |
*** N2TOH has quit IRC | 06:08 | |
*** Cerpin has quit IRC | 06:32 | |
*** Cerpin has joined #yosys | 06:32 | |
*** Cerpin has joined #yosys | 06:33 | |
*** proteusguy has joined #yosys | 06:43 | |
*** emeb_mac has quit IRC | 07:09 | |
*** hitomi2500 has joined #yosys | 07:45 | |
Lofty | Isn't this the first public support for FOSSi from Lattice, though? | 08:09 |
Lofty | My understanding is before we've had just private "we don't mind" type statements from people. | 08:09 |
*** cyrozap has quit IRC | 08:18 | |
daveshah | Yes, as far as I know it is | 08:21 |
daveshah | Their 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 that | 08:21 |
Lofty | So, even though it sucks that clause was there, we have a small silver lining, I suppose? | 08:28 |
daveshah | Oh, I don't mean as a response, that was two years ago | 08:29 |
daveshah | In terms of 'previous support for open source' | 08:30 |
Lofty | Mm | 08:30 |
daveshah | But yeah, given how quickly they turned around maybe it was just a legal team error rather than anything more problematic | 08:31 |
Lofty | And I suppose this means we the community have a surprisingly loud voice | 08:35 |
Lofty | Collective action: it works | 08:35 |
daveshah | I mean Lattice's poor twitter team must have been a bit inundated if they read their mentions | 08:36 |
Lofty | I thought asking a company to read their Twitter feed was a bit too much to ask | 08:37 |
Lofty | Apparently not | 08:37 |
*** kraiskil has joined #yosys | 08:40 | |
*** cyrozap has joined #yosys | 08:50 | |
thardin | the squeaky wheel gets the grease | 08:55 |
*** kraiskil has quit IRC | 08:57 | |
*** kraiskil has joined #yosys | 09:03 | |
*** Asu has joined #yosys | 09:21 | |
*** dys has joined #yosys | 10:46 | |
*** kraiskil has quit IRC | 11:08 | |
*** kraiskil has joined #yosys | 11:51 | |
*** hitomi2500 has quit IRC | 12:06 | |
*** kraiskil has quit IRC | 12:09 | |
*** craigo has quit IRC | 12:50 | |
*** carlomaragno has joined #yosys | 13:17 | |
*** kgugala_ has joined #yosys | 13:28 | |
*** kgugala has quit IRC | 13:30 | |
Lofty | daveshah: does anything actually consume BLIF from synth_ecp5? | 13:31 |
daveshah | Nope | 13:31 |
daveshah | If someone hypothetically did a vpr flow then it would be needed | 13:32 |
Lofty | Hmm. | 13:32 |
Lofty | BLIF on iCE40 was for arachne-pnr, right? | 13:32 |
daveshah | Yes | 13:33 |
whitequark | does arachne even still work? | 13:33 |
whitequark | weren't there some primitive changes, like LUT order or something? | 13:34 |
*** kgugala_ has quit IRC | 13:36 | |
Lofty | Likewise, what actually uses EDIF on iCE40/ECP5? Lattice's toolchain? | 13:36 |
*** kgugala has joined #yosys | 13:36 | |
daveshah | No idea about arachne, but the lack of constraints make me think it still works | 13:54 |
daveshah | I don't think the LUT order change affects the final netlist | 13:54 |
daveshah | The ice40 tools could take EDIF in theory but it crashed on Yosys' output, idk about ECP5 | 13:55 |
* whitequark shudders at EDIF | 14:04 | |
whitequark | the ATF15xx tools are extremely picky about EDIF in a bad way | 14:04 |
daveshah | Almost everything is tbh | 14:05 |
mwk | as far as I'm aware, yosys write_edif is really "write EDIF that ISE/Vivado can read" and isn't actively used with anything else | 14:24 |
whitequark | then let's drop it on non-xilinx? | 14:26 |
mwk | you mean the `-edif` option? | 14:28 |
whitequark | yeah | 14:30 |
mwk | yeah, I mean, if it really doesn't work and/or has better alternatives | 14:32 |
mwk | I have no idea what's the state of a lot of targets in yosys tbh | 14:32 |
whitequark | should we have like... a doc section about them? | 14:33 |
mwk | for all targets but xilinx and sf2 (whatever that is), the `-edif` option is no different from `yosys -o <file>.edif` | 14:33 |
mwk | while xilinx and sf2 pass some extra options | 14:33 |
whitequark | oh yeah what's the point in synth_ice40 -json anyway | 14:33 |
mwk | that's a bit annoying btw, and perhaps worth rethinking | 14:34 |
mwk | like | 14:34 |
mwk | -json option is definitely redundant for every target, since we don't ever want to have target-specific options here | 14:35 |
mwk | at the same time, this is not true for -edif, with all its variants | 14:35 |
mwk | maybe 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 |
Lofty | Scratchpad? Scratchpad. | 14:36 |
FL4SHK | whitequark: is it crazy if my custom HDL's compiler has a handwritten parser? | 14:37 |
Lofty | Like, synth_intel_alm behaves differently between default mode and -vqm. | 14:37 |
mwk | I mean, it's magicky | 14:37 |
Lofty | FL4SHK: why would it? | 14:37 |
Lofty | *why would it be | 14:37 |
mwk | and I don't particularly like it | 14:37 |
whitequark | FL4SHK: not really? i write a lot of parsers by hand, fsvo "by hand" | 14:37 |
mwk | but then, I'm also annoyed by having both `-o x.json` and `synth_whatever -json x.json` | 14:37 |
Lofty | Honestly, I *could* make -quartus the default, but I like synthesis printing the more detailed stats about what it's doing | 14:38 |
Lofty | Which is information that kinda gets lost if you use the vendor primitives directly. | 14:39 |
*** SpaceCoaster has quit IRC | 14:44 | |
*** emeb_mac has joined #yosys | 15:05 | |
FL4SHK | I see | 15:13 |
FL4SHK | I've been writing this parser with a framework I've developed myself | 15:29 |
FL4SHK | also working, as a side project, on SNES Binutils | 15:30 |
FL4SHK | followed by a SNES GCC backend | 15:30 |
Lofty | https://github.com/ZirconiumX/yosys-cookbook <-- can people take a look at this? | 15:31 |
tpb | Title: GitHub - ZirconiumX/yosys-cookbook: User-friendly explanation of Yosys options (at github.com) | 15:31 |
*** kgugala has quit IRC | 15:33 | |
*** kgugala has joined #yosys | 15:33 | |
whitequark | nice | 15:35 |
whitequark | nit: I don't like the use of "bloat" very much as people have a strong negative connotation to it | 15:35 |
whitequark | but if you're using -nocarry you probably know what you are doing | 15:36 |
whitequark | also, the increase in size from -nocarry is a lot smaller than from -nobram | 15:36 |
FL4SHK | I heard that yosys struggles with inferring block RAM | 15:36 |
FL4SHK | I also heard that Lattice is out | 15:36 |
*** develonepi3 has joined #yosys | 15:36 | |
Lofty | The latter is out of date | 15:37 |
whitequark | yeah, they fully backtracked | 15:37 |
Lofty | They retracted the clause that forbids bitstream RE | 15:37 |
FL4SHK | Oh neat | 15:37 |
FL4SHK | so yosys does indeed struggle with inferring block RAM? | 15:37 |
whitequark | regarding yosys and BRAM, I wouldn't say it struggles exactly | 15:37 |
FL4SHK | I see | 15:37 |
Lofty | As for the former; kinda - Yosys struggles with inferring true dual port RAMs, and with multiple write ports | 15:37 |
whitequark | IME all toolchains have some difficulty with inferring RAM in Verilog | 15:37 |
whitequark | (because the entire idea is flawed) | 15:38 |
FL4SHK | The idea is flawed? | 15:38 |
whitequark | yeah | 15:38 |
FL4SHK | I've done it in SV a number of times. | 15:38 |
whitequark | you 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 mean | 15:38 |
Lofty | You have to describe how a RAM is made, and the tool has to guess what you're actually looking for | 15:38 |
whitequark | this is stupid. you should just request a specific kind of RAM | 15:38 |
FL4SHK | makes your code non-portable | 15:38 |
whitequark | (well, sometimes undocumented, sometimes it is) | 15:38 |
whitequark | it only does because Verilog doesn't offer a standard way to do it | 15:39 |
FL4SHK | That is fair | 15:39 |
Lofty | Or VHDL | 15:39 |
FL4SHK | VHDL seems to, kind of | 15:39 |
FL4SHK | shared stuff | 15:39 |
whitequark | there's no reason it couldn't other than Verilog being unsuitable for synthesis of synchronous logic | 15:39 |
whitequark | or "not well suited" would be a less inflammatory way to put it | 15:39 |
FL4SHK | I haven't really had it fail on me? | 15:40 |
FL4SHK | I do like that VHDL doesn't have undefined semantics | 15:40 |
whitequark | Xilinx has a few serious footguns | 15:40 |
FL4SHK | I honestly might switch to defining my HDL in terms of VHDL | 15:41 |
FL4SHK | Or at least I'd do so if I could do formal verification in VHDL... | 15:41 |
whitequark | the worst one is when you describe a RAM with an async output but it infers a transparent synchronous output | 15:41 |
develonepi3 | jmamish: Are you on this board, now? ZipCPU said you were interest in jpeg. | 15:41 |
whitequark | because it finds a register somewhere else in the design | 15:41 |
whitequark | and the pattern it looks for happens to match, even though it is not your intent | 15:41 |
whitequark | what do you mean by VHDL not having undefined semantics? | 15:42 |
FL4SHK | well, maybe I remembered wrongly | 15:42 |
whitequark | are you perhaps referring to simulation determinism? | 15:42 |
FL4SHK | yes | 15:42 |
whitequark | VHDL's simulator is awesome and IMO the single best thing that came out of Verilog and VHDL together | 15:42 |
whitequark | but... it doesn't help synthesis much | 15:42 |
whitequark | consider that most toolchains don't differentiate VHDL and Verilog past the frontend | 15:43 |
FL4SHK | That is true | 15:43 |
FL4SHK | I honestly really want to have my own HDL done | 15:43 |
FL4SHK | I want to use that language. | 15:43 |
FL4SHK | It's difficult | 15:43 |
FL4SHK | I shrunk the language, even | 15:43 |
Lofty | FIRRTL :P | 15:43 |
FL4SHK | I still have to do all the lowering | 15:44 |
Lofty | You can tell something is a good idea when none of the proprietary tools support it | 15:44 |
whitequark | like what? | 15:45 |
Lofty | Portable memory instantiation for example :P | 15:46 |
Lofty | Also, I fixed your nit, wq | 15:46 |
Lofty | And also posted about it on Twitter | 15:46 |
Lofty | *about my cookbook on Twitter | 15:47 |
whitequark | oh, yeah | 16:14 |
*** GenTooMan has quit IRC | 16:17 | |
*** dys has quit IRC | 16:51 | |
*** GenTooMan has joined #yosys | 16:55 | |
*** kraiskil has joined #yosys | 17:02 | |
*** kraiskil has quit IRC | 17:25 | |
*** strongsaxophone has joined #yosys | 17:42 | |
*** kraiskil has joined #yosys | 17:42 | |
*** mirage335 has quit IRC | 17:55 | |
*** mirage335 has joined #yosys | 18:00 | |
*** dys has joined #yosys | 18:11 | |
*** strongsaxophone has quit IRC | 18:22 | |
*** FFY00 has quit IRC | 18:27 | |
*** FFY00 has joined #yosys | 18:27 | |
*** Laksen has joined #yosys | 18:36 | |
*** oldtopman has quit IRC | 18:47 | |
*** oldtopman has joined #yosys | 18:50 | |
*** Cerpin has quit IRC | 19:17 | |
*** Laksen has quit IRC | 19:31 | |
*** Cerpin has joined #yosys | 19:33 | |
*** kraiskil has quit IRC | 20:04 | |
*** kraiskil has joined #yosys | 20:17 | |
*** smkz has quit IRC | 20:40 | |
*** smkz has joined #yosys | 20:41 | |
*** smkz has quit IRC | 20:41 | |
*** smkz has joined #yosys | 20:43 | |
*** craigo has joined #yosys | 21:39 | |
*** kraiskil has quit IRC | 21:54 | |
*** Asuu has joined #yosys | 21:59 | |
*** Asu has quit IRC | 21:59 | |
*** Cerpin has quit IRC | 22:23 | |
*** Cerpin has joined #yosys | 22:43 | |
*** craigo has quit IRC | 22:49 | |
*** oldtopman has quit IRC | 22:51 | |
*** oldtopman has joined #yosys | 23:02 | |
*** X-Scale` has joined #yosys | 23:05 | |
*** X-Scale has quit IRC | 23:06 | |
*** X-Scale` is now known as X-Scale | 23:06 | |
*** Cerpin has quit IRC | 23:47 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!