Chisel (programming language)

Last updated
Constructing Hardware in a Scala Embedded Language (Chisel)
Chisel(ProgrammingLanguage)Logo.svg
Paradigms Multi-paradigm: concurrent, functional, imperative, object-oriented
Family Scala
Developer University of California, Berkeley
First appearedJune 2012;11 years ago (2012-06)
Stable release
3.6.0 / April 14, 2023;11 months ago (2023-04-14)
Typing discipline Inferred, static, strong, structural
Scope Lexical (static)
Implementation language Scala
Platform Java virtual machine (JVM)
JavaScript (Scala.js)
LLVM (Scala Native) (experimental)
Website www.chisel-lang.org

Chisel (an acronym for Constructing Hardware in a Scala Embedded Language [1] ) is an open-source hardware description language (HDL) used to describe digital electronics and circuits at the register-transfer level. [2] [3]

Contents

Chisel is based on Scala as a domain-specific language (DSL). Chisel inherits the object-oriented and functional programming aspects of Scala for describing digital hardware. Using Scala as a basis allows describing circuit generators. High quality, free access documentation exists in several languages. [4]

Circuits described in Chisel can be converted to a description in Verilog for synthesis and simulation.

Code examples

A simple example describing an adder circuit and showing the organization of components in Module with input and output ports:

classAddextendsModule{valio=IO(newBundle{vala=Input(UInt(8.W))valb=Input(UInt(8.W))valy=Output(UInt(8.W))})io.y:=io.a+io.b}

A 32-bit register with a reset value of 0:

valreg=RegInit(0.U(32.W))

A multiplexer is part of the Chisel library:

valresult=Mux(sel,a,b)

Use

Although Chisel is not yet a mainstream hardware description language, it has been explored by several companies and institutions. The most prominent use of Chisel is an implementation of the RISC-V instruction set, the open-source Rocket chip. [5] Chisel is mentioned by the Defense Advanced Research Projects Agency (DARPA) as a technology to improve the efficiency of electronic design, where smaller design teams do larger designs. [6] Google has used Chisel to develop a Tensor Processing Unit for edge computing. [7] Some developers prefer Chisel as it requires 5 times lesser code and is much faster to develop than Verilog. [8]

Circuits described in Chisel can be converted to a description in Verilog for synthesis and simulation using a program named FIRRTL. [9] [ better source needed ]

See also

Related Research Articles

<span class="mw-page-title-main">VHDL</span> Hardware description language

VHDL is a hardware description language that can model the behavior and structure of digital systems at multiple levels of abstraction, ranging from the system level down to that of logic gates, for design entry, documentation, and verification purposes. The language was developed for the US military VHSIC program in the 1980s, and has been standardized by the Institute of Electrical and Electronics Engineers (IEEE) as IEEE Std 1076; the latest version of which is IEEE Std 1076-2019. To model analog and mixed-signal systems, an IEEE-standardized HDL based on VHDL called VHDL-AMS has been developed.

Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems. It is most commonly used in the design and verification of digital circuits at the register-transfer level of abstraction. It is also used in the verification of analog circuits and mixed-signal circuits, as well as in the design of genetic circuits. In 2009, the Verilog standard was merged into the SystemVerilog standard, creating IEEE Standard 1800-2009. Since then, Verilog has been officially part of the SystemVerilog language. The current version is IEEE standard 1800-2023.

In computer engineering, a hardware description language (HDL) is a specialized computer language used to describe the structure and behavior of electronic circuits, most commonly to design ASICs and program FPGAs.

OpenRISC is a project to develop a series of open-source hardware based central processing units (CPUs) on established reduced instruction set computer (RISC) principles. It includes an instruction set architecture (ISA) using an open-source license. It is the original flagship project of the OpenCores community.

The IEEE 1164 standard is a technical standard published by the IEEE in 1993. It describes the definitions of logic values to be used in electronic design automation, for the VHDL hardware description language. It was sponsored by the Design Automation Standards Committee of the Institute of Electrical and Electronics Engineers (IEEE). The standardization effort was based on the donation of the Synopsys MVL-9 type declaration.

SystemC is a set of C++ classes and macros which provide an event-driven simulation interface. These facilities enable a designer to simulate concurrent processes, each described using plain C++ syntax. SystemC processes can communicate in a simulated real-time environment, using signals of all the datatypes offered by C++, some additional ones offered by the SystemC library, as well as user defined. In certain respects, SystemC deliberately mimics the hardware description languages VHDL and Verilog, but is more aptly described as a system-level modeling language.

<span class="mw-page-title-main">SystemVerilog</span> Hardware description and hardware verification language

SystemVerilog, standardized as IEEE 1800, is a hardware description and hardware verification language used to model, design, simulate, test and implement electronic systems. SystemVerilog is based on Verilog and some extensions, and since 2008, Verilog is now part of the same IEEE standard. It is commonly used in the semiconductor and electronic design industry as an evolution of Verilog.

V850 is a 32-bit RISC CPU architecture produced by Renesas Electronics for embedded microcontrollers. It was designed by NEC as a replacement for their earlier NEC V60 family, and was introduced shortly before NEC sold their designs to Renesas in the early 1990s. It has continued to be developed by Renesas as of 2018.

Verilog-AMS is a derivative of the Verilog hardware description language that includes Analog and Mixed-Signal extensions (AMS) in order to define the behavior of analog and mixed-signal systems. It extends the event-based simulator loops of Verilog/SystemVerilog/VHDL, by a continuous-time simulator, which solves the differential equations in analog-domain. Both domains are coupled: analog events can trigger digital actions and vice versa.

