Verilog Is Weird
Oh boy, this is a sore subject for me.<p>It&#x27;s pretty obvious that Verilog and VHDL, modeled after C and Ada respectively, both imperative languages, follow a drastically mismatched paradigm for hardware design, where circuits are combined and &quot;everything happens in parallel&quot;. It becomes even more obvious when you have tried a functional alternative, for example Clash (which is essentially a Haskell subset that compiles to Verilog&#x2F;VHDL: <a href="https:&#x2F;&#x2F;clash-lang.org" rel="nofollow">https:&#x2F;&#x2F;clash-lang.org</a>).<p>The problem is, it is hard, if not downright impossible, to get the industry to change. I have heard many times, in close to literally these words: &quot;Why would I use any language that is not the industry standard&quot;. And that&#x27;s a valid point given the current world. But even for people that are interested, it might just be hard to switch to something like Clash and not give up pretty quickly.<p>Unlike imperative languages, functional languages with a rich modern type system like Haskell are <i>hard</i> to wrap your head around. It&#x27;s no news that Haskell can be very hard to get into for even experienced <i>software</i> engineers. In 2005, after already having more than a decade of programming experience in C, C++, Java, various Assemblers, python (obviously not all of these for the same time) and many other languages, I thought any new language would mostly be &quot;picking up new syntax&quot; at that point. Yet Haskell proved me very wrong on that, so much that it was almost like re-learning programming. The reward is immense, but you have to really want to learn it.<p>And to my surprise at the time, when I got heavily into FPGAs, the advantage proved to be even stronger when building sequential logic, because that paradigm just fits so much better. My Clash code is much smaller, but also much more readable and easier to understand than Verilog&#x2F;VHDL code. And it&#x27;s made up of reusable components, e.g. my AXI4 interfacing is not bespoke individual lines interspersed throughout the entire rest of the code. That&#x27;s mainly because functional languages allow for abstraction that Verilog&#x2F;VHDL don&#x27;t, where often the only recourse is very awkward &quot;generated&quot; code (so much so that there is an actual &quot;generate&quot; statement that is an important part of Verilog, for example).<p>So by now, I have fully switched to using Clash for my projects, and only use Verilog and VHDL for simple glue logic (where the logic is trivial and the extra compilation step in the Verilog&#x2F;VHDL-centric IDE would be awkward) or for modifying existing logic. But try to get Hardware Engineers who probably don&#x27;t have any interest in learning a functional programming language to approach such an entirely different paradigm with an open mind. I&#x27;ve gotten so many bogus replies that just show that the engineer has no idea what higher order functional programming with advanced type system is on any level, and I don&#x27;t blame them, but this makes discussions extremely tiring.<p>So that basically leaves the intersection of people that are both enthusiastic software engineers with an affection for e.g. Haskell, and also enthusiastic in building hardware. But outside of my own projects, it just leaves me longing for the world that <i>could</i> exist.