2016 Bookmatter DigitalLogicDesignUsingVerilog
2016 Bookmatter DigitalLogicDesignUsingVerilog
The list of synthesizable and non-synthesizable Verilog constructs is tabu-lated in the following
Table
Verilog Used for Synthesizable Non-Synthesizable
Constructs construct Construct
module The code inside the module and Yes No
the endmodule consists of the
declarations and functionality of
the design
Instantiation If the module is synthesizable Yes No
then the instantiation is also
synthesizable
initial Used in the test benches No Yes
always Procedural block with the reg Yes No
type assignment on LHS side.
The block is sensitive to the
events
assign Continuous assignment with Yes No
wire data type for modeling the
combinational logic
primitives UDP’s are non-synthesizable Yes No
whereas other Verilog primitives
are synthesizable
force and These are used in test benches No Yes
release and non-synthesizable
delays Used in the test benches and No Yes
synthesis tool ignores the delays
fork and join Used during simulation No Yes
ports Used to indicate the direction, Yes No
input, output and inout. The
input is used at the top module
parameter Used to make the design more Yes No
generic
time Not supported for the synthesis No Yes
(continued)
(continued)
real Not supported for synthesis No Yes
functions and Both are synthesizable. Provided Yes No
task that the task does not have the
timing constructs
loop The for loop is synthesizable and Yes No
used for the multiple iterations.
Verilog Used for arithmetic, bitwise, Yes No
Operators unary, logical, relational etc are
synthesizable
Blocking and Used to describe the Yes No
non-blocking combinational and sequential
assignments design functionality respectively
if-else, case, These are used to describe the Yes No
casex, casez design functionality depending
on the priority and parallel
hardware requirements
Compiler Used during synthesis Yes No
directives
(‘ifdef,‘undef,
‘define)
Bits and part It is synthesizable and used for Yes No
select the bit or part select
Appendix II
Xilinx Spartan Devices
The Design For Testability (DFT) and its necessity is discussed in summarized
In the practical ASIC design, the DFT is used to find out various kinds of faults in
the design. For FPGA designs this step is excluded. The necessity of DFT is for
early detection of the faults in the design using scan chain insertions. The func-
tional abstraction of defects is called as fault and the abstraction of the fault is the
system level error. Physical testing is carried out after manufacturing of chip to
understand the fabrication-related issues or faults.
The defects in the design can be physical or electrical. Physical defects are due to
silicon or defective oxide. Electrical defects are short, open, transistor defects and
changes in the threshold voltage.
Few of the faults in the design are following
1. Stuck at faults: Stuck at one or Stuck at zero
2. Memory faults or pattern-sensitive faults
3. Bridging faults
4. Cross point faults
5. Delay faults
Testing process is the process of test pattern generation, test pattern application
and output evaluation.
Generally, the test flow includes the following:
1. Identify the target faults
2. Test generation
3. Fault Simulation
4. Testability
5. DFT
1. RTL design
2. Simulation
3. Synthesis
4. Insert scan chain
5. Layout
If every data input of the register need to be forced to the known value during the
test, then the design is controllable.
Observability indicates the ability to observe the node at primary output. The
de-sign needs to be controllable and observable.
As shown in the following design, the design input of comb_logic1 is control-
lable and the output from comb_logic3 is observable. But comb_logic1 and
comb_logic2 are not observable. So for detection of faults, it is essential to make
comb_logic1, comb_logic2, and comb_logic3 controllable as well as observable.
clk
• The basic DFT techniques are: Ad-HOC DFT and Structured DFT. The struc-
tured DFT includes the scan-based DFT which is again classified as MUX -
based DFT and level–sensitive, element-based DFT. An-other structured DFT
technique is MBIST and LBIST. JTAG is used for boundary scan.
Basic MUX-based technique is described below.
• MUX-based scan cell
The MUX-based scan cell is shown below and it has additional inputs as
Test_data, Scan_en. The MUX is inserted at the input of the D flip-flop and
during testing Scan_en=1 the D input is Test_data. During normal operation, the
Scan_en=0 and Data_in can pass through the combinational logic to the D input.
Thus, the following cell works both in the test and normal modes. The clk can
be scan_clk during the test mode.
Appendix III: Design For Testability 407
Scan _en
clk
comb_
Data_in comb_
logic2
logic1
D D comb_
Test_data logic3
Scan _en
clk
408 Appendix III: Design For Testability
1. Generated clocks in the design: There should not be generated clocks in the
design as they are not controllable
2. Combinational feedback loop: There should not be any combinational loop in
the design as it creates issues in the timing analysis and hence it is essential to
break the combinational loop
3. Gated clocks: Gated clocks need to be avoided as they are not controllable
4. Asynchronous Control signals: There should not be any internally generated
asynchronous control signals
5. Do not mix the positive and negative edge triggered flip-flops
6. Avoid use of latches in the design
7. If shift registers are used then do not replace them by using scan enabled flip-
flops but only ensure the enable control
8. Do not use the clock input as data
9. Bypass the memories during DFT
Index
C Constraints, 260
Cadence RTL Compiler, 259 Continuous assignment, 82, 92
Capture flip-flop, 282 Control and timing unit, 392
case, 57, 369 Control path, 165, 392
case construct, 92 Control signals, 325
case-endcase, 57, 93 Coverage goals, 388
Case equality, 97 CPLD, 230
Case inequality, 97 CPU, 256
Cell library, 263 create_clock, 265, 287
Characterize, 312 Cumulative delay, 160
Check_design, 265, 318 Current simulation time, 80
Check_timing, 318 Current_state, 198
Checker, 187, 228 Cycle accurate, 187
Chip level, 389 Cycles, 390
CLB, 232, 235 Cycle stealing, 154
clk initalization, 229
clk generator, 229 D
Clock balancing, 370 Data arrival time, 278, 281
Clock buffer, 370 Database, 263
Clock definitions, 286 Data buffers, 396
Clock domain, 161 Data integrity, 322
Clock domain crossing (CDC), 250, 322 Data path, 280, 364, 392
Clocked-based logic, 104 Data path synchronizer, 340
Clocked logic, 192 Data propagation, 390
Clock gating, 251, 363, 364, 366, 390 Data rate, 258
Clock gating structure, 161 Data required time, 281
Clocking boundary, 341 DCM, 235, 242
Clock path group, 285 DDR, 241
Clock skew, 242, 387 DDR II, 382
Clock to ‘q’ delay, 280 DDR III, 382
Clock tree, 363, 364, 387 Dead zone code, 273
Clock tree synthesis, 260 Debug, 303
CMOS, 360 Decoder, 58
CMOS logic, 2 Decrement, 179
Code converters, 49 default, 93, 217, 369
Coding guidelines, 79 Defining hierarchy, 390
Combinational logic, 10, 27 Delay operators, 185
Combinational loop, 245 Deserializer, 391
Combinational path, 286 Design compiler, 263
Combinational path group, 284 Design constraints, 5, 300
Combinational shifters, 192 Design environment, 302
Comparators, 46 Design implementation, 252
Compile, 267 Design object, 264, 301
Compile-characterize, 302 Design partitioning, 274, 306, 346, 386
Compiler, 314 Design performance, 79, 162, 163, 386
Computational blocks, 386 Design rule constraints, 300
Concentration and replication, 18 Design rule library, 261
Concurrent, 10 Design rules, 302
Concurrent execution, 161 Design specification, 257
Conditional assignments, 55 DesignWare, 262
Configuration data, 239 Device utilization summary, 239
Consolidated control signal, 334 DFT, 259, 389
Constant folding, 272 DFT friendly RTL, 390
Constants, 10 Differential IOs, 387
Index 411
F H
Fabrication techniques, 258 Half adder, 38
False path, 295, 327 Half subtractor, 41
Fast debugging, 215 Handshaking, 338
Faults, 263 Handshaking mechanism, 391
Feasibility study, 385 Handshaking signals, 329
FFT, 386 Hazards, 111, 390
FIFO, 386, 396 HDL, 370
FIFO memory buffer, 338, 345 Hierarchical design, 302
FIR, 386 Hierarchies, 290
Flash memory, 233 High impedance, 11
Flip-flop, 103, 107 High speed, 257
Floor planning, 260 High-speed interfaces, 241
Four as to one MUX, 56 High speed IOs, 387
FPD, 230 Hold, 160
412 Index