160 points · by kristianpaul · 3d ago · 17 comments
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.