LLHD Project - Universal Hardware Description Language

Just the other day, a very interesting article by Swiss researchers was published on arXiv , which presents the details of the LLHD project . This is a project to create a multi-level intermediate representation for hardware description languages, inheriting the ideology and principles of the LLVM project .


In simple words, this is a new language for describing the hardware, devoid of the shortcomings of its predecessors and now demonstrating decent performance, flexibility and compatibility with the existing infrastructure. The nice thing is that the code for the main tools is written in Rust .


Proposed hierarchy of tools (hereinafter images from the original article)


The project has every chance to become what GCC and LLVM once became for the open software world. It’s hard to imagine how much this can make a difference around iron mining.


Under the cutter is a description of the current state of affairs, a brief overview of the language and the differences of the new approach.


Introduction


, NDA, . , , : HDL , , (bitstream), . Lattice iCE40 ( iCE Storm), ECP5 ( Trellis) , , Xilinx 7 ( X-Ray).


, - . , : Verilog VHDL. , , . , - : , . , Chisel, Verilog VHDL. , , Verilog, .




. , Verilog VHDL —  . . .


, , , — .


HTML, , .


, ( ) , , , , .


, , — , — . , , , , «».



(Intermediate Representation, IR) . , LLVM GCC LLVM IR GIMPLE. CPS. JVM IR. .


IR , .


, , , :


image

: (behavioral), (structural) (netlist):


  • , . , - .
  • , . , (. ).
  • . , , , .

, IR . LLHD . LLHD , , . LLHD .


LLVM LLHD


LLVM — , — IR LLVM. , , . LLVM . ++ Siberia JIT VM Smalltalk.


, IR . LLVM . , LLVM IR : , «» , , , .. , IR , « » , LLVM .


SSA .. , , . .


IR LLVM . IR . , , :



LLHD IR LLVM, , . , .


LLHD IR .


IR , LLVM JIT- IR .


, . .


IR LLHD


HDL LLHD : , .


0 0 1 . . , SSA. , . .


, , . , . , . 0 . . , , . , , . , .


. , . .


IR LLHD. , :



acc ( clk, 32- x en) 32- (q). d q, , . zero.



acc_ff clk. prb ; wait ( - ) ; neq and " " " "; br ; drv .



acc_comb q, x en. , , (add) qp xp.


. , . , :



LLHD


  • : (CF), (DCE) peephole (IS)
  • «» (ECM)
  • (TCM)
  • phi (TCFE)

IR :



, . .



LLHD, JIT- LLHD HDL . HDL , , LLHD Moore.



, --. JIT- LLHD 2.4 , , RISC-V .


, Moore. . , LLHD RISC-V.



, , , . , SystemVerilog, JIT- LLHD, .


:


  • LLHD
  • IR LLHD , ,
  • , HDL
  • -
  • ,

, , . , , , .


, Rust , , LLVM . , LLHD.


All Articles