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.
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 🙂
root@xps13:~# dpkg -i diamond-3-10-base-x64_3.10-112_amd64.deb <br>Selecting previously unselected package diamond-3-10-base-x64.<br>(Reading database … 232711 files and directories currently installed.)<br>Preparing to unpack diamond-3-10-base-x64_3.10-112_amd64.deb …<br>Checking configuration of machine xps13…<br>Installing Diamond 3.10 Base…<br>Unpacking diamond-3-10-base-x64 (3.10-112) …<br>Setting up diamond-3-10-base-x64 (3.10-112) …<br>Extracting compressed data files…<br>
Use alien to convert the service pack(s) to Debian Packages, if you see things like “bad interpreter” then you may need to install things like csh, here is an example below:
1
alien--scripts diamond_3_10-sp3_x64-144-3-x86_64-linux.rpm<br>diamond-3-10-sp3-x64_3.10-145_amd64.debgenerated<br><br>root@xps13:~# dpkg -i diamond-3-10-sp3-x64_3.10-145_amd64.deb<br>Selecting previously unselected package diamond-3-10-sp3-x64.<br>(Reading database … 239294 files and directories currently installed.)<br>Preparing to unpack diamond-3-10-sp3-x64_3.10-145_amd64.deb …<br>Installing Diamond 3.10 SP 3…<br>Unpacking diamond-3-10-sp3-x64 (3.10-145) …<br>Setting up diamond-3-10-sp3-x64 (3.10-145) …<br>/var/lib/dpkg/info/diamond-3-10-sp3-x64.postinst: /usr/local/diamond/3.10_x64/sp/cp_pack: /bin/csh: bad interpreter: No such file or directory<br>Processing triggers for libc-bin (2.27-3ubuntu1) …
fail. …so install csh and try again:
1
root@xps13:~# apt install csh<br>Reading package lists… Done<br>Building dependency tree <br>Reading state information… Done<br>The following NEW packages will be installed:<br>csh<br>0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.<br>Need to get 243 kB of archives.<br>After this operation, 358 kB of additional disk space will be used.<br>Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 csh amd64 20110502-3 [243 kB]<br>Fetched 243 kB in 1s (405 kB/s)<br>Selecting previously unselected package csh.<br>(Reading database … 248012 files and directories currently installed.)<br>Preparing to unpack …/csh_20110502-3_amd64.deb …<br>Unpacking csh (20110502-3) …<br>Processing triggers for man-db (2.8.3-2ubuntu0.1) …<br>Setting up csh (20110502-3) …<br>update-alternatives: using /bin/bsd-csh to provide /bin/csh (csh) in auto mode<br><br><br>root@xps13:~# dpkg -i diamond-3-10-sp3-x64_3.10-145_amd64.deb <br>(Reading database … 248021 files and directories currently installed.)<br>Preparing to unpack diamond-3-10-sp3-x64_3.10-145_amd64.deb …<br>Uninstalling Diamond 3.10 SP 3…<br>Installing Diamond 3.10 SP 3…<br>Unpacking diamond-3-10-sp3-x64 (3.10-145) over (3.10-145) …<br>Setting up diamond-3-10-sp3-x64 (3.10-145) …<br>Processing triggers for libc-bin (2.27-3ubuntu1) …
That did it for me, look in /usr/local/diamond. Enjoy! Personally I hate IDEs so I tend to use vi for all but trivial editing sessions but it works.
Well, I loaded the Windoze version in to a VM. This was instructive in that Diamond looks almost as bad in Tonka Toy 10 as it does on Linux. So I kept poking at the app and finally found the very unintuitive way to get it to compile. I then poked at the programmer for about an hour and got it to do something other than throw meaningless and useless errors referencing Windows–I got it to flash the MachXOLF Starter Kit. Er… success…? Okay, yeah it works.
Hey Lattice, have you noticed a surge in sales of the ICE40 line?! Ya know the line that the open source community has reversed the bitstream of. People can use IceStorm (really I mean icestorm, arachne, yosys et al) on those FPGAs. Now, I have no doubt that Synopsys, BoolDozer, Cadence etc. have better tools but several thousand per seat is a big barrier to entry. For many of us we hate IDE’s. We are perfectly happy with say vi, or Emacs, or whatever text editor, and a make file. So for most of your product line I have to choose between your crappy IDE or something I can’t afford. But for the ICE40 line I have an additional choice. Here’s a suggestion: How about you concentrate your limited resources on making better FPGAs and leave the development tools and weird lawyer enriching contractual crap behind. Or just keep doing what your doing (and wasting resources), we’ll eventually reverse the rest of your product line and if your still in business (and not part of “communist” China) you’ll be forced to evolve anyway. Hmm Latice, maybe you could lead Xylinx and Altera for once.
I have spent about a day trying to coax Lattice Diamond in to programming a Mach OX3. Maybe the Windows version is useable but really Windows, no thanks I’m working here. The upshot is this: if you need anything outside the ice40 series–for which there are open source tools that one can find by searching IceStorm–then it’s time to move on to Xilinx or Altera. Quartus uses a version of Synopsys and, more to the point, it is usable.
Ordered this from Taiwan to follow Bruce Land’s ECE5760 FPGA course.
Altera FPGAs are being integrated into newer servers. For now they are accessed via a PCIe lane, I’m wagering they move closer to the CPU and eventually wind up on die.