You are on page 1of 311

Accelerating Systems with

Programmable Logic Components


Lecture 03 FPGAs + Verilog I

1DT109 ASPLOC
2022 VT1-VT2

Yuan Yao, yuan.yao@it.uu.se

2022-09-17 1
Agenda
• Introduction to PLD and FPGAs
• PLD
• FPGA and its enablers
• Know your MINIZED board
• FPGA design flow
• Verilog I
• Introduction to Verilog
• Gate-level modeling using Verilog
• Data-flow/RTL-level modeling using Verilog
2022-09-17 2
Introduction to PLD and FPGAs

2022-09-17 3
Need for programmable logic devices (PLD)
• PROM – early 70’s
• EPROM – early 70’s
• PLA – mid 70’s
• PAL – late 70’s
• EEPROM – early 80’s

2022-09-17 4
Programmable Read-Only Memory (PROM)
• Programmable Read-Only
Memory (PROM) - early 70’s
• Address-line used as inputs
(in canonical normal form)
• The value stored at an
address defines the output
for the specified input
• One-time programmable
(OTP) using fuse/anti-fuse
2022-09-17 5
A PROM example

2022-09-17 6
A PROM example

2022-09-17 7
A PROM example

Address Data
A0 A1 D3 D2 D1 D0
0 0 0 1 0 0
0 1 0 1 0 1
1 0 1 0 0 1
1 1
2022-09-17
0 0 1 0 8
Erasable PROM (EPROM)
• Erasable PROM (EPROM)
• Erased by Ultraviolet light
• An Intel 1702A EPROM,
one of the earliest EPROM
types (1971), 256 by 8 bit.
• The small quartz window
admits UV light for erasure.
• BIOS in old PCs
2022-09-17 9
Programmable logic array (PLA)
• Mid 1970’s
• Programmable AND and OR
gates matrices (planes)
• Flexible
• Support large number of
functions
• Expensive
• Slow
• Hard to program

2022-09-17 10
Programmable array logic (PAL)
• Late 1970’s
• Programmable AND and
fixed OR gates
• Less flexible
• Support limited number of
functions
• Cheap
• Fast
• Hard to program but easier
than PLA
2022-09-17 11
Programmable array logic (PAL)
• Late 1970’s
• Programmable AND and
Electronical world always welcomes
fixed OR gates
• Less flexible
• Support cheap
limited numberand
of fast things.
functions
• Cheap
• Fast
• Hard to program but easier
than PLA
2022-09-17 12
Electronically EPROM (EEPROM)
• Early 80’s
• Breakthrough in PLD
• Metal + Oxide + Semi-
conductor = MOS
• Breakthrough in information
storage
• Flexible
• Cheap
• Fast
• Easy to program
2022-09-17 13
Electronically EPROM (EEPROM)
• Early 80’s
• Breakthrough in PLD Metal
(Semi
• Metal + Oxide + Semi- nowadays)
conductor = MOS
• Breakthrough in information
storage
• Flexible
• Cheap
• Fast
• Easy to program
2022-09-17 14
Electronically EPROM (EEPROM)
• Early 80’s
• Breakthrough in PLD Metal
(Semi
• Metal + Oxide + Semi- nowadays)
conductor = MOS
• Breakthrough in information
storage Oxide
• Flexible
• Cheap
• Fast
• Easy to program
2022-09-17 15
Electronically EPROM (EEPROM)
• Early 80’s
• Breakthrough in PLD Metal
(Semi
• Metal + Oxide + Semi- nowadays)
conductor = MOS
• Breakthrough in information
storage Oxide
• Flexible
• Cheap Semi-conductor
• Fast
• Easy to program
2022-09-17 16
EEPROM: Write the “1” bit

2022-09-17 17
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 18
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 19
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 20
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 21
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 22
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 23
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 24
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 25
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 26
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 27
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 28
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 29
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 30
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 31
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 32
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 33
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 34
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 35
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 36
EEPROM: Write the “1” bit

(High voltage)

2022-09-17 37
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 38
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 39
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 40
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 41
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 42
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 43
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 44
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 45
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 46
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 47
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 48
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 49
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 50
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 51
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 52
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 53
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 54
EEPROM: Write the “1” bit

(High voltage)

(High voltage)
2022-09-17 55
EEPROM: Write the “1” bit

(High voltage)
2022-09-17 56
EEPROM: Write the “1” bit

2022-09-17 57
EEPROM: Write the “1” bit

2022-09-17 58
EEPROM: Write the “1” bit

2022-09-17 59
EEPROM: Write the “1” bit

2022-09-17 60
EEPROM: Write the “1” bit

2022-09-17 61
EEPROM: Write the “1” bit

2022-09-17 62
EEPROM: Write the “1” bit

2022-09-17 63
EEPROM: Write the “1” bit

2022-09-17 64
EEPROM: Write the “1” bit

2022-09-17 65
EEPROM: Write the “1” bit

2022-09-17 66
EEPROM: Write the “1” bit

2022-09-17 67
EEPROM: Write the “1” bit

2022-09-17 68
EEPROM: Write the “1” bit

2022-09-17 69
EEPROM: Write the “1” bit

Can last for 10+ years!

2022-09-17 70
EEPROM: Write the “0” bit

