top | item 24354238

(no title)

jashmenn | 5 years ago

I've been programming for 20 years and yet I have no idea what this does. Can someone ELI5?

discuss

order

jevogel|5 years ago

As far as I can tell, it is a high-level synthesis tool for developing FPGA/ASIC applications. You write your circuit functions in a Rust-like DSL and it generates optimized Verilog/System Verilog code, which can then be synthesized into hardware. But you can also take the output of the DSL and simulate it first, which presumably is quicker than simulating Verilog.

tlack|5 years ago

You feed in Rust (a flavor called DSLX) or C++ and it generates code for your FPGA (in Verilog). You then upload this compiled "bitstream" to your FPGA and now you have something akin to a custom microprocessor, but running just your program.

est31|5 years ago

It looks really quite similar to Rust: https://github.com/google/xls/blob/main/xls/examples/dslx_in...

Note that there are differences though: Seems no type inferrence, for .. in, different array syntax, match arms delimitered by ";" instead of ",".

But it has a lot of the cool stuff from Rust: pattern matching, expression orientedness (let ... = match { ... }), etc.

Also other syntax is similar: fn foo() -> Type syntax, although something similar to that can be achieved in C++ as well.

cokernel_hacker|5 years ago

It is a project aimed at making the design of electronic logical easier.

Often, such hardware is written using hardware description languages [1] like Verilog or VHDL. These languages are very low level and, in the opinion of some, a little clumsy to use.

XLS aims to provide a system for High-level synthesis [2]. The benefit of such systems is that you can more easily map interesting algorithms to hardware without being super low level.

[1] https://en.wikipedia.org/wiki/Hardware_description_language

[2] https://en.wikipedia.org/wiki/High-level_synthesis

erikerikson|5 years ago

Not like you're 5 and I'm definitely not an expert on this project but here's my best shot...

Most programs are loaded into memory and parts of those programs are moved to registers and are used to load data into other registers. That data is, in turn, sent to logic units like adders that add two registers together or comparators that compare to register's values. The generality comes at a cost in terms of power and time but offers flexibility in return.

That is very different from something like a light switch where you flip the switch and the result continuously reflects that input within the limits of the speed of light.

If you are willing to sacrifice flexibility, translating your code into hardware gives you a device that runs the same processing on its inputs continuously at the speed of light subject to your information processing constraints (e.g. derivations of the original input still need to be calculated prior to use).

Traditionally, separate languages and greater hardware knowledge requirements made custom circuits less accessible. This project brings more standard, higher level languages into the set of valid specifications for custom electronics.

foota|5 years ago

I think it turns a c-ish language (from the looks, not sure about semantics) into a hardware language like HDL.

zelly|5 years ago

Verilog for codemonkeys

FullyFunctional|5 years ago

That's a complete mischaracterization. The point of any and all HLSes is to raise the level of abstraction so you can be more productive. Even for highly skilled Verilog "monkies", writing in an HLS is a great deal faster and less error prone (assuming comparable mastery of the language) simply because you do not need to deal with a lot of low level details.

The $1M question however how this experience pans out as you try to squeeze out the last bit of timing margin. I don't know, but I'm eager to find out.

ADD: this parallels the situation with CUDA where writing a first working implementation is usually easy, but by the time you have an heavily optimized version ...

nickysielicki|5 years ago

HLS is going to improve, and you can either disregard it and be left behind or you can try to understand where it fits into a design. Your choice.