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 me—perhaps 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 LSE—and becoming indoctrinated in Lattice’s world—but, 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.
1 |
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…
1 |
root@xps13:~# cd /usr/local/diamond/3.10_x64/synpbase<br><br>root@xps13:/usr/local/diamond/3.10_x64/synpbase# for file in <code>grep -lRsI "/bin/sh" *</code>; 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 crap—I’ll take Synopsys’s proprietary crap over lattices’ any day 🙂