2022-09-17 71
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 72
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 73
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 74
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 75
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 76
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 77
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 78
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 79
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 80
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 81
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 82
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 83
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 84
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 85
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 86
EEPROM: Write the “0” bit

(Low voltage)

2022-09-17 87
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 88
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 89
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 90
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 91
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 92
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 93
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 94
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 95
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 96
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 97
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 98
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 99
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 100
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 101
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 102
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 103
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 104
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 105
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 106
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 107
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 108
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 109
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 110
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 111
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 112
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 113
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 114
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 115
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 116
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 117
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 118
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 119
EEPROM: Write the “0” bit

(Low voltage)

(High voltage)
2022-09-17 120
Field Programmable Gate Array (FPGA)
• Mid 80’s
• Xilinx co-founders Ross Freeman and Bernard
Vonderschmitt invented the first commercially viable field-
programmable gate array in 1985 – the XC2064.
• 64 logic blocks only

2022-09-17 121
FPGA – Xilinx timeline
• 1985: View and configure logic and routing resources
manually
• “High-level” features such as Boolean expressions, K-maps,
truth-tables, etc
• 1986: Automatic transition from schematic to physical
(automatic placing & routing)
• We will learn how EDA plays a routing algorithm in Lecture 7
• 1995: Hardware Description Languages (HDL)

2022-09-17 122
FPGA - Architecture
• Overall idea:
Connecting simple
but distributed
reconfigurable
units (called logic
blocks) together
towards complicated
functions.
2022-09-17 123
FPGA – Configurable Logic Block (CLB)
• The Look Up Table
(LUT) can implement
any function for the
input combinations.
• The Flip-Flop (FF) is
used for store the
result of the LUT.
• The Mux can
implement the CLB
as combinational or
sequential logic.
2022-09-17 124
CLB - LUT
LUT
• Core of the FPGA architecture. 0

• Change the contents of the 1


SRAM to define outputs for 0
different input patterns. 0

1 1 0
A B C Output
1
0 0 0 SRAM0 0 0
0 0 1 SRAM1
0 1 0 SRAM2
1 1
0 1 1 SRAM3
1 0 0 SRAM4 0
1 0 1 SRAM5
1
1 1 0 SRAM6
1 1 1 SRAM7
2022-09-17 125
CLB - LUT
LUT
• Core of the FPGA architecture. 0

• Change the contents of the 1

Write into mem to reconfigure LUT.


SRAM to define outputs for
0 0
different input patterns.
1 1 0
A B C Output
1
0 0 0 SRAM0 0 0
0 0 1 SRAM1
0 1 0 SRAM2
1 1
0 1 1 SRAM3
1 0 0 SRAM4 0
1 0 1 SRAM5
1
1 1 0 SRAM6
1 1 1 SRAM7
2022-09-17 126
CLB - LUT
LUT
• Core of the FPGA architecture. 0

• Change the contents of the 1

Write into mem to reconfigure LUT.


SRAM to define outputs for
0 0
different input patterns.
How to implement 2-bits output
A B C Output
1 1 0

functions for input A,B,C?


1
0 0 0 SRAM0 0 0
0 0 1 SRAM1
0 1 0 SRAM2
1 1
0 1 1 SRAM3
1 0 0 SRAM4 0
1 0 1 SRAM5
1
1 1 0 SRAM6
1 1 1 SRAM7
2022-09-17 127
How to implement the following function
using the CLB we introduced?
A B C O1 O2
0 0 0 1 0
0 0 1 0 0
0 1 0 1 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 1
1 1 1 0 1
2022-09-17 128
How to implement the following function
using the CLB we introduced?
A B C O1 O2
0 0 0 1 0
0 0 1 0 0
Using Two LUTs across Two CLBs!
0 1 0 1 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 1
1 1 1 0 1
2022-09-17 129
Implement O1 in CLB1
LUT in CLB1
1 0
A B C O1 O2
0 1
0 0 0 1 0
0
0 0 1 0 0 1 0
1 0
0 1 0 1 1 1 1

1 O1
0 1 1 1 0 0 0 0
1 0 0 0 1 1 1 1

1 0 1 1 0 1 0
1 1 0 1 1 0 1
1
2022-09-17
1 1 0 1 130
Implement O2 in CLB2
LUT in CLB2
0 0
A B C O1 O2
0 1
0 0 0 1 0
0
0 0 1 0 0 1 0
1 0
0 1 0 1 1 0 1

1 O2
0 1 1 1 0 1 0 0
1 0 0 0 1 0 1 1

1 0 1 1 0 1 0
1 1 0 1 1 1 1
1
2022-09-17
1 1 0 1 131
Connecting CLB1 and CLB2
ABC O2
O1

• Connecting CLBs
can only be done
using the CLB1

programmable
interconnect,
which resides CLB2

outside the CLBs.

2022-09-17 132
FPGA - programmable interconnect
• Programmable switch
matrices (PSMs)
• Connecting CLBs
• Are reconfigurable
themselves!

2022-09-17 133
FPGA - programmable interconnect
• Programmable switch
matrices (PSMs)
• Connecting CLBs
• Are reconfigurable
themselves!

2022-09-17 134
FPGA - programmable interconnect
• Programmable switch
matrices (PSMs)
• Connecting CLBs
• Are reconfigurable
themselves!

