Live data from Hacker News

Filament – A Language for Fearless Hardware Design

filamenthdl.com

31–34 of 34 posts

Re: Filament – A Language for Fearless Hardware Design

#31

Earlier quoted context omitted.

Every time I see one of these pop up, the thought that software engineers are forever trying to avoid knowledge, understanding, and wisdom with another layer of abstraction comes to mind. I’m all in favor of a better HDL. Verizon/SystemVerilog is loaded with completely non-obvious landmines. I’ve been doing this so long I forget they are there, but it’s pretty painful seeing someone new to the language step on them.…

„they“ (someone not working in the field) try to solve a problem (i.e. warts in old and mature languages) that is literally not a problem in the field at all. Then they get pissed at you when you point it out that nobody needs this, like at all. Oh well.

It works the other way around too, hardware getting designed that no sofware person asked for or wants to develop for. Most hardware people are bad at software design, and vice versa, but the differences are necessarily papered over in software, leaving a lot of the theoretical gains on the table.

Re: Filament – A Language for Fearless Hardware Design

#32

My experience with most "neo HDLs" is that they are all code generators which make the tedious part easy and don't really end up touching the hard part. This may be the first HDL I've seen that attempts to move the needle on catching bugs at compile time. (I've worked with several engineers, on hardware bugs which turned out to be pipelining errors, who did not understand what I meant by "make this design error inexp…

We use the python based myhdl extensively and are very successful in writing hdl for fpga that has vanishingly few bugs. The reason why myhdl makes this possible is that testing is relatively trivial, so we use it properly (i.e. everywhere). You're right that it doesn't solve the hard problem, and discipline is needed around things like clocks, but it does enable modern development techniques and when writing RTL, HD…

I am always suspicious about entrenched people claiming that this or that is not the hard part. Maybe that is true, but it can still be tedious or error prone, and this is most obvious to someone who is still bothered by it, whereas the old guard is already numb to it.

Re: Filament – A Language for Fearless Hardware Design

#33
post #5

I never really understand how HDL works. I meant, in software programming, we usually program by either specifying the sequence or dependency. In hardware, nothing runs sequentially, and signals propagate _with delay_. Everything happens at the same time, yet nothing run at the exact same moment. How could we express these chaos in for-loops and procedure look alikes?

The semantics of HDLs are generally kind of funky: they have a sequential interpretation, which us what simulators will use. That interpretation does involve a bunch of blocks which will operate in parallel, but within those blocks it's just a sequential series of operations not unlike aby other programming language. But HDLs generally can express a lot more than what can be automatically synthesised into hardware (this is useful because you often have simulation-only test blocks and harnesses which don't need to exist in hardware).

The way you then write hardware is you define a series of blocks which are in the form "when this clock edge happens, update these variables in this way based on the previous value of variables in scope". It doesn't matter so much how you express this change, so long as the synthesis engine can map any given set of input variables to an output, which it will turn into digital logic. It is why verilog has odd constructs like "assign this value to this variable after the next time step". It's not unlike writing event-driven non-blocking code (without async or green threads).

Note at this point that the HDL written is saying nothing about delays: by running it in simulation, everything will complete in time for the next clock cycle. And the synthesiser will happily produce a circuit which the place and router can't actually make fast enough for the next cycle. That's where two other parts come in: firstly there's timing analysis which takes the low-level results of the place-and-route and basically tries to work out the fastest and slowest a signal can pass from one register output to another register input, and how that compares to the clocks to those registers (usually it'll be the same clock). That is generally what will tell you if what you've written won't work in some situation or another. And secondly, the tool can also take that low-level compiler outout, and give you a kind of "decompiled" version in your HDL, which doesn't bear much resemblance to what you put in but does include all the estimated delays, so you can simulate (much more slowly) what the timings will actually look like.

The upshot of which us that writing an HDL generally involves thinking about what the hardware would look like, writing some code that simulates what that hardware would be doing, running it through a slow build cycle, looking at what hardware was actually generated and working put why it's failing timing, thinking about how to change the hardware and then changing the code to get the sythesis tool to spit out the right version of that. You don't tend to get super high levels of abstraction in a given execution path: more the abstraction is in how you connect those parallel blocks together.

Re: Filament – A Language for Fearless Hardware Design

#34
post #23

Earlier quoted context omitted.

> I know this may be a weird thing for software folks to think about, but writing HDL is a tiny part of digital design. In digital design, if done with discipline, writing the HDL is an almost mechanical process of translating the design. In a design that might take a year, writing the code might be 3 weeks. I say this as an FPGA engineer that started my career in software: This used to be the case in software too. B…

> during design exploration and implementation" Assuming you meant to also include 'verification', then I can agree somewhat. As an ASIC designer, you usually get just one stab at a hardware implementation, there's no 0-day point release. It's got to work so you spend the minimum time typing it in. Then you devote the maximum time to verifying it. I think some of the very poor quality s/w we are all subject to is par…

Not all circuit design is asic. There is a ton of FPGA work. But in general I do agree with you. The move fast and break things ethos is something you shouldn't really import ;).
Post reply on HN