51
Timing and Constraints “The software is the lens through which the user views the FPGA.” -Bill Carter

Timing and Constraints

  • Upload
    zayit

  • View
    74

  • Download
    0

Embed Size (px)

DESCRIPTION

Timing and Constraints. “The software is the lens through which the user views the FPGA.” -Bill Carter. Outline. Basic Timing (comb. and sequential) Block timing models LUTs BRAM Multipliers Some standard design timing tricks Constraints Timing - PowerPoint PPT Presentation

Citation preview

Page 1: Timing and Constraints

Timing and Constraints

“The software is the lens through which the user views the FPGA.”

-Bill Carter

Page 2: Timing and Constraints

Outline• Basic Timing (comb. and sequential)• Block timing models

– LUTs– BRAM– Multipliers

• Some standard design timing tricks• Constraints

– Timing– Geometric (pinning & arrangement – Combinations

• Best tools– Experience– Insight

Page 3: Timing and Constraints

Propagation Delay

LUT Tpd is called “Tilo”

Page 4: Timing and Constraints

Flop Timing

Page 5: Timing and Constraints

LUT Logic Timing Parameters

Page 6: Timing and Constraints

Basic LUT Logic Timing

Page 7: Timing and Constraints

Distributed RAM Timing Model

Page 8: Timing and Constraints

Dist. RAM Parameters

Page 9: Timing and Constraints

LUT SRL Timing Model

Page 10: Timing and Constraints

SRL Timing Parameters

Page 11: Timing and Constraints

LUT w. Carry Chain Focus

Page 12: Timing and Constraints

Carry Chain Timing

Page 13: Timing and Constraints

BRAM Timing Model

Page 14: Timing and Constraints

BRAM Timing Params

Page 15: Timing and Constraints

Multiplier Model & Delay Variation

Page 16: Timing and Constraints

Multiplier Timing Params

Page 17: Timing and Constraints

Routing Delays

• FPGA datasheets do not give details on routing delay. Hence:– Routing delays not known to designer until

design is placed and routed– Delays for early silicon are frequently still

under analysis– Software maintains best source for the real

timing

• FPGA datasheets do provide times associated with incremental silicon blocks

Page 18: Timing and Constraints

Virtex style logic tile

Comment:CLE with IMUX and OMUX is what weCall the “CLB”

Page 19: Timing and Constraints

What you may find inside the Interconnect block

Little black splotchesAre muxes or littlePIPs to make selectableAttachments….

Page 20: Timing and Constraints

Some standard timing tricks

• Load splitting (aka fanout reduction)– Identify sites driving large number of loads– Insert buffered version of the signal with multiple

buffers each handling a piece of the total load– Result usually faster

• Pipelining– Insert flip flop stages to reduce setup time restrictions– Increases clocking speed, at expense of added

latency

Page 21: Timing and Constraints

Pipelining Idea

Page 22: Timing and Constraints

Pipeline solutionEach flip stage can operate at fasterRate than before, but result goes validAfter TWO clocks.

Page 23: Timing and Constraints

Constraints

• More options than we will discuss today• High level, global constraints = big payoff• Will compare a couple of designs across

multiple constraints/combinations to illustrate:– 32 bit adder (inherent internal constraint)

• Combinational suggests tPD constraints

– 32 bit shifter (very malleable)• Sequential suggests Fmax or cycle constraints

Page 24: Timing and Constraints

Spartan 3S50TQ144

Page 25: Timing and Constraints

Big Adder

module Big_Adder1( input [31:0] A, input [31:0] B, output [32:0] SUM );

assign SUM = A + B;endmodule

Page 26: Timing and Constraints

Big Adder (unconstrained)

Page 27: Timing and Constraints

Adder with 20 nsec tPD constraint

Page 28: Timing and Constraints

Change constraint

• Original unconstrained looks ~same as the nominal 20 nsec constraint.

• 20 nsec constraint came in at 11.83 nsec.

• Push it down a little, to say 11 nsec and see what happens……

Page 29: Timing and Constraints
Page 30: Timing and Constraints

Adder with 11 ns constraint

original new

Page 31: Timing and Constraints

Timing Improvement Wizard

Screen 1

Page 32: Timing and Constraints

TIW

Screen 2

Page 33: Timing and Constraints

TIW

Screen 3

Bad news ~78% of theDelay is due to logicSuggests need for fasterpart

Page 34: Timing and Constraints

Note

Several bitsAre out of spec

Page 35: Timing and Constraints

Interesting…

Faster designMeets timeWithoutShift to right?

Comment:RecompiledOn -5 version(original =-4)

Page 36: Timing and Constraints

Comments

• Free pinning, free routing gave a result and revealed that 11.83 nsec possible

• Free pinning, constrained to 11 nsec revealed 11 nsec is NOT possible (for -4 part)~78% time spent in silicon delay

~22% time spent in routing delay

Faster part (-5) hits 11 nsec, with centered design.

Faster part won’t hit 10 nsec when constrained

(please experiment for yourself!)

Page 37: Timing and Constraints

“Big_Shifter” Codemodule Big_Shifter( input C, input ALOAD, input SI, input [31:0] D, output SO );reg [31:0] tmp; always @(posedge C or posedge ALOAD) begin if (ALOAD) tmp = D; else begin tmp = {tmp[30:0], SI}; end end assign SO = tmp[31];endmodule

Page 38: Timing and Constraints

Big Shifter (unconstrained)

Page 39: Timing and Constraints
Page 40: Timing and Constraints

Run Failed….chunk of PAR report

Page 41: Timing and Constraints

Revised Constraints

Page 42: Timing and Constraints

Revised layout

Page 43: Timing and Constraints

Constraint revised again

Page 44: Timing and Constraints

Didn’t run: PAR report advice

Page 45: Timing and Constraints

Hmmm…based on slack revise to:

Page 46: Timing and Constraints

PAR report from revised setup/hold times

Bingo!

Page 47: Timing and Constraints

clock

Clock net

Serial in

Serial out

Page 48: Timing and Constraints

From “FloorPlan IO Pre-Synthesis”

Just defining at the BANK level(versus explicit PADs)

Page 49: Timing and Constraints

Placing half pins on Bank 0

Shifted the design aroundBut still met timing…..

Page 50: Timing and Constraints

Closing Comments• The ISE constraints guide is online• It has timing, placement, grouping, relational and

synthesis level constraints for both VHDL and Verilog

• MOST designers prefer to have a design.ucf file as a separate item.

• Best results most often by writing in RTL with .ucf file

• Best approach is to experiment using small designs to see what the results are– Examine various reports– Look at “world view”– Pay attention to advice from S/W

Page 51: Timing and Constraints

Footnote: WebPack 11.1 v. of shifter