2022-09-17 135
FPGA - programmable interconnect
• Programmable switch
matrices (PSMs)
• Connecting CLBs
• Are reconfigurable
themselves!

2022-09-17 136
Switch matrix interconnect point
• With a 6-bit memory bitfield, 6
switched can be controlled at
one intersection. Hence, all
connection possibilities can be
achieved.
M0 M1 M2 M3 M4 M5
0 0 0 0 0 1 a-b
0 0 0 0 1 0 b-d
0 0 0 1 0 0 a-d
0 0 1 0 0 0 a-c
0 1 0 0 0 0 c-d
1 0 0 0 0 0 b-d
2022-09-17 137
Switch matrix interconnect point
• With a 6-bit memory bitfield, 6
switched can be controlled at

Write into mem to reconfigure


one intersection. Hence, all
connection possibilities can be
connections.
achieved.
M0 M1 M2 M3 M4 M5
0 0 0 0 0 1 a-b
0 0 0 0 1 0 b-d
0 0 0 1 0 0 a-d
0 0 1 0 0 0 a-c
0 1 0 0 0 0 c-d
1 0 0 0 0 0 b-d
2022-09-17 138
FPGA – I/O blocks
• Tri-state gate.
• In the output mode, the
output buffer is switched
on and the input buffer
switched off.
• In the input mode, the
output buffer is switched
off and the input buffer
switched on.

2022-09-17 139
FPGA – I/O blocks
• Tri-state gate.
• In the output mode, the
output buffer is switched
on and the input buffer
switched off.
• In the input mode, the
output buffer is switched
off and the input buffer
switched on.

2022-09-17 140
FPGA – past and now

Xilinx XC2064 Xilinx XCVU440 Xilinx Zynq 7Z007S


Logic cells 64 4.4M 23K
CLB Flip-Flops 64 5.0M ??
Total Block RAM 0 88.6Mb 1.8Mb
DSP Slices 0 2880 0
Maximum Number of
38 1456 54
I/O Pins
Differential Multi-Gigabit
0 48 0
Transceivers
2022-09-17 141
FPGA – past and now

Xilinx XC2064 Xilinx XCVU440 Xilinx Zynq 7Z007S


Logic cells 64 4.4M 23K
CLB Flip-Flops 64 5.0M ??
Total Block RAM 0 Still, compared
88.6Mb to ASICs: 1.8Mb
DSP Slices 0FPGAs require 2880
20-35x more area0
Maximum Number of
38
10x more
1456
power 54
I/O Pins
But 3-4x slower
Differential Multi-Gigabit
0 48 0
Transceivers
2022-09-17 142
FPGA – past and now

But FPGAs are cheap and easy/quick


to do implementation!
Xilinx XC2064 Xilinx XCVU440 Xilinx Zynq 7Z007S
Logic cells 64 4.4M 23K
CLB Flip-Flops 64 5.0M ??
Total Block RAM 0 Still, compared
88.6Mb to ASICs: 1.8Mb
DSP Slices 0FPGAs require 2880
20-35x more area0
Maximum Number of
38
10x more
1456
power 54
I/O Pins
But 3-4x slower
Differential Multi-Gigabit
0 48 0
Transceivers
2022-09-17 143
The MINIZED starter kit board

2022-09-17 144
The MINIZED starter kit board

FPGA

2022-09-17 145
The MINIZED starter kit board

FPGA

2022-09-17 146
The MINIZED starter kit board

FPGA

Mem

2022-09-17 147
The MINIZED starter kit board

FPGA

Mem

2022-09-17 148
The MINIZED starter kit board

Flash

FPGA

Mem

2022-09-17 149
The MINIZED starter kit board

Flash

FPGA

Mem

2022-09-17 150
The MINIZED starter kit board

Flash

Boot
Loader
Flash

FPGA

Mem

2022-09-17 151
The MINIZED starter kit board

Flash

Boot
Loader
Flash

FPGA

Mem

2022-09-17 152
The MINIZED starter kit board

Flash

Boot
Loader
Flash

FPGA

Mem

2022-09-17 153
The MINIZED starter kit board

Flash

Boot
Loader
Flash

FPGA

Mem

2022-09-17 154
The MINIZED starter kit board

Flash

Boot
Loader
Flash

FPGA

Mem

2022-09-17 155
The MINIZED starter kit board

Flash

Boot
Loader
Flash

FPGA

Mem

2022-09-17 156
The MINIZED starter kit board PS

Flash

Boot
Loader
Flash

FPGA

Mem

2022-09-17 157
The MINIZED starter kit board PS

Flash

Boot
Loader
Flash

FPGA

Mem

2022-09-17 158
The MINIZED starter kit board PS

Flash

Boot
Loader
Flash

FPGA

Mem

PL

2022-09-17 159
FPGA applications
• Test and prototyping before ASIC
• Low-volume production (military, space, etc)
• Accelerators (PS+PL)
• Resilience to cosmic radiation (re-programmability)

From https://forums.xilinx.com/t5/Xilinx-Xclusive-
Blog/Touchdown-NASA-s-Perseverance-Rover-Lands-on-
Mars-with-Xilinx/ba-p/1209732
Hello MARS...Congratulations to the amazing engineers
and scientists at NASA and Jet Propulsion Labs (JPL) for
a successful touchdown on the Mars Jezero Crater on
February 18, 2021! We are so proud to be part of this
mission with Xilinx FPGAs in the lander rover and
instruments, including the vision processor to perform
2022-09-17 image processing optimization for the historic first images. 160
FPGA design flow

