SlideShare uma empresa Scribd logo
1 de 29
Coding Style for Good
Synthesis
VinChip Systems
Agenda
 Basic Concepts of Logic Synthesis
 Synthesizable Verilog constructs
 Coding for Synthesis
 Conclusion
Basic Concepts of Logic Synthesis
 Converting a high-level description of design into an optimized gate-level representation.
 It uses Standard Cell Library
 Basic logic elements
 and
 or
 inverter (not),
 Nand, nor …
 Macro Cells like
 adder, multiplexers,
 memory, and special flip-flops.
Logic Synthesis
Synthesis = Translation + Optimization +Mapping
Limitation on Manual Design
 Error-Prone:
 For Large Designs, We can not determine the missed gates
 Hard to Verify:
 Designer would never sure about the conversion until gate level circuit implemented
and tested
 Time-Consuming:
 Time Consuming process to convert High level design into gate level design
 Hard to reuse:
 design reuse was not possible
 Impossible to optimize globally :
 Not Possible in global optimization – Each designed might designed in different
method.
Logic Synthesis
 There are two parts
 Translation
 Performs architectural optimizations and then creates an internal representation of the
design.
 Usually this is automatically done while design is imported to the synthesis tool.
 Optimization
 The resulting netlist to fit constraints on speed (timing constraint) and area (area
constraint)
 Most critical part of the process
 Logic optimization + Gate optimization
Synthesis Flow
RTL Source :
Logic Implemented in RTL
No Timing Information
HDL – Verilog or VHDL
Constraints
Timing Specification
Maximum Fan-Out
Maximum Capacitance
Port delays ..
Technology Library
Target Library – Target components
Link Library – Resolve references
Synthetic Library –Adders ..
GTECH Library – Tech Independent
Coding Guidelines for Synthesis
 Goals of coding guidelines
 Testability
 Performance
 Simplification of static timing analysis
 Matching gate-level behavior with that of the original RTL codes
Synthesizable Verilog constructs
 All the Verilog constructs are not synthesizable
 Only a subset of Verilog constructs can be synthesized
HDL Compiler Unsupported
 delay
 initial
 Repeat , wait
 fork … join
 event
 Assign, deassign – reg data type
 Force - release
 time
 triand, trior, tri1, tri0, trireg
 nmos, pmos, cmos, rnmos,
 rpmos, rcmos
 pullup, pulldown
 rtran, tranif0, tranif1, rtranif0,
 case identity and not identity
operators
Synthesizable Verilog Constructs
 Ports - Input , output , inouts
 Parameters - parameter
 Module definitions
 Signals and Variables
 Instantiations .
 Procedural block ,
 Data flow
Language Structure Translations
 Synthesizable operators
 Synthesizable constructs
 assignment statement
 if .. else statement
 case statement
 loop structures
 always statement
 memory synthesis approaches
Blocking and Nonblocking Assignments
 Two types of assignments
 Blocking assignments execute in sequential order.
 Nonblocking assignments execute Concurrently.
 Always use non blocking assignments in Sequential blocks
 Otherwise, the simulation behavior of the RTL and gate-level designs may
differ.
 Specifically, blocking assignments can lead to race conditions and
unpredictable behavior in simulations.
Blocking and Nonblocking Assignments
 Use non-blocking assignments to model sequential logic
 Use blocking assignments to model combinational logic
 Do not mix blocking and non-blocking assignments in the same always block.
 Do not make assignments to the same variable from more than one always block.
if- else statements
Synthesizing if-else Statements
For combinational logic
Completely specified?
For sequential logic
Completely 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
Synthesizing case Statements
 A case statement
 Infers a multiplexer
 Completely specified?
Latch Inference - Incomplete case Statements
 // Creating a latch
module latch_infer_case(select, data, y);
input select;
output y;
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
 No Default Statement – Infers a latch
 // Correct code
module latch_infer_case(select, data, y);
input select;
output y;
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
Mixed Use of posedge/level Signals
 // the mixed usage of posedge/negedge
