News for hackers. Stuff that matters.
Re:Clash: A modern, functional, hardware description language by JoeAltmaier on Thursday May 07, 2020 @12:56PM (#23105197)
Ok, now can we have automatic Clash-to-Linux-dts (Device Tree Source) generation? So we can port Linux to a new board with a click? That would be something. And it might drive adoption of Clash, just for that integration advantage.
Re:Clash: A modern, functional, hardware description language by centimeter on Thursday May 07, 2020 @01:06PM (#23105344)
I think you might be skipping a few layers of abstraction there, but you could have something like a parametric PCIe or I2C core that would autogenerate both the hardware (de)serialization logic and the Linux-side driver logic. If your driver was written in Haskell, you could even use the exact same library on the hardware side and the software side. So let's say you have an FPGA card in a PCIe slot - with a change to a single file, you could change the wire protocol on both the Linux side and the FPGA side.
Re:Clash: A modern, functional, hardware description language by JoeAltmaier on Thursday May 07, 2020 @01:46PM (#23105825)
I think this is just the abstraction needed to generate the device tree. Pinouts, bus address strapping, modes - all are/could be specified in the Clash and emitted thru some template or schema. I guess that's the missing part - the dts schema. But its the closest we've ever got!
Re:Clash: A modern, functional, hardware description language by rowanG077 on Thursday May 07, 2020 @08:56PM (#23110235)
It's wouldn't be too hard to build. Clash types are already required to derive Generic. You could take all those definition and use the Haskell Generic API to generate a device tree.