Dream Source Labs… so you thought Saleae sucked

When you untar the archive and everything’s marked executable, you know you’re in for a hard time. There is nothing easy or convenient about this thing.

Having said that it does work with Sigrok and Sigrok knows a lot of protocols. PulseView (the GUI front end to Sigrok) is okay but for heavy lifting you probably want sigrok-cli.

I just found it difficult to put the firmware (gateware for the FPGA) in the correct place–why don’t these things (Saleae’s the same way) just store the FPGA gateware in flash? Lastly, there are some things I like better about the Saleae’s software.

What, Lattice Diamond has Synopsys?

Uh… yes please.

Okay here’s how to get Synopsys working on Ubuntu. Lattice Diamond (and I suspect Synopsys too), officially, only runs on Red Hat. See my earlier post to work around that. Now most things seem to work for meperhaps I’m being generous; Diamond, like most (all?) IDEs is a POS. Whilst pulling my hair out screwing around with LSE I stumbled across a Lattice tutorial explaining how make sure your using LSEand becoming indoctrinated in Lattice’s worldbut, wait, that would imply one has a choice of Synthesis tools. Hmmm, what’s this reference to SynplifyPro? A quick search later and oh that’s Synopsys, an industry standard, the next best thing to an open source Logic Synthesizer! Oh hell yeah, I’ll be using this! …and then it failed.

synplify pro: 137: [: unexpected operator bash sh redhat ubuntu

…and a few more similar errors. The problem is that Diamond actually runs Synplify via scripts. When a script begins with !#/bin/sh RHEL, through the magic of soft links, actually uses bash whilst Ubuntu uses dash. That’s a problem and here’s the fix…

root@xps13:~# cd /usr/local/diamond/3.10_x64/synpbase

root@xps13:/usr/local/diamond/3.10_x64/synpbase# for file in grep -lRsI "/bin/sh" *; do sed -i -e 's/#!\/bin\/sh/#!\/bin\/bash/g' $file; done

This will find all the files that contain “#!/bin/sh” and change them to “#!/bin/bash” and voilà! Now I’m not stuck learning Lattices’ proprietary crapI’ll take Synopsys’s proprietary crap over lattices’ any day 🙂