2022-09-17 161
FPGA design flow
Early Days

2022-09-17 162
FPGA design flow
Early Days
Schematic entry

2022-09-17 163
FPGA design flow
Early Days
Schematic entry

2022-09-17 164
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

2022-09-17 165
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

2022-09-17 166
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

Program FPGA

2022-09-17 167
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

Program FPGA

2022-09-17 168
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

Program FPGA

Test FPGA In-System

2022-09-17 169
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

Program FPGA

Test FPGA In-System

2022-09-17 170
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 171
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 172
Today
FPGA design flow
Early Days
Schematic entry

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 173
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 174
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry
Functional verification

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 175
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry
Functional verification

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 176
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 177
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 178
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 179
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 180
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug

Program FPGA

Test FPGA In-System

2022-09-17 181
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Routing
Program FPGA

Test FPGA In-System

2022-09-17 182
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Routing
Program FPGA

Test FPGA In-System

2022-09-17 183
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Routing
Program FPGA

Timing verification

Test FPGA In-System

2022-09-17 184
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Routing
Program FPGA

Timing verification

Test FPGA In-System

2022-09-17 185
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Routing
Program FPGA

Timing verification

Test FPGA In-System

2022-09-17 186
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification

Test FPGA In-System

2022-09-17 187
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification

Test FPGA In-System

2022-09-17 188
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification

Test FPGA In-System

2022-09-17 189
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification

Test FPGA In-System


Program & System test
2022-09-17 190
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification

Test FPGA In-System


Program & System test
2022-09-17 191
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification
Debug
Test FPGA In-System
Program & System test
2022-09-17 192
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification
Debug
Test FPGA In-System
Program & System test
2022-09-17 193
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification
Debug
Test FPGA In-System
Program & System test
2022-09-17 194
Today
FPGA design flow
Early Days HDL & Graphic entry

Schematic entry Debug


Functional verification

Design deploying to
Synthesis
FPGA

Debug
Map & Place &
Debug
Routing
Program FPGA

Timing verification
Debug
Test FPGA In-System
Program & System test
2022-09-17 195
Verilog I

2022-09-17 196
Introduction to Verilog HDL
• Verilog is a Hardware Description Language
(HDL)
• A hardware description language is a language
used to describe a digital system
• Why using an HDL?
• Design abstraction: HDL v.s. layout by human
• Reduce cost and time to design hardware
• Design reuse (IPs)
2022-09-17 197
Brief history of HDLs
• Late 70’s and early 80’s
• ISP, HiLo, PALASM, CUPL, ABEL, etc
• 1971: Notion of “Register Transfer Level” (RTL) modeling
• Mid 80’s:
• Verification & Logic (Verilog) by Gateway Design Automation
• C-like simulation language
• 1989: Cadence acquires Gateway Design Automation
• 1990: Verilog in public domain
• Very High-speed integrated circuit hardware Description Language
(VHDL) by US Department of Defense
• Ada-like syntax
• Used for documentation and simulation
2022-09-17 198
Brief history of HDLs All require working
with Boolean functions
• Late 70’s and early 80’s to some extent.
• ISP, HiLo, PALASM, CUPL, ABEL, etc
• 1971: Notion of “Register Transfer Level” (RTL) modeling
• Mid 80’s:
• Verification & Logic (Verilog) by Gateway Design Automation
• C-like simulation language
• 1989: Cadence acquires Gateway Design Automation
• 1990: Verilog in public domain
• Very High-speed integrated circuit hardware Description Language
(VHDL) by US Department of Defense
• Ada-like syntax
• Used for documentation and simulation
2022-09-17 199
Brief history of HDLs All require working
with Boolean functions
• Late 70’s and early 80’s to some extent.
• ISP, HiLo, PALASM, CUPL, ABEL, etc
• 1971: Notion of “Register Transfer Level” (RTL) modeling
• Mid 80’s:
• Verification & Logic (Verilog) by Gateway Design Automation
• C-like simulation language
• 1989: Cadence acquires Gateway Design Automation
• 1990: Verilog in public domain
• Very High-speed integrated circuit hardware Description Better
Language
(VHDL) by US Department of Defense abstraction!
• Ada-like syntax
• Used for documentation and simulation
2022-09-17 200
Think in hardware, not in software
• Verilog is for hardware C Verilog

modeling/specification a=1; a=1;


• The model/specification b=2;
c=0;
b=2;
c=0;
can be simulated and
then synthesized into a=b; // a=b=2 a <= b; // a=b=2
c=a; // c=a=b=2 c <= a; // c=a=1
hardware
Compiled to the following Synthesized to the following
• Think in hardware! sequential instructions: concurrent hardware structure:
• Explicit notion of
time/concurrency Load %a, %b // Synthesize the
Load %c, %a design in Vivado
• Data-flow
Result: c=a=b=2 Result: c=1, a=b=2;
2022-09-17 201
Think in hardware, not in software
• Verilog is for hardware C Verilog

modeling/specification a=1; a=1;


