
{"id":392,"date":"2019-01-22T16:56:46","date_gmt":"2019-01-22T16:56:46","guid":{"rendered":"http:\/\/timallen.name\/?p=392"},"modified":"2019-02-01T16:14:35","modified_gmt":"2019-02-01T16:14:35","slug":"what-lattice-diamond-has-synopsys","status":"publish","type":"post","link":"https:\/\/timallen.name\/index.php\/2019\/01\/22\/what-lattice-diamond-has-synopsys\/","title":{"rendered":"What, Lattice Diamond has Synopsys?"},"content":{"rendered":"\n<p>Uh&#8230; yes please.<\/p>\n\n\n\n<p>Okay here&#8217;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<em>\u2014<\/em>perhaps I&#8217;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<em>\u2014<\/em>and becoming indoctrinated in Lattice&#8217;s world<em>\u2014<\/em>but, wait, that would imply one has a choice of Synthesis tools. Hmmm, what&#8217;s this reference to SynplifyPro? A quick search later and oh that&#8217;s Synopsys, an industry standard, the next best thing to an open source Logic Synthesizer! Oh hell yeah, I&#8217;ll be using this! &#8230;and then it failed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">synplify pro: 137: [: unexpected operator bash sh redhat ubuntu<\/pre>\n\n\n\n<p>&#8230;and a few more similar errors. The problem is that Diamond actually runs Synplify via scripts. When a script begins with <code>!#\/bin\/sh<\/code>  RHEL, through the magic of soft links, actually uses bash whilst Ubuntu uses dash. That&#8217;s a problem and here&#8217;s the fix&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">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<\/pre>\n\n\n\n<p>This will find all the files that contain &#8220;#!\/bin\/sh&#8221; and change them to &#8220;#!\/bin\/bash&#8221; and voil\u00e0! Now I&#8217;m not stuck learning Lattices&#8217; proprietary crap<em>\u2014<\/em>I&#8217;ll take Synopsys&#8217;s proprietary crap over lattices&#8217; any day \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Uh&#8230; yes please. Okay here&#8217;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\u2014perhaps I&#8217;m being generous; Diamond, like most (all?) IDEs is a POS. Whilst pulling my &hellip; <a href=\"https:\/\/timallen.name\/index.php\/2019\/01\/22\/what-lattice-diamond-has-synopsys\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">What, Lattice Diamond has Synopsys?<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-392","post","type-post","status-publish","format-standard","hentry","category-fpga-verilog-hls"],"_links":{"self":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/comments?post=392"}],"version-history":[{"count":6,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/392\/revisions"}],"predecessor-version":[{"id":401,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/392\/revisions\/401"}],"wp:attachment":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/media?parent=392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/categories?post=392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/tags?post=392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}