C to HDL tools convert C language or C-like computer code into a hardware description language (HDL) such as VHDL or Verilog. The converted code can then be synthesized and translated into a hardware device such as a field-programmable gate array. Compared to software, equivalent designs in hardware consume less power and execute faster with lower latency, more parallelism and higher throughput. However, system design and functional verification in a hardware description language can be tedious and time-consuming, so systems engineers often write critical modules in HDL and other modules in a high-level language and synthesize these into HDL through C to HDL or high-level synthesis tools.

Aldec, Inc. is a privately owned electronic design automation company based in Henderson, Nevada that provides software and hardware used in creation and verification of digital designs targeting FPGA and ASIC technologies.

MyHDL is a Python-based hardware description language (HDL).

High-level synthesis (HLS), sometimes referred to as C synthesis, electronic system-level (ESL) synthesis, algorithmic synthesis, or behavioral synthesis, is an automated design process that takes an abstract behavioral specification of a digital system and finds a register-transfer level structure that realizes the given behavior.

LISA is a language to describe the instruction set architecture of a processor. LISA captures the information required to generate software tools and implementation hardware of a given processor.

This page is a comparison of electronic design automation (EDA) software which is used today to design the near totality of electronic devices. Modern electronic devices are too complex to be designed without the help of a computer. Electronic devices may consist of integrated circuits (ICs), printed circuit boards (PCBs), field-programmable gate arrays (FPGAs) or a combination of them. Integrated circuits may consist of a combination of digital and analog circuits. These circuits can contain a combination of transistors, resistors, capacitors or specialized components such as analog neural networks, antennas or fuses.

RISC-V is an open standard instruction set architecture (ISA) based on established reduced instruction set computer (RISC) principles. Unlike most other ISA designs, RISC-V is provided under royalty-free open-source licenses. Many companies are offering or have announced RISC-V hardware; open source operating systems with RISC-V support are available, and the instruction set is supported in several popular software toolchains.

Verilog-to-Routing (VTR) is an open source CAD flow for FPGA devices. VTR's main purpose is to map a given circuit described in Verilog, a Hardware Description Language, on a given FPGA architecture for research and development purposes; the FPGA architecture targeted could be a novel architecture that a researcher wishes to explore, or it could be an existing commercial FPGA whose architecture has been captured in the VTR input format. The VTR project has many contributors, with lead collaborating universities being the University of Toronto, the University of New Brunswick, and the University of California, Berkeley. Additional contributors include Google, The University of Utah, Princeton University, Altera, Intel, Texas Instruments, and MIT Lincoln Lab.

<span class="mw-page-title-main">Krste Asanović</span>

Krste Asanović from the University of California, Berkeley has written and co-authored many academic papers concerning computer architecture. As of 2023, he is chairman of the Board of the RISC-V Foundation.

Open Quantum Assembly Language is a programming language designed for describing quantum circuits and algorithms for execution on quantum computers. It is designed to be an intermediate representation that can be used by higher-level compilers to communicate with quantum hardware, and allows for the description of a wide range of quantum operations, as well as classical feed-forward flow control based on measurement outcomes.

<span class="mw-page-title-main">SHAKTI (microprocessor)</span> Technology project funded by the Government of India

SHAKTI is an open-source initiative by the Reconfigurable Intelligent Systems Engineering (RISE) group at Indian Institute of Technology, Madras to develop the first indigenous Indian industrial-grade processor. The aim of SHAKTI initiative includes building an opensource production-grade processor, complete system on chips (SoCs), development boards and SHAKTI based software platform. The primary focus of the team is architecture research to develop SoCs, which is competitive with commercial offerings in the market concerning area, power and performance. All the source codes for SHAKTI are open-sourced under the Modified BSD License. The project was funded by the Ministry of Electronics and Information Technology (MeITY), Government of India.

References

  1. Bachrach, J.; Vo, H.; Richards, B.; Lee, Y.; Waterman, A.; Avižienis, R.; Wawrzynek, J.; Asanović, K. (June 2012). "Chisel: constructing hardware in a Scala embedded language". Proceedings of the 49th Annual Design Automation Conference (DAC 2012). San Francisco, California, US: Association for Computing Machinery (ACM). pp. 1216–25. doi:10.1145/2228360.2228584. ISBN   978-1-4503-1199-1.
  2. "Chisel". people.eecs.berkeley.edu. California, U.S.: University of California, Berkeley. Archived from the original on 2021-10-16. Retrieved 2020-07-08.
  3. Bachrach, Jonathan (ed.). "Chisel: Accelerating Hardware Design" (PDF). RISC-V . California, U.S.: RISC-V International.
  4. Schoeberl, Martin (August 30, 2019). Digital Design with Chisel (in English, Chinese, Japanese, and Vietnamese) (2nd ed.). Kindle Direct Publishing. ISBN   978-1689336031.
  5. Asanović, Krste; et al. "rocket-chip". GitHub. RISC-V International. Retrieved 11 November 2016.
  6. Moore, Samuel K. (2018-07-16). "DARPA Plans a Major Remake of U.S. Electronics". IEEE Spectrum. Institute of Electrical and Electronics Engineers (IEEE). Retrieved 2020-06-10.
  7. Derek Lockhart, Stephen Twigg, Ravi Narayanaswami, Jeremy Coriell, Uday Dasari, Richard Ho, Doug Hogberg, George Huang, Anand Kane, Chintan Kaur, Tao Liu, Adriana Maggiore, Kevin Townsend, Emre Tuncer (2018-11-16). Experiences Building Edge TPU with Chisel . Retrieved 2020-06-10.
  8. "XiangShan open-source 64-bit RISC-V processor to rival Arm Cortex-A76 - CNX Software". CNX Software - Embedded Systems News. 2021-07-05. Retrieved 2022-03-26.
  9. "Chisel/FIRRTL Hardware Compiler Framework" . Retrieved 2022-09-08.