clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
emeb_mac has joined #yosys
seldridge has joined #yosys
seldridge has quit [Ping timeout: 245 seconds]
proteusguy has quit [Ping timeout: 240 seconds]
proteusguy has joined #yosys
AlexDaniel has quit [Ping timeout: 272 seconds]
gsi_ has joined #yosys
gsi__ has quit [Ping timeout: 250 seconds]
emeb has quit [Quit: Leaving.]
rohitksingh_work has joined #yosys
citypw has joined #yosys
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
SpaceCoaster has joined #yosys
jevinski_ has quit [Read error: Connection reset by peer]
jevinskie has joined #yosys
<keesj> FOSDEM anyone?
jevinski_ has joined #yosys
jevinskie has quit [Ping timeout: 245 seconds]
emeb_mac has quit [Quit: Leaving.]
NPHK has quit [Ping timeout: 240 seconds]
proteusguy has quit [Remote host closed the connection]
dys has quit [Ping timeout: 246 seconds]
proteusguy has joined #yosys
rohitksingh has joined #yosys
rohitksingh has quit [Ping timeout: 244 seconds]
rohitksingh has joined #yosys
TFKyle has quit [Ping timeout: 240 seconds]
goatama has left #yosys ["Leaving"]
TFKyle has joined #yosys
rohitksingh has quit [Ping timeout: 250 seconds]
citypw has quit [Ping timeout: 268 seconds]
rohitksingh has joined #yosys
rohitksingh has quit [Ping timeout: 252 seconds]
rohitksingh_work has quit [Quit: Leaving.]
keesj has quit [Ping timeout: 246 seconds]
fsasm has joined #yosys
rohitksingh_work has joined #yosys
citypw has joined #yosys
sxpert has joined #yosys
rohitksingh has joined #yosys
<sxpert> now that I have tested my module with iverilog, how would I run yosys on it ?
<daveshah> sxpert: You will want to do something like `yosys -p "synth_ice40 -top top -json design.json" design.v`; `nextpnr-ice40 --up5k --json design.json --pcf design.pcf --asc design.asc`; `icepack design.asc design.bin`
<daveshah> changing the name and device type as appropriate
<sxpert> ok
<daveshah> You can see an example of a Makefile for this at https://github.com/cliffordwolf/picorv32/blob/master/picosoc/Makefile#L47-L86
<tpb> Title: picorv32/Makefile at master · cliffordwolf/picorv32 · GitHub (at github.com)
<sxpert> daveshah: how do I tell it to ignore the testbench bits ?
<daveshah> Wrap them in `ifdef SIM
<daveshah> or `ifndef SYNTHESIS
<sxpert> `ifdef SIM seems to work
rohitksingh has quit [Ping timeout: 240 seconds]
<sxpert> hmm, design is too slow
<sxpert> need to add registers in there
<sxpert> good
<sxpert> guess I need to add some clocking ;)
<sxpert> daveshah: thanks, I have things to work on now ;)
leviathanch has joined #yosys
indy has quit [Quit: ZNC - http://znc.sourceforge.net]
rohitksingh_work has quit [Read error: Connection reset by peer]
indy has joined #yosys
<sxpert> daveshah: hmm, can't figure it out...
<sxpert> daveshah: can't get the simulation to show up the clock changing, what am I doing wrong ? https://pastebin.com/7vEvs7kw
<tpb> Title: [VeriLog] module mask_gen ( // ports clk, nibble_width, nibble_start, - Pastebin.com (at pastebin.com)
<daveshah> sxpert: try `clk = (clk === 1'b0);` instead of `clk = !clk`
<daveshah> sorry, `clock = (clock === 1'b0);`
<sxpert> am getting nothing between "run scheduler
<sxpert> and "execute StartOfSim callbacks"
<daveshah> ah, you need to pass -DSIM to Icarus
<sxpert> ah !
<MoeIcenowy> interestingly... tried iCECube2 recently and found that synplify pro is still LUT efficient than Yosys on my design...
<sxpert> daveshah: ah HA !
<daveshah> MoeIcenowy: yes, that's not too surprising, Yosys isn't brilliantly tuned by any means
<daveshah> `-relut` might help synth_ice40 a bit
<MoeIcenowy> (yes it do help a bit
<MoeIcenowy> (BTW the reason why I'm considering this is because I currently only own a too small iCE40
<MoeIcenowy> LP384 ;-)
<MoeIcenowy> daveshah: is the gate->lut process done by ABC?
<daveshah> Yes
<daveshah> whitequark has been looking at alternative options too
<MoeIcenowy> maybe I should give -noabc a try?
<MoeIcenowy> haha even worse
* sxpert is actually targetting ecp5
<daveshah> That will be considerably worse, replacing abc with the new `flowmap` command will be better than that but still probably worse than abc
<sxpert> but that's ok, I think I got the right options
<MoeIcenowy> daveshah: by the way it seems that currently it's still not possible for a Linux distro to provide nextpnr w/ prjtrellis?
<MoeIcenowy> (although I have no ECP5
<zkms> sometimes -relut and/or -abc2 helps, idk
<zkms> at least sometimes i get faster timings with my designs
<daveshah> MoeIcenowy: Arch (AUR) provides it
<MoeIcenowy> haha aur provides everything ;-)
citypw has quit [Read error: Connection timed out]
<sxpert> daveshah: thanks !
citypw has joined #yosys
<daveshah> The `-nomux` isn't needed any more, other than that that example should be up to date
proteusguy has quit [Remote host closed the connection]
<sxpert> daveshah: yay, my module compiles and can be placed in the fpga successfully
<daveshah> sxpert: yay!
<sxpert> now, I have no idea if it works but...
<sxpert> need to build more things first
<sxpert> daveshah: for instance, need to figure out how to build staggered clocks
<daveshah> don't :P
<daveshah> use staggered clock enables instead
<sxpert> hmm
<sxpert> daveshah: have a link ?
<tpb> Title: Controlling Timing within an FPGA (at zipcpu.com)
<sxpert> thanks
proteusguy has joined #yosys
<sxpert> daveshah: small nextpnr question
<sxpert> I can only see white boxes, no traces or anything, is this normal ?
<daveshah> That's a defect in the ecp5 architecture, no-one has added the GUI data for the wires or switchboxes yet
rohitksingh has joined #yosys
<sxpert> daveshah: ah, ok.
<sxpert> will wait ;)
emeb has joined #yosys
<MoeIcenowy> daveshah: BTW any suggestions for an ECP5 board? ;-)
<tpb> Title: LFE5UM5G-85F-EVN Lattice Semiconductor Corporation | Development Boards, Kits, Programmers | DigiKey (at www.digikey.co.uk)
<daveshah> ULX3S is also worth a look, although a bit harder to get hold of right now
<tpb> Title: LFE5UM5G-45F-VERSA-EVN Lattice Semiconductor Corporation | Development Boards, Kits, Programmers | DigiKey (at www.digikey.co.uk)
<sxpert> they just received a batch as we speak, you may be lucky
<MoeIcenowy> oh official EVN... they're usually quite expensive...
<daveshah> the 85F-EVN is very good value
<sxpert> 200€ a piece. not bad
<sxpert> well it's a 45F, but that's the same as 85F...
<MoeIcenowy> for iCE40 I choose to do a UP5K board by myself (currently pending due to Chinese New Year) because all existing boards are too expensive (maybe except UPduino)
<MoeIcenowy> but I heard that UPduino doesn't feature an onboard crystal oscillator
<emeb> It doesn't
<emeb> got one right here
<sxpert> what's it using then ? integrated pll thingie ?
<emeb> on-chip 48MHz RC osc
<sxpert> ah
<emeb> or 10kHz low freq osc if you want
<sxpert> good enough if you're not too timing sensitive
<MoeIcenowy> FleaFPGA seems interesting
<emeb> yep
<emeb> I've done a few personal boards w/ LP4K/UP5K (pin compatible)
<emeb> they're pretty easy to do
<emeb> Don't copy UPduino design tho - there are some problems with the power supply circuitry.
<sxpert> ah
<sxpert> good to know
<emeb> and grounding isn't ideal. It works but it could be a lot better.
<MoeIcenowy> emeb: what problem?
<MoeIcenowy> lack of decoupling capacitor on VCCPLL?
<emeb> MoeIcenowy: That's a big one.
<MoeIcenowy> emeb: I found it's fixed in 2.0
<MoeIcenowy> I currently put a 104 and a 106 for VCCPLL on my board
<emeb> Yep. Plus diode/cap reversed on Vpp ckt
<emeb> didn't put cap on FPGA side of diode.
<MoeIcenowy> emeb: Y?
<emeb> why what? I don't know why upduino did it that way, but it doesn't provide good bypass due to high impedance of diode on half wave of ripple.
<MoeIcenowy> I think the cap should be the FPGA side, not the VCC3V3 side...
<MoeIcenowy> from my (limited) experience cap should be near the chip...
<emeb> Correct
<emeb> but on upduino it's not.
<MoeIcenowy> oh sorry
<MoeIcenowy> I misread your sentence
<MoeIcenowy> you mean "UPduino didn't put cap on FPGA side"
<emeb> yes.
<MoeIcenowy> I read it as "Don't put cap on FPGA side"
<MoeIcenowy> checked... not fixed on UPduino 2.0
<emeb> Sorry for confusion.
<MoeIcenowy> emeb: no sorry
<MoeIcenowy> just my mother tongue is not en
<emeb> I'm sure it's better than my understanding of your language. :)
* emeb speaks toddler-grade german plus some spanish. :P
<MoeIcenowy> at least they're all Indo-European
<emeb> I suspect I'd be useless with anything that didn't use roman alphabet.
<MoeIcenowy> BTW what's VPP_2V5 for?
<MoeIcenowy> programming the NVCM?
<emeb> That would be my guess.
<daveshah> It's also needed for a few other bits and pieces
<MoeIcenowy> (to be honest I do not like any kind of OTP
<daveshah> In particular trimming for the oscillators is read from NVCM at boot
<MoeIcenowy> (I do not like irreversible things
<MoeIcenowy> daveshah: oh
<daveshah> If Vpp_2V5 is bad then the oscillator frequency will be way off
<emeb> Good for saving pennies on high volume stuffs
<emeb> but it would be nice if it could erase
<emeb> daveshah: didn't you figure out that osc can be tuned via the FPGA fabric?
<daveshah> Yes, it can be
rohitksingh has quit [Ping timeout: 240 seconds]
<emeb> would be interesting to make FLL with that.
<emeb> use 1PPS from GPS or something.
rohitksingh has joined #yosys
Cerpin has joined #yosys
<ZipCPU> emeb: Been there, done that, it's not all that hard. Requires a bit of a tracking loop. I used a filter together with a 2nd order loop to track both phase and frequency. It works fairly well.
<ZipCPU> The code to do it is part of my open arty project, at https://github.com/ZipCPU/openarty
<tpb> Title: GitHub - ZipCPU/openarty: An Open Source configuration of the Arty platform (at github.com)
<emeb> ZipCPU: Yes - I've looked at your GPS-disciplined clock project before. IIRC though it's using a fixed external clock and locking a divided down version of that by putting a control loop on the divider ratio. I'm talking about locking the on-chip RC oscillator of the UP5k by controlling the tuning word which is kind of a hidden parameter that Lattice doesn't give you easy access to.
<ZipCPU> Yeah, okay, that's different. That actually takes updated hardware to do.
<ZipCPU> ;)
<ZipCPU> On the other hand, you can use the GPS schooled logic to create a GPS-disciplined oscillator ...
<ZipCPU> (It'll jump a bit every second, as currently built....)
<emeb> It's just a wild idea. I don't know how easy it would be to control that tuning parameter in realtime - just something that jumped into my brain when daveshah: mentioned the tuning param was available.
<emeb> On the other hand - if it is available then it could be used to lock a USB device to the SOH pulse.
<ZipCPU> Ooohh ... I definitely need to read more of the backlog ... logically controlling a tuning parameter based upon GPS input? That would be quite vascinating
<ZipCPU> *fascinating
<emeb> That's how the STM32F042 chip manages to get stable USB operation without an external crystal.
<emeb> That would make it super cheap to put USB onto a UP5K part.
* ZipCPU browses around
seldridge has joined #yosys
<MoeIcenowy> emeb: emmm on UP5K osc can sync to external signal?
<emeb> MoeIcenowy: it's not a normal feature of the oscillator, but daveshah found that there are hidden hooks on the IP core that could be used for that.
<MoeIcenowy> hidden ;-)
<MoeIcenowy> only utilizable with IceStorm? ;-)
<emeb> MoeIcenowy: Probably.
rohitksingh has quit [Ping timeout: 250 seconds]
leviathanch has quit [Remote host closed the connection]
danieljabailey has quit [Ping timeout: 268 seconds]
dys has joined #yosys
<emeb> Trying to build nextpnr on Fedora 28 using instructions at http://www.clifford.at/icestorm/ and cmake -DARCH=ice40 is failing due to not finding Boost::Python
<tpb> Title: Project IceStorm (at www.clifford.at)
<emeb> Any clues on what to do next?
<emeb> I did install all the listed prereqs as defined in the instructions.
m4ssi has quit [Remote host closed the connection]
<emeb> I also installed boost-python3 and boost-python3-devel but cmake is still unhappy
<emeb> oh wait - looks like it's just kicking out warnings now.
<emeb> OK - all happy. Nevermind. :P
<emeb> (might want to add the boost-python3 and boost-python3-devel dependencies to the list on the icestorm page though)
fsasm has quit [Ping timeout: 240 seconds]
<emeb> So, trying out nextpnr on my up5k SDR front-end. It seems to chew through it OK, but the critical ADC input path isn't meeting timing.
<emeb> I see that nextpnr doesn't use a .sdc file to specify clock freq goals but instead has a single freq argument on the cmd line. Is this the only knob available to turn?
<tpb> Title: nextpnr/constraints.md at master · YosysHQ/nextpnr · GitHub (at github.com)
<emeb> daveshah: oh cool - thanks!
tmeissner has joined #yosys
seldridge has quit [Ping timeout: 240 seconds]
<emeb> clock constraints successfully added. unfortunately that didn't improve the final results very much. This is a pretty challenging design though - lots of giant adder trees for a CIC decimator that need to run at 50MHz.
<ZipCPU> Why do you need an adder tree for a CIC decimator?
<ZipCPU> You should be able to build that with just 3 adds as I recall
<ZipCPU> ... for any decimation
<daveshah> You can try adding -relut to Yosys' synth_ice40 command
<daveshah> This can improve QoR for some carry chain structures
<ZipCPU> Sure, you could, but if you are fighting with the hardware on this one then you are designing the CIC wrong
<ZipCPU> CIC's should be simple to implement
<ZipCPU> (Overflow helps)
<tmeissner> Hi everone
<tmeissner> I'm at FOSDEM this eekend
<ZipCPU> Afternoon, tmeissner!
<tmeissner> Anyone also there from this group?
<daveshah> Hey tmeissner, I'll be there too!
<tmeissner> Yeah, I saw that you have a talk in the EDA room :)
<ZipCPU> emeb: Are you at a University at all? Check out frederic harris' book on "multirate signal processing"
<tmeissner> I think I'm in this room to hear some of the talks
<emeb> ZipCPU: I'm not at a uni but I've got a copy of that book
<emeb> ZipCPU: perhaps "tree" was the wrong term - adder chains.
<ZipCPU> No, that's the right term for the wrong implementation
<ZipCPU> You want to use two implementations similar to this one: http://zipcpu.com/dsp/2017/10/16/boxcar.html
<tpb> Title: Implementing the Moving Average (Boxcar) filter (at zipcpu.com)
<ZipCPU> You shouldn't need any adder trees or adder chains at all--CICs are *REALLY* easy to implement
<ZipCPU> If you check out the boxcar.html page on zipcpu.com, check out figure 3 which shows what I'm talking about
<ZipCPU> Instead of needing to add N values together to get the next output, you add the difference of the new value with the old value that falls off the end
<emeb> ZipCPU: yes - nothing fancy about the math in my CIC.
<emeb> But the wordlenghts are large
<ZipCPU> ?? How big?
<emeb> 14-bit inputs, 8 bits growth per stage, 4 stages, so 46 bits on the output of the integrator.
<emeb> I've tried it with truncation and without
<ZipCPU> What happens with truncation?
<emeb> throw away some lsbits between the integrator and comb stages.
<emeb> just to reduce the complexity of the comb stages.
<ZipCPU> Why not cascade the CICs at different rates, to keep the bit widths down?
<ZipCPU> Oh, another question, how fast does this need to operate?
<tpb> Title: iceRadio/cic_dec_3.v at master · emeb/iceRadio · GitHub (at github.com)
<emeb> that's an older one that only uses 10-bit inputs
<emeb> I'm running this one at 50MHz in a UP5k
<emeb> iCEcube has no trouble building it
<emeb> but yosys + nextpnr only hits about 24MHz
<ZipCPU> Which nextpnr? ... as in, how recent?
<daveshah> Does this PR improve anything?
<tpb> Title: WIP: Reworking placer1 by daveshah1 · Pull Request #171 · YosysHQ/nextpnr · GitHub (at github.com)
<ZipCPU> daveshah: Is that on the main branch?
<emeb> ZipCPU: nextpnr built from git this morning.
<daveshah> No, that PR isn't merged yet
<daveshah> That's why I suggested it
<emeb> daveshah: git newb here - what do I need to do to build with that?
seldridge has joined #yosys
<ZipCPU> daveshah: You've gotten good results on the metrics for that, right? Care to share any of those metrics here?
<daveshah> emeb: run
<daveshah> git checkout -b daveshah1-crit_driven_placer master git pull https://github.com/daveshah1/nextpnr.git crit_driven_placer
<tpb> Title: GitHub - daveshah1/nextpnr: nextpnr portable FPGA place and route tool (at github.com)
<daveshah> Sorry, should be a newline between master and git
<emeb> ok
<daveshah> git checkout -b daveshah1-crit_driven_placer master
<daveshah> git pull https://github.com/daveshah1/nextpnr.git crit_driven_placer
<tpb> Title: GitHub - daveshah1/nextpnr: nextpnr portable FPGA place and route tool (at github.com)
<daveshah> Then rebuild
<emeb> on it
<daveshah> I've seen this give results within 5-10% of the Lattice tools
<daveshah> But large adder chains might be a bit of a weak spot atm
<ZipCPU> emeb: Having looked at your code, I take back my initial conclusion(s) ;)
<emeb> ZipCPU: :)
<ZipCPU> You should be able to drop bits before integration tho ... there's no reason why you need to go into there with 10 bits if you don't want 46 bits out
<emeb> ZipCPU: well, in my experience it's good to start with the best dynamic range you can get, and I've got a 14-bit ADC.
<ZipCPU> Yeah ... I can understand that perspective completely
<emeb> I've got a version of this DDC running on a Spartan 6 with 100MHz 14-bit ADC inputs and a hardware AGC on the output of the CIC that gives me a nice bit of dynamic range.
<emeb> but in the UP5k version I just carry 16-bits output and do the AGC in software
<emeb> daveshah: OK - checked out your branch, rebuilt and reran on my design. Didn't make much difference on the timing.
<emeb> I'd be happy to bundle this up as a testcase if you'd like.
<daveshah> That would be great
<daveshah> I think this is probably more of a synthesis than nextpnr issue
<emeb> Could well be
<daveshah> At the moment carry chains prevent a number of logic optimisations from working properly
<daveshah> We are investigating alternative ways of interfacing with abc to improve this
<emeb> sounds hairy
<emeb> daveshah: testcase built - where should I send it?
<daveshah> david@symbioticeda.com
<emeb> sent
<daveshah> Got it, cheers!
<emeb> cool - hope it's helpful.
tmeissner has quit [Quit: Textual IRC Client: www.textualapp.com]
seldridge has quit [Ping timeout: 250 seconds]
q3k is now known as ```q3k```
```q3k``` is now known as `q`3`k`
seldridge has joined #yosys
`q`3`k` is now known as q3k
q3k is now known as ][
][ is now known as [`]
[`] is now known as q3k
seldridge has quit [Ping timeout: 240 seconds]
tpb has quit [Remote host closed the connection]
tpb has joined #yosys