Friday, January 18, 2013

Why PSHDL?

The reason I created PSHDL is that I needed a language for programming FPGAs for my Phd. thesis. My thesis is about FPGA architectures, that is, the very low level architecture. So for example a question when designing FPGAs is: how many registers do I need? How much routing resourcesare necessary? What coarse grain hardware elements can help to improve performance?

To answer any of those questions benchmarks are essential. To create those benchmarks, I looked at various languages to check how easy it is to parse them and make sense of them. VHDL and Verilog, failed miserably. One problem in VHDL for example is that it is easier to create a latch by chance than it is to create a properly described register. There are like a million ways to create a register and even more to describe something that looks like a register, but in the one tool is one and in another it is not. But registers are the building block of every piece of hardware. Another problem is the simulation/hardware mismatch that makes it difficult to validate your results. Do I need to mention that VHDL is very hard to parse as well?

After I looked at the options, I decided that it would be a good idea to create my own language. It is not like there aren't a gazillion other languages with varying focuses, but I thought: lets create one that is truly fun to use, with proper IDE support and all that fancy tooling that you're used to when you program something except HDLs. That is why I created my language in XText. From a very sparse language description it not just creates a proper parser, it also creates an AST (abstract syntax tree that represents the input as a tree), but also a quite nice tooling for eclipse.

In the meantime I also created a web interface. The idea is that it allows interested people to take a look at PSHDL without the need to install anything on their computer. After a while I realized that it can be more than just a toy, and this is what I am aiming now for.

No comments:

Post a Comment