signal
//The result cannot be synthesized
module DFF (clk, reset, d, q);
…
// the body of DFF
always @(posedge clk or reset)
begin
if (reset) q <= 1'b0;
else q <= d;
end
 // the mixed usage of posedge/negedge
signal
//The result can be synthesized
module DFF (clk, reset, d, q);
…
// the body of DFF
always @(posedge clk or negedge reset)
begin
if (reset) q <= 1'b0;
else q <= d;
end
Sensitivity List
 For combinational blocks
 The sensitivity list must include every signal that is read by the process.
 Signals that appear on the right side of an assign statement
 Signals that appear in a conditional expression
Sensitivity List
 For sequential blocks
 The sensitive list must include the clock signal.
 If an asynchronous reset signal is used, include reset in the sensitivity list.
 Use only necessary signals in the sensitivity lists
 Unnecessary signals in the sensitivity list slow down simulation
for Loop
 Provide a shorter way to express a series of statements.
 Loop index variables must be integer type.
 Step, start & end value must be constant.
 In synthesis, for loops are “unrolled”, and then synthesized.
Memory Synthesis Approaches
 A flip-flop
 10 to 20 times the area of a 6-transistor static RAM cell
 Inefficient in terms of area
 Register files in datapaths
 use a synthesis directive
 hand instantiation
Memory Synthesis Approaches
 RAM standard components
 supplied by an ASIC vendor
 depend on the technology
 RAM compilers
 The most area-efficient approach
Guidelines for Clocks
 Using single global clock
 Avoiding using gated clocks
 Avoiding mixed use of both positive and negative edge-triggered flip-flops
 Avoiding using internally generated clock signals
Guidelines for Resets
 The basic design issues of resets are
 Asynchronous or synchronous?
 An internal or external power-on reset?
 More than one reset, hard vs. soft reset?
 Asynchronous reset
 Hard to implement and Does not require a free-running clock
 Makes STA more difficult
 Makes the automatic insertion of test structure more difficult
 Synchronous reset
 easy to implement
 Requires a free-running clock
Guidelines for Resets
 The basic writing styles
 The reset signal should be a direct clear of all flip-flops
Partitioning for Synthesis
 Keep related logic within the same module
Cntd..
 For good synthesis
 Register all outputs
 Locate related combinational logic in same module
 Do not use Glue logic in top module
 Separate module that have different design goals
Coding style for good synthesis

Mais conteúdo relacionado

Mais procurados

Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesE2MATRIX
 
ASIC Design Flow | Physical Design | VLSI
ASIC Design Flow | Physical Design | VLSI ASIC Design Flow | Physical Design | VLSI
ASIC Design Flow | Physical Design | VLSI Jayant Suthar
 
fpga programming
fpga programmingfpga programming
fpga programmingAnish Gupta
 
Logic synthesis using Verilog HDL
Logic synthesis using Verilog HDLLogic synthesis using Verilog HDL
Logic synthesis using Verilog HDLanand hd
 
SRAM read and write and sense amplifier
SRAM read and write and sense amplifierSRAM read and write and sense amplifier
SRAM read and write and sense amplifierSoumyajit Langal
 
How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?Sameh El-Ashry
 
Fpga(field programmable gate array)
Fpga(field programmable gate array) Fpga(field programmable gate array)
Fpga(field programmable gate array) Iffat Anjum
 
Verilog Tasks & Functions
Verilog Tasks & FunctionsVerilog Tasks & Functions
Verilog Tasks & Functionsanand hd
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-ExpressDVClub
 
Synchronous and asynchronous clock
Synchronous and asynchronous clockSynchronous and asynchronous clock
Synchronous and asynchronous clockNallapati Anindra
 

Mais procurados (20)

Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
 
ASIC Design Flow | Physical Design | VLSI
ASIC Design Flow | Physical Design | VLSI ASIC Design Flow | Physical Design | VLSI
ASIC Design Flow | Physical Design | VLSI
 
Vlsi Synthesis
Vlsi SynthesisVlsi Synthesis
Vlsi Synthesis
 
fpga programming
fpga programmingfpga programming
fpga programming
 
