RISC V Structure and Hardware Description Language
RISC V Structure and Hardware Description Language
ROLL NO : 21BCS003
RISC-V (pronounced "risk-five") 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. A number of 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.
As a RISC architecture, the RISC-V ISA is a load–store architecture. Its floating-point instructions
use IEEE 754 floating-point. Notable features of the RISC-V ISA include instruction bit field
locations chosen to simplify the use of multiplexers in a CPU, a design that is architecturally
neutral, and most-significant bits of immediate values placed at a fixed location to speed sign
extension.
Memory access
Like many RISC designs, RISC-V is a load–store architecture: instructions address only registers,
with load and store instructions conveying data to and from memory. Memory is addressed as 8-bit
bytes, with instructions being in little-endian order and with data being in the byte order defined by
the execution environment interface in which code is running.
Most load and store instructions include a 12-bit offset and two register identifiers. One register is
the base register. The other register is the source (for a store) or destination (for a load).
RISC-V manages memory systems that are shared between CPUs or threads by ensuring a thread of
execution always sees its memory operations in the programmed order. A fence instruction
guarantees that the results of predecessor operations are visible to successor operations of other
threads or I/O devices.
Compressed subset
To compensate, RISC-V's 32-bit instructions are actually 30 bits; 3⁄4 of the opcode space is reserved
for a recommended variable-length compressed instruction set, RVC, that includes 16-bit
instructions. The compressed instructions are simply aliases for a subset of the larger instructions.
The researcher intended to reduce the code's binary size for small computers, especially embedded
computer systems. The prototype included 33 of the most frequently used instructions, recoded as
compact 16-bit formats using operation codes previously reserved for the compressed set.
Embedded subset
An instruction set for the smallest embedded CPUs (set E) is reduced in other ways: Only 16 of the
32 integer registers are supported. All current extensions may be used; a floating-point extension to
use the integer registers for floating-point values is being considered. The privileged instruction set
supports only machine mode, user mode and memory schemes that use base-and-bound address
relocation. There are also vector set and bit manipulation extensions.
Q2) What do you mean by Hardware Description Language? Also compare Verilog and chisel
HDL.
(I) Verilog
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.
a) Verilog-95
With the increasing success of VHDL at the time, Cadence decided to make the language available
for open standardization. Cadence transferred Verilog into the public domain under the Open
Verilog International (OVI) (now known as Accellera) organization. Verilog was later submitted
to IEEE and became IEEE Standard 1364-1995, commonly referred to as Verilog-95.
b) System-Verilog
The advent of hardware verification languages such as OpenVera, and Verisity's e
language encouraged the development of Superlog by Co-Design Automation Inc (acquired
by Synopsys). The foundations of Superlog and Vera were donated to Accellera, which later became
the IEEE standard P1800-2005: System-Verilog.
module toplevel(clock,reset);
input clock;
input reset;
reg flop1;
reg flop2;
(II) Chisel
The Constructing Hardware in a Scala Embedded Language is an open-source hardware description
language (HDL) used to describe digital electronics and circuits at the register-transfer level. Chisel
is based on Scala as an embedded 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.
a) Code