Rendered at 05:31:35 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
spacedcowboy 14 hours ago [-]
This is really cool :)
One of the things I want to do with xc (https://compile-xc.org) is allow an FPGA worker to be written without writing any verilog etc.
xc already figures out how to data-parallelise an application automatically, and it copes with parcelling out the work to CPU cores and GPUs (even networked GPUs). There's not too much difference in writing a kernel for a GPGPU and writing the verilog that pipelines a loop or loop of loops in verilog. The same constraints are used to figure out what the best target-workers are for any given data-parallel task, and (at least at the start), I'll target the SoC (eg: Ultrascale Zynq) type of FPGA for easy first-stage integration.
It's really encouraging to see other people with the same sort of idea :)
simontlbt 6 hours ago [-]
It’s not exactly the same thing but I talked to my friend yesterday about how I’ve started using a lot of custom dsl in the work I do because it allows me keep a better grasp of the codebase while letting Claude handle the technicalities. Such dsl have become cheap to make and maintain. I also use elixir, it’s a good language to make such things
simedw 12 hours ago [-]
This reminds me of Lava, an old Haskell eDSL that used combinators to describe hardware circuits, which could then be compiled down to RTL. Not sure what happened to that project in the end.
Satnam Singh. I don't think Lava progressed any further. He gave a talk on circuit design in Haskell a couple of years ago.
parthdesai 13 hours ago [-]
Sometimes i feel like i'm an okay programmer, and then I see stuff like this, and reality sinks in again. This is so cool!
pluralmonad 12 hours ago [-]
Wow, I remember seeing a talk about this at ElixirConf, many years ago. Awesome someone is still working on it.
brightball 10 hours ago [-]
Yea...I feel like it was a closing speaker who worked on XBox talking about it heavily?
phendrenad2 15 hours ago [-]
Any sufficiently advanced language will eventually get a HLS synthesis DSL.
itsthecourier 15 hours ago [-]
i don't doubt it does, it's just that there is a huge gap between procedural programming and hardware. when you start doing fpga with Verilog, you realize you can do lots of stuff in parallel and you start optimizing for the medium. it's a totally different way of coding.
my point being, it's better to use a hardware language oriented towards the details of silicon, instead haggling with a high level one
unless this is some kind of promise around: take your elixir code and build an accelerator for that part you burn so much cpu time in
i'm very bad at hardware programming, hope somebody else may comment on this
LarsKrimi 12 hours ago [-]
If you have infinite time, a HDL will likely produce better results than a HLS system.
The idea of HLS is that you get decoupled from the hardware and can concentrate on high-level types and the algorithm design instead. A good HLS compiler will be able to make a near optimal mapping of that for pipelines, for example using SAT solving.
In DSP algorithms things like rounding and saturation is absolutely terrible to write in HDLs if you want to do it with sufficient clock speeds. With untimed HLS it's a breeze.
In short it's a tradeoff, the right tool for the right job. If you need accurate timing or absolutely want a specific structure or to take advantage of FPGA primitives, sure an HDL is probably the right choice.
If you need it quickly, with high performance and free of bugs go with your favorite (and preferably homemade :)) HLS
bglusman 14 hours ago [-]
to be fair, Elixir/BEAM is REALLY good at parallel programming... no idea if or how this library leverages that capability, but its possible it does or can in the future?
toast0 11 hours ago [-]
BEAM languages are setup for independent concurrent processes, and the BEAM runs concurrent processes in parallel.
Typically, parallelism in hardware is more about doing the steps of one procees in parallel or performing the same operation on multiple sets of data in parallel.
imtringued 11 hours ago [-]
You know, the fact that HDLs don't have type parameters/generics is kind of holding them back. Not sure about type constructors (confusingly named higher kinded types), but at least for HDLs I'm thinking that more compile time parameterization is better, because you cannot have things like lambdas.
Edit: Rust has GATs. Supposedly they cover the same use cases.
Bluebirt 15 hours ago [-]
Congrats, you designed the 50th high level language nobody cares about!
janderland 14 hours ago [-]
Some of us definitely “care” about this. It’s HackerNews! I’m here in part for weird, interesting, or silly projects.
padf 9 hours ago [-]
I think that it is a language to care a lot. In Elixir (Erlang/BEAM under the hood) you build a system from independent processes that communicate through message passing. As long as the behaviour of a process does not change, using Elixir HLS is a way of doing embedded SW/HW partitioning in "one language".
You first build your system using Elixir, find the critical processes, and after migrate those to HW (FPGAs)using Elixir HLS.
One of the things I want to do with xc (https://compile-xc.org) is allow an FPGA worker to be written without writing any verilog etc.
xc already figures out how to data-parallelise an application automatically, and it copes with parcelling out the work to CPU cores and GPUs (even networked GPUs). There's not too much difference in writing a kernel for a GPGPU and writing the verilog that pipelines a loop or loop of loops in verilog. The same constraints are used to figure out what the best target-workers are for any given data-parallel task, and (at least at the start), I'll target the SoC (eg: Ultrascale Zynq) type of FPGA for easy first-stage integration.
It's really encouraging to see other people with the same sort of idea :)
my point being, it's better to use a hardware language oriented towards the details of silicon, instead haggling with a high level one
unless this is some kind of promise around: take your elixir code and build an accelerator for that part you burn so much cpu time in
i'm very bad at hardware programming, hope somebody else may comment on this
The idea of HLS is that you get decoupled from the hardware and can concentrate on high-level types and the algorithm design instead. A good HLS compiler will be able to make a near optimal mapping of that for pipelines, for example using SAT solving.
In DSP algorithms things like rounding and saturation is absolutely terrible to write in HDLs if you want to do it with sufficient clock speeds. With untimed HLS it's a breeze.
In short it's a tradeoff, the right tool for the right job. If you need accurate timing or absolutely want a specific structure or to take advantage of FPGA primitives, sure an HDL is probably the right choice. If you need it quickly, with high performance and free of bugs go with your favorite (and preferably homemade :)) HLS
Typically, parallelism in hardware is more about doing the steps of one procees in parallel or performing the same operation on multiple sets of data in parallel.
Edit: Rust has GATs. Supposedly they cover the same use cases.
You first build your system using Elixir, find the critical processes, and after migrate those to HW (FPGAs)using Elixir HLS.
Very interesting!