Logic synthesis using Verilog HDL
Logic synthesis using Verilog HDLLogic synthesis using Verilog HDL
Logic synthesis using Verilog HDL
 
Verilog
VerilogVerilog
Verilog
 
Vlsi design flow
Vlsi design flowVlsi design flow
Vlsi design flow
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
SRAM read and write and sense amplifier
SRAM read and write and sense amplifierSRAM read and write and sense amplifier
SRAM read and write and sense amplifier
 
Vlsi
VlsiVlsi
Vlsi
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?
 
Fpga(field programmable gate array)
Fpga(field programmable gate array) Fpga(field programmable gate array)
Fpga(field programmable gate array)
 
Altera flex
Altera flexAltera flex
Altera flex
 
Logic Synthesis
Logic SynthesisLogic Synthesis
Logic Synthesis
 
Verilog Tasks & Functions
Verilog Tasks & FunctionsVerilog Tasks & Functions
Verilog Tasks & Functions
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-Express
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
ASIC DESIGN FLOW
ASIC DESIGN FLOWASIC DESIGN FLOW
ASIC DESIGN FLOW
 
Synchronous and asynchronous clock
Synchronous and asynchronous clockSynchronous and asynchronous clock
Synchronous and asynchronous clock
 

Destaque

I Never Thought I Would Grow Up to be This Formal
I Never Thought I Would Grow Up to be This FormalI Never Thought I Would Grow Up to be This Formal
I Never Thought I Would Grow Up to be This FormalDVClub
 
Cadcam considerations about fms
Cadcam considerations about fmsCadcam considerations about fms
Cadcam considerations about fmsSudhir Reddy
 
Rtl design optimizations and tradeoffs
Rtl design optimizations and tradeoffsRtl design optimizations and tradeoffs
Rtl design optimizations and tradeoffsGrace Abraham
 
timing-analysis
 timing-analysis timing-analysis
timing-analysisVimal Raj
 
Group Technology (Cell Manufacturing)
Group Technology (Cell Manufacturing)Group Technology (Cell Manufacturing)
Group Technology (Cell Manufacturing)Aishwary Kumar Gupta
 
Design and implementation of cmos rail to-rail operational amplifiers
Design and implementation of cmos rail to-rail operational amplifiersDesign and implementation of cmos rail to-rail operational amplifiers
Design and implementation of cmos rail to-rail operational amplifiersGrace Abraham
 
Static Timing Analysis
Static Timing AnalysisStatic Timing Analysis
Static Timing Analysisshobhan pujari
 
Flexible Manufacturing System (FMS)
Flexible Manufacturing System  (FMS)Flexible Manufacturing System  (FMS)
Flexible Manufacturing System (FMS)Prasanna3804
 
Lecture 25 flexible manufacturing systems [compatibility mode]
Lecture 25 flexible manufacturing systems [compatibility mode]Lecture 25 flexible manufacturing systems [compatibility mode]
Lecture 25 flexible manufacturing systems [compatibility mode]Dr.Muftooh Ur Rehman Siddiqi
 
Group technology by lathu
Group technology by lathuGroup technology by lathu
Group technology by lathumidetstudents
 
Formal Verification Techniques
Formal Verification TechniquesFormal Verification Techniques
Formal Verification TechniquesDVClub
 
Flexible manufacturing systems (FMS)
Flexible manufacturing systems (FMS)Flexible manufacturing systems (FMS)
Flexible manufacturing systems (FMS)SERCOD
 

Destaque (20)

I Never Thought I Would Grow Up to be This Formal
I Never Thought I Would Grow Up to be This FormalI Never Thought I Would Grow Up to be This Formal
I Never Thought I Would Grow Up to be This Formal
 
Cadcam considerations about fms
Cadcam considerations about fmsCadcam considerations about fms
Cadcam considerations about fms
 
group technology
group technologygroup technology
group technology
 
FIFODC
FIFODCFIFODC
FIFODC
 
VLSI_ASIC_Training_Summer_Offer
VLSI_ASIC_Training_Summer_OfferVLSI_ASIC_Training_Summer_Offer
VLSI_ASIC_Training_Summer_Offer
 
