chapter 12: synthesis - wiley.com · describe asic/vlsi design flow understand the rtl and physical...
TRANSCRIPT
![Page 1: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/1.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-1
Chapter 12: Synthesis
Department of Electronic Engineering
National Taiwan University of Science and Technology
Prof. Ming-Bo Lin
![Page 2: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/2.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-2
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesisLanguage structure synthesisCoding guidelines
![Page 3: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/3.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-3
Objectives
After completing this chapter, you will be able to:Describe ASIC/VLSI design flowUnderstand the RTL and physical synthesis flowUnderstand the principle of logic synthesis toolsUnderstand issues of language translationDescribe the considerations of clock signalsDescribe the considerations of reset signalsDescribe the partition issues for synthesis
![Page 4: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/4.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-4
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesisLanguage structure synthesisCoding guidelines
![Page 5: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/5.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-5
An ASIC/VLSI Design Flow
![Page 6: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/6.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-6
An RTL Synthesis Flow
![Page 7: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/7.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-7
A Physical Synthesis Flow
![Page 8: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/8.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-8
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesisLanguage structure synthesisCoding guidelines
![Page 9: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/9.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-9
Logic Synthesis Environment
Design environmentDesign constraints RTL code Technology library
![Page 10: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/10.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-10
Design Environment
The process parameterstechnology libraryoperating conditions
I/O port attributes drive strength of input portcapacitive loading of output portdesign rule constraints
Statistical wire-load model pre-layout static timing analysis
![Page 11: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/11.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-11
Design ConstraintsClock signal specification
periodduty cycletransition timeskew
Delay specificationsmaximumminimum
Timing exceptionfalse pathmulticycle path
Path grouping
![Page 12: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/12.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-12
Input Delay and Output Delay
![Page 13: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/13.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-13
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesis
Architecture of synthesizersTechnology-independent logic synthesisTechnology-dependent logic synthesis
Language structure synthesisCoding guidelines
![Page 14: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/14.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-14
The Architecture of Synthesizer
![Page 15: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/15.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-15
The Architecture of Synthesizer
Front endParsing phase Elaboration phase
Back end analysis/translationlogic synthesis (logic optimization) netlist generation
![Page 16: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/16.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-16
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesis
Architecture of synthesizersTechnology-independent logic synthesisTechnology-dependent logic synthesis
Language structure synthesisCoding guidelines
![Page 17: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/17.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-17
Logic Synthesis (Logic Optimization)
Major concerns functional metric: fanin, fanout, and othersnon-functional metric: area, power, and delay
Two phases of logic synthesistechnology-independenttechnology-dependent
Library binding
![Page 18: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/18.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-18
Technology-Independent Logic Optimization
Technology-independent logic synthesisSimplificationRestructuring networkRestructuring delay
![Page 19: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/19.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-19
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesis
Architecture of synthesizersTechnology-independent logic synthesisTechnology-dependent logic synthesis
Language structure synthesisCoding guidelines
![Page 20: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/20.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-20
Technology Mapping
A two-step approachFlowMap method
![Page 21: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/21.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-21
A Two-Step Approach
Decompose the network Reduce the number of nodes
![Page 22: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/22.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-22
FlowMap Method
Break the network into LUT-sized blocksReduce the number of logic elements (LUTs)
Three LUTs are required
![Page 23: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/23.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-23
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesisLanguage structure synthesisCoding guidelines
![Page 24: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/24.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-24
Synthesis-Tool Tasks
At least perform the following critical tasksDetect and eliminate redundant logicDetect combinational feedback loopsExploit don’t-care conditionsDetect unused statesDetect and collapse equivalent statesMake state assignmentsSynthesize optimal, multilevel logic subject to constraints
![Page 25: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/25.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-25
The Key Point for Successful Logic Synthesis
Think in a hardware mind
![Page 26: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/26.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-26
Language Structure Translations
Synthesizable operatorsSynthesizable constructs
assignment statementif .. else statementcase statementloop structuresalways statement
Memory synthesis approaches
![Page 27: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/27.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-27
Synthesizable Operators
![Page 28: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/28.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-28
Synthesizing if-else Statements
For combinational logicCompletely specified?
For sequential logicCompletely specified?
always @(enable or data) if (enable) y = data; //infer a latch
always @(posedge clk) if (enable) y <= data;else y <= y; // a redundant expression
![Page 29: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/29.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-29
Synthesizing case Statements
A case statement Infers a multiplexerCompletely specified?
![Page 30: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/30.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-30
Latch Inference --- Incomplete if-else Statements
// creating a latch module latch_infer_if(enable, data, y);…reg y;
always @(enable or data) if (enable) y = data; // infer a latch for y
![Page 31: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/31.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-31
Coding style
Avoid using any latches in a designAssign outputs for all input conditions to avoid inferred latchesFor example:
always @(enable or data) y = 1’b0; // initialize y to its initial value.if (enable) y = data;
![Page 32: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/32.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-32
Latch Inference --- Incomplete case Statements
// Creating a latchmodule latch_infer_case(select, data, y);…output reg y; always @(select or data)
case (select)2'b00: y = data[select];2'b01: y = data[select];2'b10: y = data[select];// default: y = 2'b11;
endcase
![Page 33: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/33.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-33
Igncored Delay Values --- An Incorrect Version
// a four phase clock example --- incorrectmodule four_phase_clock_wrong(clk, phase_out);…always @(posedge clk) begin
phase_out <= 4'b0000;phase_out <= #5 4'b0001;phase_out <= #10 4'b0010;phase_out <= #15 4'b0100;phase_out <= #20 4'b1000;
end
phase_out[3:0]1000
clk
![Page 34: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/34.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-34
Ignored Delay Values --- A Correct Version
// a four phase clock example --- synthesizable version…output reg [3:0] phase_out; // phase outputalways @(posedge clk)
case (phase_out)4'b0000: phase_out <= 4'b0001;4'b0001: phase_out <= 4'b0010;4'b0010: phase_out <= 4'b0100;4'b0100: phase_out <= 4'b1000;default: phase_out <= 4'b0000;
endcase
![Page 35: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/35.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-35
Mixed Use of posedge/level Signals
// the mixed usage of posedge/negedge signal// The result cannot be synthesizedmodule DFF_bad (clk, reset, d, q);…// the body of DFFalways @(posedge clk or reset)begin
if (reset) q <= 1'b0;else q <= d;
end
Error: Can't mix posedge/negedge use with plain signal references.
![Page 36: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/36.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-36
Mixed Use of posedge/negedge Signals
// the mixed usage of posedge/negedge signalmodule DFF_good (clk, reset_n, d, q);…// the body of DFFalways @(posedge clk or negedge reset_n)begin
if (!reset_n) q <= 1'b0;else q <= d;
end q
RQD qd
reset_n
clk
![Page 37: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/37.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-37
Loop Structures// an N-bit adder using for loop.module nbit_adder_for( x, y, c_in, sum, c_out); parameter N = 4; // default sizeinput [N-1:0] x, y; …integer i;…always @(x or y or c_in) begin
co = c_in;for (i = 0; i < N; i = i + 1)
{co, sum[i]} = x[i] + y[i] + co;c_out = co;
end
![Page 38: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/38.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-38
Loop Structures --- An Incorrectly Synthesizable Example
// a multiple cycle example --- This is an incorrect version.…parameter N = 8;parameter M = 4;input clk, reset_n;…integer i;// what does the following statement do?always @(posedge clk or negedge reset_n)begin
if (!reset_n) total <= 0; else for (i = 0; i < M; i = i + 1)
if (data_a[i] == 1) total <= total + data_b;end Q: Why the synthesized result is like this?
Try to explain it!
![Page 39: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/39.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-39
Memory Synthesis Approaches
A flip-flop 10 to 20 times the area of a 6-transistor static RAM cell
Random logic using flip-flops or latchesIndependent of any softwareIndependent of the type of ASICInefficient in terms of area
Register files in datapathsuse a synthesis directivehand instantiation
![Page 40: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/40.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-40
Memory Synthesis Approaches
RAM standard componentssupplied by an ASIC vendordepend on the technology
RAM compilersthe most area-efficient approach
![Page 41: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/41.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-41
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesisLanguage structure synthesisCoding guidelines
Guidelines for ClocksGuidelines for ResetsPartitioning for Synthesis
![Page 42: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/42.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-42
Coding guidelines
Coding Guidelines for SynthesisGuidelines for ClocksGuidelines for ResetsPartitioning for Synthesis
![Page 43: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/43.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-43
Coding Guidelines for Synthesis
Goals of coding guidelinesTestabilityPerformanceSimplification of static timing analysisMatching gate-level behavior with that of the original RTL codes
![Page 44: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/44.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-44
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesisLanguage structure synthesisCoding guidelines
Guidelines for ClocksGuidelines for ResetsPartitioning for Synthesis
![Page 45: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/45.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-45
Guidelines for Clocks
Using single global clockAvoiding using gated clocksAvoiding mixed use of both positive and negative edge-triggered flip-flopsAvoiding using internally generated clock signals
![Page 46: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/46.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-46
Guidelines for Clocks
![Page 47: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/47.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-47
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesisLanguage structure synthesisCoding guidelines
Guidelines for ClocksGuidelines for ResetsPartitioning for Synthesis
![Page 48: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/48.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-48
Guidelines for Resets
The basic design issues of resets areAsynchronous or synchronous?An internal or external power-on reset?More than one reset, hard vs. soft reset?
![Page 49: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/49.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-49
Guidelines for Resets
The basic writing styles:
The reset signal should be a direct clear of all flip-flops
always @(posedge clk or posedge reset)if (reset) …..else …..
always @(posedge clk)if (reset) …..else …..
Asynchronous reset Synchronous reset
![Page 50: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/50.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-50
Guidelines for Resets
Asynchronous resetHard to implementDoes not require a free-running clockDoes not affect flip flop data timingMakes STA more difficultMakes the automatic insertion of test structure more difficult
Synchronous reseteasy to implementRequires a free-running clock
![Page 51: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/51.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-51
Guidelines for Resets
Avoid internally generated conditional resets
When a conditional reset is required:
always @(posedge gate or negedge reset_n or posedge timer_load_clear)if (!reset_n || timer_load_clear) timer_load <= 1’b0;else timer_load <= 1’b1;
assign timer_load_reset = !reset_n || timer_load_clear;always @(posedge gate or posedge timer_load_reset)
if (timer_load_reset) timer_load <= 1’b0;else timer_load <= 1’b1;
![Page 52: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/52.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-52
Syllabus
ObjectivesDesign flowsDesign environment and constraintsLogic synthesisLanguage structure synthesisCoding guidelines
Guidelines for ClocksGuidelines for ResetsPartitioning for Synthesis
![Page 53: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/53.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-53
Partitioning for Synthesis
Keep related logic within the same module
![Page 54: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/54.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-54
Partitioning for Synthesis
Register all outputs
Separating structural logic from random logic
![Page 55: Chapter 12: Synthesis - wiley.com · Describe ASIC/VLSI design flow Understand the RTL and physical synthesis flow Understand the principle of logic synthesis tools](https://reader031.vdocuments.mx/reader031/viewer/2022013117/5b780f807f8b9a8f698e3b76/html5/thumbnails/55.jpg)
Chapter 12: Synthesis
Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008-2010, John Wiley 12-55
Partitioning for Synthesis
Maintaining the original hierarchy