Fpga-event-process simulation
Fpga-event-process simulation
Key differences:
Triggering mechanism:
Event-oriented: Simulation advances only when a signal value changes, making it efficient
for complex designs with many potential state transitions.
Process-oriented: Simulation progresses based on the completion of defined processes or
steps, which can be useful for modeling complex data flows and control logic.
Focus:
Event-oriented: Primarily concerned with capturing precise timing behavior and accurately
simulating signal changes.
Process-oriented: Emphasizes the logical sequence of operations within the design, often
used to analyze system-level behavior.
2. Logic simulation : is to mimic and validate the functions and features of digital circuit
designs written in hard- ware description languages (HDL). This process aims to verify whether
the circuit design meets its intended purpose by simulating hardware behavior within a
computerized environment.
Event-driven simulation: This is the most common approach where the simulation engine only
calculates the logic state of a component when its input signals change, making it efficient for
complex designs with many interconnected logic blocks.
Level-sensitive simulation: This method considers the timing of signal changes, simulating how
signals propagate through the circuit taking into account gate delays and propagation delays,
critical for high-speed designs.
Combinational logic evaluation: For combinational circuits, where the output is directly
dependent on the current input values, the simulation engine performs logic operations (like
AND, OR, XOR) based on the input signals to calculate the output.
Sequential logic evaluation: When dealing with flip-flops and other sequential elements, the
simulation engine needs to track the state of the circuit over time by updating internal state
variables based on the current inputs and previous states.
Timing analysis: The simulation software can perform timing checks to identify potential timing
violations like setup and hold time issues, which can be crucial for ensuring proper circuit
operation at high frequencies.
Implementing a design for an FPGA ultimately comes down to using one or more
software-programming-like languages to define the functionality of the device.
The traditional languages used for FPGA development are VHDL and Verilog.
VHDL
Like Ada, VHDL tends to be quite verbose and rigidly structured. In programming
language terms, VHDL is strongly typed. The language contains a predefined set of
base data types,
principally boolean, bit, bit_vector, character, string, integer, real, time, and array. All
other data types are defined in terms of the base types.
A set of VHDL libraries has been defined by the Institute of Electrical and
Electronics Engineers (IEEE) and formalized as the IEEE 1164
standard, Multivalue Logic System for VHDL Model Interoperability. These libraries
define the set of logic values to be used in the VHDL language. This library includes
a type named std_logic, which represents a 1-bit signal.
The “strong” 0 and 1 values in the preceding figure represent signals driven to the
specified binary state. The “weak” signals represent signals driven on a bus with
multiple drivers where any driver can assert itself on the bus, overriding the other
drivers. The Z value represents a CMOS output in the high-impedance state, where
rather than driving the bus to a 0 or 1 state, the high-impedance state, where rather
than driving the bus to a 0 or 1 state, the output is instead effectively disconnected
from the bus and does not drive it at all. The U state represents the default values for
all signals. When performing circuit simulation, any signal in the U state will be
detected, which likely indicates an uninitialized value is being used unintentionally.
The X state is associated with wires that do not have any outputs driving them. The –
state represents inputs that are unused, and therefore it does not matter what state they
are in. VHDL circuit designs generally begin by importing the IEEE 1164 libraries via
the following statements:
library IEEE;
use IEEE.std_logic_1164.all;
We will use VHDL in our project example later in the chapter. This is not intended to
represent a strong preference for VHDL over Verilog. Both hardware definition
languages are fully capable of representing essentially any design that can be
synthesized for an FPGA.
Verilog
The Verilog Hardware Description Language (HDL) was introduced in 1984 and
became standardized as IEEE 1364 in 2005. In 2009, the Verilog standard was
combined with the SystemVerilog standard to produce IEEE Standard 1800-2009.
SystemVerilog contains extensive facilities for performing system verification, in
addition to the hardware design features present in Verilog.
Verilog uses the concept of a wire to represent signal states. A signal value can take
any of the values 0, 1, don’t care (x), or high impedance (z), and can have
a strong or weak signal strength.
Both VHDL and Verilog define language subsets that can be used to design logic
circuitry. These subsets are referred to as the synthesizable language subsets.
Additional language features beyond the synthesizable subsets are available to support
tasks such as circuit simulation. We’ll see an example of this later in this chapter.
C/C++
While FPGA development tools for these high-level languages are capable of significant
optimization of the resulting FPGA implementation of the C/C++ code algorithm, there is still
something of a disconnect in that the C/C++ execution model involves the sequential execution of
statements while the native FPGA environment consists of parallel hardware components. The
FPGA design resulting from C/C++ code typically resembles a collection of state machines that
manage the sequential execution of the operations defined in the programming language
statements. Depending on the availability of opportunities for parallel execution within the C/C++
code, an FPGA implementation may provide a significant performance enhancement compared to
running the same code on a traditional processor.