Rtl design optimizations and tradeoffs
Rtl design optimizations and tradeoffsRtl design optimizations and tradeoffs
Rtl design optimizations and tradeoffs
 
Synthesis
SynthesisSynthesis
Synthesis
 
timing-analysis
 timing-analysis timing-analysis
timing-analysis
 
Fms (1)
Fms (1)Fms (1)
Fms (1)
 
FIFOPt
FIFOPtFIFOPt
FIFOPt
 
Group Technology (Cell Manufacturing)
Group Technology (Cell Manufacturing)Group Technology (Cell Manufacturing)
Group Technology (Cell Manufacturing)
 
Design and implementation of cmos rail to-rail operational amplifiers
Design and implementation of cmos rail to-rail operational amplifiersDesign and implementation of cmos rail to-rail operational amplifiers
Design and implementation of cmos rail to-rail operational amplifiers
 
Static Timing Analysis
Static Timing AnalysisStatic Timing Analysis
Static Timing Analysis
 
Flexible Manufacturing System (FMS)
Flexible Manufacturing System  (FMS)Flexible Manufacturing System  (FMS)
Flexible Manufacturing System (FMS)
 
Lecture 25 flexible manufacturing systems [compatibility mode]
Lecture 25 flexible manufacturing systems [compatibility mode]Lecture 25 flexible manufacturing systems [compatibility mode]
Lecture 25 flexible manufacturing systems [compatibility mode]
 
Cellular manufacturing
Cellular manufacturingCellular manufacturing
Cellular manufacturing
 
8 bit alu design
8 bit alu design8 bit alu design
8 bit alu design
 
Group technology by lathu
Group technology by lathuGroup technology by lathu
Group technology by lathu
 
Formal Verification Techniques
Formal Verification TechniquesFormal Verification Techniques
Formal Verification Techniques
 
Flexible manufacturing systems (FMS)
Flexible manufacturing systems (FMS)Flexible manufacturing systems (FMS)
Flexible manufacturing systems (FMS)
 

Semelhante a Coding style for good synthesis

Verilog Lecture2 thhts
Verilog Lecture2 thhtsVerilog Lecture2 thhts
Verilog Lecture2 thhtsBéo Tú
 
24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdf24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdfFrangoCamila
 
dokumen.tips_verilog-basic-ppt.pdf
dokumen.tips_verilog-basic-ppt.pdfdokumen.tips_verilog-basic-ppt.pdf
dokumen.tips_verilog-basic-ppt.pdfVelmathi Saravanan
 
Verilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdfVerilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdfsagar414433
 
Verilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdfVerilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdfsagar414433
 
EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5PRADEEP
 
SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2alhadi81
 
Pragmatic Optimization in Modern Programming - Ordering Optimization Approaches
Pragmatic Optimization in Modern Programming - Ordering Optimization ApproachesPragmatic Optimization in Modern Programming - Ordering Optimization Approaches
Pragmatic Optimization in Modern Programming - Ordering Optimization ApproachesMarina Kolpakova
 
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerPragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerMarina Kolpakova
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Optimization in Programming languages
Optimization in Programming languagesOptimization in Programming languages
Optimization in Programming languagesAnkit Pandey
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 

Semelhante a Coding style for good synthesis (20)

2nd presantation
2nd presantation2nd presantation
2nd presantation
 
Verilog Lecture2 thhts
Verilog Lecture2 thhtsVerilog Lecture2 thhts
Verilog Lecture2 thhts
 
24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdf24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdf
 
Joel Falcou, Boost.SIMD
Joel Falcou, Boost.SIMDJoel Falcou, Boost.SIMD
Joel Falcou, Boost.SIMD
 
dokumen.tips_verilog-basic-ppt.pdf
dokumen.tips_verilog-basic-ppt.pdfdokumen.tips_verilog-basic-ppt.pdf
dokumen.tips_verilog-basic-ppt.pdf
 
bluespec talk
bluespec talkbluespec talk
bluespec talk
 
Verilog Cheat sheet-2 (1).pdf
Verilog Cheat sheet-2 (1).pdfVerilog Cheat sheet-2 (1).pdf
Verilog Cheat sheet-2 (1).pdf
 
Verilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdfVerilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdf
 
Verilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdfVerilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdf
 
EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5
 
Matopt
MatoptMatopt
Matopt
 
SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2
 
verilog ppt .pdf
verilog ppt .pdfverilog ppt .pdf
verilog ppt .pdf
 
Pragmatic Optimization in Modern Programming - Ordering Optimization Approaches
Pragmatic Optimization in Modern Programming - Ordering Optimization ApproachesPragmatic Optimization in Modern Programming - Ordering Optimization Approaches
Pragmatic Optimization in Modern Programming - Ordering Optimization Approaches
 
Crash course in verilog
Crash course in verilogCrash course in verilog
Crash course in verilog
 
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerPragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Tutor1
Tutor1Tutor1
Tutor1
 
Optimization in Programming languages
Optimization in Programming languagesOptimization in Programming languages
Optimization in Programming languages
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 

Mais de Vinchipsytm Vlsitraining (11)

Verilog Tasks and functions
Verilog Tasks and functionsVerilog Tasks and functions
Verilog Tasks and functions
 
Hard ip based SoC design
Hard ip based SoC designHard ip based SoC design
Hard ip based SoC design
 
Optimizing for low power in embedded mcu designs
Optimizing for low power in embedded mcu designsOptimizing for low power in embedded mcu designs
Optimizing for low power in embedded mcu designs
 
system verilog
system verilogsystem verilog
system verilog
 
Chip packaging technology
Chip packaging technologyChip packaging technology
Chip packaging technology
 
USB 2.0
USB 2.0USB 2.0
USB 2.0
 
SOC design
SOC design SOC design
SOC design
 
Axi
AxiAxi
Axi
 
Usb 2
Usb 2Usb 2
Usb 2
 
Low power vlsi design
Low power vlsi designLow power vlsi design
Low power vlsi design
 
Verification strategies
Verification strategiesVerification strategies
Verification strategies
 