• The model/specification b=2;
c=0;
b=2;
c=0;
can be simulated and
then synthesized into a=b; // a=b=2 a <= b; // a=b=2
c=a; // c=a=b=2 c <= a; // c=a=1
hardware
Compiled to the following Synthesized to the following
• Think in hardware! sequential instructions: concurrent hardware structure:
• Explicit notion of
time/concurrency Load %a, %b // Synthesize the
Load %c, %a design in Vivado
• Data-flow
Result: c=a=b=2 Result: c=1, a=b=2;
2022-09-17 202
Think in hardware, not in software
• Verilog is for hardware C Verilog

modeling/specification a=1; a=1;

Think in hardware.
• The model/specification b=2; b=2;
c=0; c=0;
can be simulated and
Schema come first than code.
then synthesized into
hardware
a=b; // a=b=2
c=a; // c=a=b=2
a <= b; // a=b=2
c <= a; // c=a=1

Compiled to the following Synthesized to the following


• Think in hardware! sequential instructions: concurrent hardware structure:
• Explicit notion of
time/concurrency Load %a, %b // Synthesize the
Load %c, %a design in Vivado
• Data-flow
Result: c=a=b=2 Result: c=1, a=b=2;
2022-09-17 203
Demo 1
• Blocking/non-blocking assignments.
Verilog Verilog
//demo_1 //demo_2
a=1; a=1;
b=2; b=2;
c=0; c=0;

a <= b; // a=b=2 a = b; // a=b=2


c <= a; // c=a=1 c = a; // c=a=2

Synthesized to the following Synthesized to the following


concurrent hardware structure: concurrent hardware structure:

// Synthesize the // Synthesize the


design in Vivado design in Vivado
2022-09-17 204
Result: c=1, a=b=2; Result: c=a=b=2;
Demo 1
• Blocking/non-blocking assignments.
Verilog Verilog
//demo_1 //demo_2
a=1; a=1;
b=2; b=2;
c=0; c=0;

a <= b; // a=b=2 a = b; // a=b=2


c <= a; // c=a=1 c = a; // c=a=2

Synthesized to the following Synthesized to the following


concurrent hardware structure: concurrent hardware structure:

// Synthesize the // Synthesize the


design in Vivado design in Vivado
2022-09-17 205
Result: c=1, a=b=2; Result: c=a=b=2;
Demo 1
• Blocking/non-blocking assignments.
Verilog Verilog
//demo_1 //demo_2
a=1; a=1;
b=2; b=2;
c=0; c=0;

a <= b; // a=b=2 a = b; // a=b=2


c <= a; // c=a=1 c = a; // c=a=2

Synthesized to the following Synthesized to the following


concurrent hardware structure: concurrent hardware structure:

// Synthesize the // Synthesize the


design in Vivado design in Vivado
2022-09-17 206
Result: c=1, a=b=2; Result: c=a=b=2;
Verilog supports various levels of abstraction

1. Less detail
• Behavioral model (relying more on EDA)
2. Faster simulation
• Data flow model or 3. Shorter time-to-market
register transfer level 4. Less optimization
(RTL) model
• Gate level model 1. More detail
(relying less on EDA)
• Switch level model or 2. Slower simulation
transistor level model 3. Longer time-to-market
4. More optimization
2022-09-17 207
In more detail, verilog can model…
• Constructs used only for simulation
• Gate delays
• Signal strength
• Verilog procedural interface (VPI)
• Facilities for debugging/verification
• ...
• Constructs used for both simulation and synthesis
• Registers
• Wires
• Assignments
• Operators
•…
2022-09-17 208
In more detail, verilog can model…
• Constructs used only for simulation
Use synthesizable constructs for
• Gate delays
• Signal strength
HW interface
• Verilog procedural implementation.
(VPI)
• Facilities for debugging/verification
• ...
• Constructs used for both simulation and synthesis
• Registers
• Wires
• Assignments
• Operators
•…
2022-09-17 209
In more detail, verilog can model…
• Constructs used only for simulation
Use synthesizable constructs for
• Gate delays
• Signal strength
HW interface
• Verilog procedural implementation.
(VPI)
• Facilities for debugging/verification
Use• ...non-synthesizable constructs for
verification/debugging.
• Constructs used for both simulation and synthesis
• Registers
• Wires
• Assignments
• Operators
•…
2022-09-17 210
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

2022-09-17 211
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

2022-09-17 212
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

2022-09-17 213
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

2022-09-17 214
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

2022-09-17 215
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0 𝑂 =𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

2022-09-17 216
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0 𝑂 =𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 0 0 𝑂 =𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

2022-09-17 217
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0 𝑂 =𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 0 0 𝑂 =𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 1 1
1 0 0 1
𝑂 = 𝐴 + 𝐴 ∙ 𝐵 ∙ 𝐶 + 𝐴 ∙ 𝐶 ∙ (𝐵 + 𝐵)
1 0 1 0
1 1 0 1
1 1 1 1

2022-09-17 218
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O
0 0 0 0
0 0 1 0 𝑂 =𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 0 0 𝑂 =𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 1 1
1 0 0 1
𝑂 = 𝐴 + 𝐴 ∙ 𝐵 ∙ 𝐶 + 𝐴 ∙ 𝐶 ∙ (𝐵 + 𝐵)
1 0 1 0 𝑂 =𝐴∙𝐶+𝐵∙𝐶
1 1 0 1
1 1 1 1

