+ All Categories
Home > Documents > Synthesis and Timing Module11

Synthesis and Timing Module11

Date post: 14-Dec-2015
Category:
Upload: roy-olaya-reyes
View: 18 times
Download: 0 times
Share this document with a friend
Description:
VHDL synthesis and timing module
28
Jim Duckworth, WPI Synthesis and Timing - Module 11 1 Synthesis and Timing Module 11
Transcript
Page 1: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 111

Synthesis and Timing

Module 11

Page 2: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 112

Overview

• Metastability

• Constraints

• Clock Skew

• Core Generator

Page 3: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 113

Metastability

• Flip-flops may go metastable if input signals do not meet

setup and hold specifications relative to clock signal

• Rules:

– Input only drives one FF

– Add 2-FF synchronizer

IF clk’EVENT AND clk = ‘1’ THEN

input_d <= input;

input_dd <= input_d;

CLK

D

Q

Page 4: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 114

Creating one clk pulse synchronizer

• Sometimes an input signal is asynchronous and is much longer than clock period

• Add 3FF synchronizer and generate single pulse

IF clk’EVENT AND clk = ‘1’ THEN

input_d <= input;

input_dd <= input_d;

input_ddd <= input_dd;

input_pulse <= input_dd & NOT input_ddd;

always @ (reset, clk)

begin

input_d <= input;

input_dd <= input_d;

input_ddd <= input_dd;

input_pulse <= input_dd & ~input_ddd;

Page 5: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 115

Timing Constraints

• Used to guide the synthesis tools

• Example 32-bit counter - no constraints (speed grades -4 and -5)======================================================

Advanced HDL Synthesis Report

Macro Statistics

# Counters : 1

32-bit up counter : 1

======================================================

Timing Summary:

---------------

Speed Grade: -4

Minimum period: 6.680ns (Maximum Frequency: 149.703MHz)

Minimum input arrival time before clock: No path found

Maximum output required time after clock: 8.094ns

Maximum combinational path delay: No path found

===============================================

Speed Grade: -5

Minimum period: 5.767ns (Maximum Frequency: 173.400MHz)

Page 6: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 116

Adding timing constraint

• Add to UCF file:– NET "clk" PERIOD = 6ns HIGH 50%;

WARNING:Par:62 - Your design did not meet timing.

-------------------------------------------------------------------------------------------

Constraint | Check | Worst Case | Best Case | Timing |Timing | Slack | Achievable |

Errors | Score

-------------------------------------------------------------------------------------------

* NET "clk_BUFGP/IBUFG" PERIOD = 6 ns HIGH | SETUP| -0.456ns | 6.456ns | 9| 1430

50% | HOLD | 2.432ns | | 0| 0

-------------------------------------------------------------------------------------------

1 constraint not met.

Page 7: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 117

Try relaxing constraint

• NET "clk" PERIOD = 6.5ns HIGH 50%;

----------------------------------------------------------------------------------

Constraint | Check| Worst Case | Best Case | Timing | Timing | Slack| Achievable |

Errors | Score

----------------------------------------------------------------------------------

NET "clk_BUFGP/IBUFG" PERIOD = 6.5 ns HIG | SETUP| 0.203ns| 6.297ns| 0| 0

H 50% | HOLD | 2.280ns| | 0| 0

----------------------------------------------------------------------------------

All constraints were met.

• Also see Timing Constraint User Guide

• Examples:

NET ‘abc’ OFFSET = OUT xx ns AFTER ‘clk’;

NET ‘def’ OFFSET = IN xx ns BEFORE ‘clk’;

Page 8: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 118

Clock Skew

• The difference between the time a clock signal arrives at

the source flip-flop in a path and the time it arrives at the

destination flip-flop.

– Misalignment of clock edges

– Degrades (reduces) time for flip-flop to flip-flop timing

• Can be caused by different things but wire interconnect

delays are the main cause inside FPGAs

– There are fast dedicated clock circuits and slower data paths

Page 9: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 119

Old method of deriving slower clocks

Page 10: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1110

WARNING:Route:455 - CLK Net:clk_1Hz may have excessive

skew because 0 CLK pins and 1 NON_CLK pins failed to

route using a CLK template.

Page 11: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1111

Synthesis uses two clock signals

Page 12: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1112

Two clock signals – not so good!

Page 13: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1113

Modify to only use one clock signal

Page 14: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1114

Clock signals use dedicated lines

Page 15: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1115

Clock drives all flip-flops

Page 16: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1116Jim Duckworth, WPI 16

Crossing Clock Domains - FIFO

ADCFIFO

400 MHz

200 MHz

SRAM

FPGA

Page 17: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1117

Coregen – create new module

Jim Duckworth, WPI 17

Page 18: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1118

FIFO Generator

Jim Duckworth, WPI VHDL for Modeling - Module 1018

Page 19: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1119

Select Options (1 of 6)

Jim Duckworth, WPI 19

Page 20: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1120

Specifying Write and Read widths

Jim Duckworth, WPI 20

Page 21: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1121

Summary – uses one Block RAM

Jim Duckworth, WPI 21

Page 22: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1122

Core is added to Project

Jim Duckworth, WPI 22

Page 23: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1123

Instantiation Template is Provided

Jim Duckworth, WPI 23

Page 24: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1124

Simple Top Level to Demonstrate Use

Jim Duckworth, WPI VHDL for Modeling - Module 1024

Page 25: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1125

FIFO added – RTL Schematic

Jim Duckworth, WPI 25

Page 26: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1126

FIFO added – Technology Schematic

Jim Duckworth, WPI 26

Page 27: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1127

Simple Test Bench to Show Operation

Jim Duckworth, WPI 27

Page 28: Synthesis and Timing Module11

Jim Duckworth, WPI Synthesis and Timing - Module 1128

FIFO Simulation

Jim Duckworth, WPI 28


Recommended