Último

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Coding style for good synthesis

  • 1. Coding Style for Good Synthesis VinChip Systems
  • 2. Agenda  Basic Concepts of Logic Synthesis  Synthesizable Verilog constructs  Coding for Synthesis  Conclusion
  • 3. Basic Concepts of Logic Synthesis  Converting a high-level description of design into an optimized gate-level representation.  It uses Standard Cell Library  Basic logic elements  and  or  inverter (not),  Nand, nor …  Macro Cells like  adder, multiplexers,  memory, and special flip-flops.
  • 4. Logic Synthesis Synthesis = Translation + Optimization +Mapping
  • 5. Limitation on Manual Design  Error-Prone:  For Large Designs, We can not determine the missed gates  Hard to Verify:  Designer would never sure about the conversion until gate level circuit implemented and tested  Time-Consuming:  Time Consuming process to convert High level design into gate level design  Hard to reuse:  design reuse was not possible  Impossible to optimize globally :  Not Possible in global optimization – Each designed might designed in different method.
  • 6. Logic Synthesis  There are two parts  Translation  Performs architectural optimizations and then creates an internal representation of the design.  Usually this is automatically done while design is imported to the synthesis tool.  Optimization  The resulting netlist to fit constraints on speed (timing constraint) and area (area constraint)  Most critical part of the process  Logic optimization + Gate optimization
  • 7. Synthesis Flow RTL Source : Logic Implemented in RTL No Timing Information HDL – Verilog or VHDL Constraints Timing Specification Maximum Fan-Out Maximum Capacitance Port delays .. Technology Library Target Library – Target components Link Library – Resolve references Synthetic Library –Adders .. GTECH Library – Tech Independent
  • 8. Coding Guidelines for Synthesis  Goals of coding guidelines  Testability  Performance  Simplification of static timing analysis  Matching gate-level behavior with that of the original RTL codes
  • 9. Synthesizable Verilog constructs  All the Verilog constructs are not synthesizable  Only a subset of Verilog constructs can be synthesized
  • 10. HDL Compiler Unsupported  delay  initial  Repeat , wait  fork … join  event  Assign, deassign – reg data type  Force - release  time  triand, trior, tri1, tri0, trireg  nmos, pmos, cmos, rnmos,  rpmos, rcmos  pullup, pulldown  rtran, tranif0, tranif1, rtranif0,  case identity and not identity operators
  • 11. Synthesizable Verilog Constructs  Ports - Input , output , inouts  Parameters - parameter  Module definitions  Signals and Variables  Instantiations .  Procedural block ,  Data flow
  • 12. Language Structure Translations  Synthesizable operators  Synthesizable constructs  assignment statement  if .. else statement  case statement  loop structures  always statement  memory synthesis approaches
  • 13. Blocking and Nonblocking Assignments  Two types of assignments  Blocking assignments execute in sequential order.  Nonblocking assignments execute Concurrently.  Always use non blocking assignments in Sequential blocks  Otherwise, the simulation behavior of the RTL and gate-level designs may differ.  Specifically, blocking assignments can lead to race conditions and unpredictable behavior in simulations.
  • 14. Blocking and Nonblocking Assignments  Use non-blocking assignments to model sequential logic  Use blocking assignments to model combinational logic  Do not mix blocking and non-blocking assignments in the same always block.  Do not make assignments to the same variable from more than one always block.
  • 15. if- else statements Synthesizing if-else Statements For combinational logic Completely specified? For sequential logic Completely 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
  • 16. Synthesizing case Statements  A case statement  Infers a multiplexer  Completely specified?
  • 17. Latch Inference - Incomplete case Statements  // Creating a latch module latch_infer_case(select, data, y); input select; output y; 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  No Default Statement – Infers a latch  // Correct code module latch_infer_case(select, data, y); input select; output y; 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
  • 18. Mixed Use of posedge/level Signals  // the mixed usage of posedge/negedge signal //The result cannot be synthesized module DFF (clk, reset, d, q); … // the body of DFF always @(posedge clk or reset) begin if (reset) q <= 1'b0; else q <= d; end  // the mixed usage of posedge/negedge signal //The result can be synthesized module DFF (clk, reset, d, q); … // the body of DFF always @(posedge clk or negedge reset) begin if (reset) q <= 1'b0; else q <= d; end
  • 19. Sensitivity List  For combinational blocks  The sensitivity list must include every signal that is read by the process.  Signals that appear on the right side of an assign statement  Signals that appear in a conditional expression
  • 20. Sensitivity List  For sequential blocks  The sensitive list must include the clock signal.  If an asynchronous reset signal is used, include reset in the sensitivity list.  Use only necessary signals in the sensitivity lists  Unnecessary signals in the sensitivity list slow down simulation
  • 21. for Loop  Provide a shorter way to express a series of statements.  Loop index variables must be integer type.  Step, start & end value must be constant.  In synthesis, for loops are “unrolled”, and then synthesized.
  • 22. Memory Synthesis Approaches  A flip-flop  10 to 20 times the area of a 6-transistor static RAM cell  Inefficient in terms of area  Register files in datapaths  use a synthesis directive  hand instantiation
  • 23. Memory Synthesis Approaches  RAM standard components  supplied by an ASIC vendor  depend on the technology  RAM compilers  The most area-efficient approach
  • 24. Guidelines for Clocks  Using single global clock  Avoiding using gated clocks  Avoiding mixed use of both positive and negative edge-triggered flip-flops  Avoiding using internally generated clock signals
  • 25. Guidelines for Resets  The basic design issues of resets are  Asynchronous or synchronous?  An internal or external power-on reset?  More than one reset, hard vs. soft reset?  Asynchronous reset  Hard to implement and Does not require a free-running clock  Makes STA more difficult  Makes the automatic insertion of test structure more difficult  Synchronous reset  easy to implement  Requires a free-running clock
  • 26. Guidelines for Resets  The basic writing styles  The reset signal should be a direct clear of all flip-flops
  • 27. Partitioning for Synthesis  Keep related logic within the same module
  • 28. Cntd..  For good synthesis  Register all outputs  Locate related combinational logic in same module  Do not use Glue logic in top module  Separate module that have different design goals