<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Alternatives to VHDL/Verilog for hardware design</title><link>/technologies/fpga-group/b/blog/posts/alternatives-to-vhdl-verilog-for-hardware-design</link><description>Hardware description languages (HDLs) are a category of programming languages that target digital hardware design. These languages provides special features to design sequential logic( the system evolve over time represented by a clock) or combinatio</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Alternatives to VHDL/Verilog for hardware design</title><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/alternatives-to-vhdl-verilog-for-hardware-design</link><pubDate>Wed, 29 Oct 2014 03:33:58 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a617b14b-dc58-4add-b415-5377d95a6a79</guid><dc:creator>johnbeetem</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I don&amp;#39;t like Verilog or VHDL.&amp;nbsp; Given the choice, I mostly use Verilog since I don&amp;#39;t want to type more than necessary and I have limited storage space for listings.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;My main problem with Verilog and VHDL is that they were designed for &lt;em&gt;simulation&lt;/em&gt;.&amp;nbsp; Synthesis was added as an afterthought.&amp;nbsp; It&amp;#39;s quite difficult for an inexperienced user to know how to write Verilog to get the synthesizer (I mostly use Xilinx&amp;#39;s XST) to create the logic the user wants.&amp;nbsp; XST matches &amp;quot;language templates&amp;quot; to find things like flip-flops, registers, and RAMs.&amp;nbsp; &amp;quot;Language templates&amp;quot; are hidden in ISE&amp;#39;s Edit menu.&amp;nbsp; Many new users don&amp;#39;t know about the templates, and merrily write Verilog or VHDL from textbooks and it simulates fine.&amp;nbsp; Then they try to synthesize and get frustrated.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here&amp;#39;s how I write Verilog: I imagine what hardware I want, and then I write my Verilog to match the template for each piece of hardware.&amp;nbsp; This is basically compiling &lt;em&gt;in reverse&lt;/em&gt;: you imagine the object code, and then write your source code so that the compiler does the right thing.&amp;nbsp; I&amp;#39;m probably better at this than most designers since I&amp;#39;ve written compilers and digital design tools, so it&amp;#39;s easy for me to guess at what Xilinx tools do.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Jonathan makes the comment &amp;quot;these languages can generate sub-optimal, faulty hardware which can be very difficult to debug.&amp;quot;&amp;nbsp; This is quite true.&amp;nbsp; I&amp;#39;m able to create high-quality hardware using &amp;quot;reverse compilation&amp;quot; and fit complex functionality into inexpensive Spartan-3A chips, but if you write Verilog naïvely you are likely to end up with sub-optimal results.&amp;nbsp; This is actually advantageous to FPGA vendors and sales reps, because if your logic is too large and/or too slow, you need to use larger, faster, more expensive FPGAs to complete your design.&amp;nbsp; However, it&amp;#39;s also disadvantageous because it makes people think twice about using FPGAs at all.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The Xilinx tools make it hard to tell what the synthesizer actually generated, so if you made a mistake it&amp;#39;s hard to track down, as Jonathan said.&amp;nbsp; If you&amp;#39;re doing CPLD design, Xilinx lists the Boolean equations implemented by the macro cells.&amp;nbsp; There&amp;#39;s no equivalent for FPGA design.&amp;nbsp; They do provide automatically-generated schematics, but IMO those are only useful for simple designs.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;My favorite commercial FPGA design language was Altera Hardware Description Language (AHDL).&amp;nbsp; It was basically registers and Boolean expressions, without any of this Verilog/VHDL behavioral nonsense.&amp;nbsp; So it was easy to tell AHDL what logic you wanted, and easy to look at the report and see that AHDL actually generated the correct logic.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;My favorite non-commercial FPGA design language is GalaxC for Hardware Design (GCHD), which is part of my 21st Century Co-design (XXICC) project [&lt;a class="jive-link-external-small" href="http://xxicc.org/" rel="nofollow ugc noopener" target="_blank"&gt;link&lt;/a&gt;].&amp;nbsp; GCHD is a work in progress, but you can read about it in &lt;a class="jive-link-wiki-small" href="/technologies/fpga-group/m/files/17204"&gt;The XXICC Anthology rev 0.0k&lt;/a&gt; if you&amp;#39;re interested.&amp;nbsp; You can see some simple working GCHD examples in &lt;a class="jive-link-blog-small" href="/technologies/fpga-group/b/blog/posts/flavia-the-free-logic-array"&gt;Flavia: the Free Logic Array&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;GCHD is an extension of the GalaxC Programming Language [&lt;a class="jive-link-wiki-small" href="/technologies/fpga-group/m/files/17088"&gt;Programming in the GalaxC Language rev 0.0j&lt;/a&gt;], and uses the same compiler for parsing and semantic analysis.&amp;nbsp; The GalaxC compiler calls module post-processing functions to convert GalaxC&amp;#39;s intermediate language PSI (Postfix Stack Interpreter) into executable code for simulation, or logic networks for synthesis.&amp;nbsp; Unlike Verilog and VHDL, GCHD describes the &lt;strong&gt;hardware&lt;/strong&gt; you want rather than the &lt;strong&gt;behavior&lt;/strong&gt; you want.&amp;nbsp; Thus what you write is in a form that is easily synthesized.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19045&amp;AppID=19&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Alternatives to VHDL/Verilog for hardware design</title><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/alternatives-to-vhdl-verilog-for-hardware-design</link><pubDate>Tue, 28 Oct 2014 18:26:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a617b14b-dc58-4add-b415-5377d95a6a79</guid><dc:creator>Former Member</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Nice write-up, but one important clarification.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;You can download a command line (offline) tool of PSHDL&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="https://pshdl.org/releases/" rel="nofollow ugc noopener" target="_blank"&gt;https://pshdl.org/releases/&lt;/a&gt; or &lt;a class="jive-link-external-small" href="http://code.pshdl.org/pshdl.commandline/wiki/Home" rel="nofollow ugc noopener" target="_blank"&gt;http://code.pshdl.org/pshdl.commandline/wiki/Home&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;While the syntax of PSHDL is inspired by C, that&amp;#39;s about it. Its not intended to be compatible to any C code. &lt;span&gt;Personally I think that the most viable HLS candidate is OpenCL as Altera is pursuing it. The code that was produced by people coding for OpenCL was with parallelization in mind, which probably allows the biggest re-use of existing code. The idea to take general C code and turn it into optimized logic is really far down the road. Maybe some-day we don&amp;#39;t &lt;/span&gt;have&lt;span&gt; to care about the costs of FPGA logic (both from a power and economic point of view), that this becomes viable. But so far even the use-cases for any FPGA are rather limited, or in other words: CPUs are becoming so powerful and cheap that it is hard to compete with them.&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19045&amp;AppID=19&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>