2022-09-17 219
Verilog example (digital design recap)
• Implement the following function use Verilog

A B C O

Let us start with


0
0
0
0𝑂 =gate-level
𝐴 ∙ 𝐵 ∙ 𝐶 + 𝐴 ∙ 𝐵 ∙ 𝐶 + 𝐴 ∙modeling.
0
1
0
0 𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 0 0 𝑂 =𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶+𝐴∙𝐵∙𝐶
0 1 1 1
1 0 0 1
𝑂 = 𝐴 + 𝐴 ∙ 𝐵 ∙ 𝐶 + 𝐴 ∙ 𝐶 ∙ (𝐵 + 𝐵)
1 0 1 0 𝑂 =𝐴∙𝐶+𝐵∙𝐶
1 1 0 1
1 1 1 1

2022-09-17 220
Step 1 – Schema comes first than code

2022-09-17 221
Step 1 – Schema comes first than code

𝑂 =𝐴∙𝐶+𝐵∙𝐶
2022-09-17 222
Step 1 – Schema comes first than code
my_module

A
And1

Not1
B
Or1 O

And2
C

𝑂 =𝐴∙𝐶+𝐵∙𝐶
2022-09-17 223
Step 2 – Model the module using gale-level Verilog

𝑂 =𝐴∙𝐶+𝐵∙𝐶

2022-09-17 224
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

2022-09-17 225
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

endmodule

2022-09-17 226
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

endmodule

2022-09-17 227
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

my_module
declaration

endmodule

2022-09-17 228
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

my_module
declaration

my_module

endmodule

2022-09-17 229
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

my_module
declaration

my_module

endmodule

2022-09-17 230
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; my_module
declaration

my_module

endmodule

2022-09-17 231
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; my_module
output O; declaration

my_module

endmodule

2022-09-17 232
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; my_module
output O; declaration

my_module

endmodule

2022-09-17 233
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

endmodule

2022-09-17 234
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

endmodule

2022-09-17 235
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

endmodule

2022-09-17 236
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

endmodule

2022-09-17 237
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

endmodule

2022-09-17 238
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

endmodule
C

2022-09-17 239
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

endmodule
C

2022-09-17 240
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

B
O
endmodule
C

2022-09-17 241
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

my_module

B
O
endmodule
C

2022-09-17 242
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1();
my_module

B
O
endmodule
C

2022-09-17 243
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1();
and And1(); my_module

B
O
endmodule
C

2022-09-17 244
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1();
and And1(); my_module
and And2();
A

B
O
endmodule
C

2022-09-17 245
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1();
and And1(); my_module
and And2();
A
or Or1();
B
O
endmodule
C

2022-09-17 246
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1();
and And1(); my_module
and And2();
A
or Or1();
B
O
endmodule
C

2022-09-17 247
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A
or Or1();
B
O
endmodule
C

2022-09-17 248
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A And
or Or1(); 1

B
O
endmodule
C

2022-09-17 249
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A And
or Or1(); 1

B
O
endmodule
C

2022-09-17 250
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A And
or Or1(); 1

B
O
endmodule
C

2022-09-17 251
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A And
or Or1(); 1

B
O
endmodule And
C 2

2022-09-17 252
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A And
or Or1(); 1

B
O
endmodule And
C 2

2022-09-17 253
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A And
or Or1(); 1
Not1
B
O
endmodule And
C 2

2022-09-17 254
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 255
Step 2 – Model the module using gale-level Verilog
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; input/output my_module


output O; declaration

not Not1(); sub module


and And1(); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule Gate primitives provided in And
2
libraries: C

2022-09-17 GateName (out, in1, in2, in3, ... ) 256


Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1();
and And1(); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 257
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )

and And1(); my_module


and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 258
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 259
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 260
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 261
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 262
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 263
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 264
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2();
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 265
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module

A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 266
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 267
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 268
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 269
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 270
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 271
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 272
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 273
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 274
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 275
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 276
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; internal signal libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 277
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; internal signal libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.in1(C));
and And1(.in1(A)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); Wires are used for 1
Not1
B
connecting different Or1 O
endmodule elements. They can be And
C 2
treated as physical wires.
2022-09-17 278
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; internal signal libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.out(w_not), .in1(C));
and And1(.in1(A), .in2(w_not)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 279
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; internal signal libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.out(w_not), .in1(C));
and And1(.in1(A), .in2(w_not)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 280
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; internal signal libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.out(w_not), .in1(C));
and And1(.in1(A), .in2(w_not)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O)); 1
Not1 w_not
B
Or1 O
endmodule And
C 2

2022-09-17 281
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; internal signal libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.out(w_not), .in1(C));
and And1(.out(w_and1), .in1(A), .in2(w_not)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O), .in1(w_and1)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 282
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; internal signal libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.out(w_not), .in1(C));
and And1(.out(w_and1), .in1(A), .in2(w_not)); my_module
and And2(.in1(B), .in2(C));
A And
or Or1(.out(O), .in1(w_and1)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 283
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶

input A, B, C; Gate primitives provided in


output O; internal signal libraries:
wire w_not, w_and1, w_and2; GateName (out, in1, in2, in3, ... )
not Not1(.out(w_not), .in1(C));
and And1(.out(w_and1), .in1(A), .in2(w_not)); my_module
and And2(.in1(B), .in2(C));
A And w_and1
or Or1(.out(O), .in1(w_and1)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 284
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶
Gate primitives provided in
input A, B, C;
libraries:
output O; internal signal
GateName (out, in1, in2, in3, ... )
wire w_not, w_and1, w_and2;
not Not1(.out(w_not), .in1(C));
and And1(.out(w_and1), .in1(A), .in2(w_not)); my_module
and And2(.out(w_and2), .in1(B), .in2(C));
A And
or Or1(.out(O), .in1(w_and1), in2(2_and2)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 285
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶
Gate primitives provided in
input A, B, C;
libraries:
output O; internal signal
GateName (out, in1, in2, in3, ... )
wire w_not, w_and1, w_and2;
not Not1(.out(w_not), .in1(C));
and And1(.out(w_and1), .in1(A), .in2(w_not)); my_module
and And2(.out(w_and2), .in1(B), .in2(C));
A And
or Or1(.out(O), .in1(w_and1), in2(2_and2)); 1
Not1
B
Or1 O
endmodule And
C 2

2022-09-17 286
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶
Gate primitives provided in
input A, B, C;
libraries:
output O; internal signal
GateName (out, in1, in2, in3, ... )
wire w_not, w_and1, w_and2;
not Not1(.out(w_not), .in1(C));
and And1(.out(w_and1), .in1(A), .in2(w_not)); my_module
and And2(.out(w_and2), .in1(B), .in2(C));
A And
or Or1(.out(O), .in1(w_and1), in2(2_and2)); 1
Not1
B
Or1 O
endmodule And
C 2 w_and2
2022-09-17 287
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶
Gate primitives provided in
input A, B, C;
libraries:
output O; internal signal
A lot of time on port mapping.
wire w_not, w_and1, w_and2;
GateName (out, in1, in2, in3, ... )
not Not1(.out(w_not), .in1(C));
and And1(.out(w_and1), .in1(A), .in2(w_not)); my_module
and And2(.out(w_and2), .in1(B), .in2(C));
A And
or Or1(.out(O), .in1(w_and1), in2(2_and2)); 1
Not1
B
Or1 O
endmodule And
C 2 w_and2
2022-09-17 288
Step 3 – connecting submodules up
module my_module(A, B, C, O); 𝑂 =𝐴∙𝐶+𝐵∙𝐶
Gate primitives provided in
input A, B, C;
libraries:
output O; internal signal
A lot of time on port mapping.
wire w_not, w_and1, w_and2;
GateName (out, in1, in2, in3, ... )
not Not1(.out(w_not), .in1(C));
and And1(.out(w_and1), .in1(A), .in2(w_not)); my_module
and And2(.out(w_and2), .in1(B), .in2(C));
or Or1(.out(O), .in1(w_and1), in2(2_and2));
A Solution
And
1

B Not1
1 Or1 O
endmodule And
C 2 w_and2
2022-09-17 289
Port mapping by name vs by order
By name By order
module my_module(A, B, C, O); module my_module(A, B, C, O);

input A, B, C; input A, B, C;
output O; output O;
wire w_not, w_and1, w_and2; wire w_not, w_and1, w_and2;
not Not1(.out(w_not), .in1(C)); not Not1(w_not, C);
and And1(.out(w_and1), .in1(A), .in2(w_not)); and And1(w_and1, A, w_not);
and And2(.out(w_and2), .in1(B), .in2(C)); and And2(w_and2, B, C);
or Or1(.out(O), .in1(w_and1), in2(2_and2)); or Or1(O, w_and1, 2_and2);

endmodule endmodule
2022-09-17 290
Port mapping by name vs by order
By name By order

You can shuffle input/output order in


module my_module(A, B, C, O); module my_module(A, B, C, O);

outputnamed mapping, but output


notO; in order
input A, B, C; input A, B, C;
O;

not Not1(.out(w_not), .in1(C)); mapping.not Not1(w_not, C);


wire w_not, w_and1, w_and2; wire w_not, w_and1, w_and2;

and And1(.out(w_and1), .in1(A), .in2(w_not)); and And1(w_and1, A, w_not);


and And2(.out(w_and2), .in1(B), .in2(C)); and And2(w_and2, B, C);
or Or1(.out(O), .in1(w_and1), in2(2_and2)); or Or1(O, w_and1, 2_and2);

endmodule endmodule
2022-09-17 291
Port mapping by name vs by order
By name By order

You can shuffle input/output order in


module my_module(A, B, C, O); module my_module(A, B, C, O);

outputnamed mapping, but output


notO; in order
input A, B, C; input A, B, C;
O;

not Not1(.out(w_not), .in1(C)); mapping.not Not1(w_not, C);


wire w_not, w_and1, w_and2; wire w_not, w_and1, w_and2;

and And1(.out(w_and1), .in1(A), .in2(w_not)); SolutionA, w_not);


and And1(w_and1,
and And2(.out(w_and2), .in1(B), .in2(C)); and And2(w_and2, B, C);
or Or1(.out(O), .in1(w_and1), in2(2_and2));
2
or Or1(O, w_and1, 2_and2);

endmodule endmodule
2022-09-17 292
Any other way to do my_module?
1. Less detail
• Behavioral model (relying more on EDA)
2. Faster simulation
• Data flow model or 3. Shorter time-to-market
register transfer level 4. Less optimization
(RTL) model
• Gate level model 1. More detail
(relying less on EDA)
• Switch level model or 2. Slower simulation
transistor level model 3. Longer time-to-market
4. More optimization
2022-09-17 293
Any other way to do my_module?
1. Less detail
• Behavioral model (relying more on EDA)
2. Faster simulation
• Data flow model or
Let’s do my_module in data-flow level.
3. Shorter time-to-market
register transfer level 4. Less optimization
(RTL) model
• Gate level model 1. More detail
(relying less on EDA)
• Switch level model or 2. Slower simulation
transistor level model 3. Longer time-to-market
4. More optimization
2022-09-17 294
Data-flow level modeling
• Step 1 – Schema comes first than code
my_module

A
And1

Not1
B
Or1 O

And2
C

2022-09-17 𝑂 =𝐴∙𝐶+𝐵∙𝐶 295


Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
output O;
wire w_not, w_and1, w_and2;
my_module
assign w_not = ~C;
assign w_and1 = A & w_not;
A And w_and1
assign w_and2 = B & C; 1
assign O = w_and1 | w_and2; B Not1 w_not
Or1 O
And
endmodule C 2 w_and2

2022-09-17 𝑂 =𝐴∙𝐶+𝐵∙𝐶 296


Step 2 – Model the module using data-flow
level Verilog Signals of type wire requires the
module my_module(A, B, C, O); continuous assignment of a value.
In Verilog, this concept is realized by the
input A, B, C; assign statement where any wire can be
driven continuously with a value.
output O;
wire w_not, w_and1, w_and2;
my_module
assign w_not = ~C;
assign w_and1 = A & w_not;
A And w_and1
assign w_and2 = B & C; 1
assign O = w_and1 | w_and2; B Not1 w_not
Or1 O
And
endmodule C 2 w_and2

2022-09-17 𝑂 =𝐴∙𝐶+𝐵∙𝐶 297


Step 2 – Model the module using data-flow
level Verilog Signals of type wire requires the
module my_module(A, B, C, O); continuous assignment of a value.
In Verilog, this concept is realized by the
input A, B, C; assign statement where any wire can be
driven continuously with a value.
output O;
wire w_not, w_and1, w_and2;
my_module
assign w_not = ~C;
assign w_and1 = A & w_not;
A And w_and1
assign w_and2 = B & C; 1Solution
assign O = w_and1 | w_and2; B Not1 w_not
3 Or1 O
And
endmodule C 2 w_and2

2022-09-17 𝑂 =𝐴∙𝐶+𝐵∙𝐶 298


Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
output O;

assign O = (A & ~C) | (B & C);

endmodule

2022-09-17 299
Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
𝑂 =𝐴∙𝐶+𝐵∙𝐶
output O;

assign O = (A & ~C) | (B & C);

endmodule

2022-09-17 300
Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
𝑂 =𝐴∙𝐶+𝐵∙𝐶
output O;

assign O = (A & ~C) | (B & C);

Solution
4
endmodule

2022-09-17 301
Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
output O;

endmodule

2022-09-17 302
Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
𝑂 =𝐴∙𝐶+𝐵∙𝐶
output O;

endmodule

2022-09-17 303
Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
𝑂 =𝐴∙𝐶+𝐵∙𝐶
output O;

assign O = (C) ? B : A;

endmodule

2022-09-17 304
Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
𝑂 =𝐴∙𝐶+𝐵∙𝐶
output O;

assign O = (C) ? B : A;
A
MUX
O
B

endmodule C

2022-09-17 305
Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);

input A, B, C;
𝑂 =𝐴∙𝐶+𝐵∙𝐶
output O;

assign O = (C) ? B : A;
A
MUX
O Solution
B
5
endmodule C

2022-09-17 306
Step 2 – Model the module using data-flow
level Verilog
module my_module(A, B, C, O);
𝑂 =𝐴∙𝐶+𝐵∙𝐶
my_module is actually a way to
input A, B, C;
output O;

implement
assign O = (C) ? B : A; multiplexer using gates.
A
MUX
O Solution
B
5
endmodule C

2022-09-17 307
EDA Synthesis
• The five solutions differ in coding style, complicity, readability,
conciseness, etc
• Choose wisely according to your project’s/teammates’ needs
• All the four solutions yield the same synthesis result in Vivado.

2022-09-17 308
EDA Synthesis
• The five solutions differ in coding style, complicity, readability,
conciseness, etc

Unlike in ASIC, you cannot see the


• Choose wisely according to your project’s/teammates’ needs
• All the four solutions yield the same synthesis result in Vivado.
gates but only LUTs in FPGA synthesis.

2022-09-17 309
EDA Synthesis
• The five solutions differ in coding style, complicity, readability,
conciseness, etc

Unlike in ASIC, you cannot see the


• Choose wisely according to your project’s/teammates’ needs
• All the four solutions yield the same synthesis result in Vivado.
gates but only LUTs in FPGA synthesis.
If you like, you can still see the “gates”
under RTL analysis -> schematic.
2022-09-17 310
Questions?

2022-09-17 311

You might also like