Académique Documents
Professionnel Documents
Culture Documents
Construct a zero skew rectilinear clock tree using R.Tsays exact zero skew clock routing
algorithm. Your code will take 2n-by-3 matrix as input where each row represents clock sink
information-1st column is x-co-ordinate of sink, 2nd column is y-coordinate of sink and 3rd
column is load capacitance at sink(n can be any number between 1 and 10). Your code will
form the exact zero skew clock tree and plot it. Your code should also find delay (clock
latency) from the root source to the sinks using Elmore delay model and display it in
command window (i.e. no need to do SPICE simulation to find clock latency).Your code
should also display the total length of the clock tree.
Parameters: Resistance of wire = 0.1 /unit Capacitance of wire = 0.2 F/unit
ALGORITHM:
STEP1: Forming Matrix Size
STEP2: Sorting the points in an increasing order
STEP2: Finding the Manhattan distances between each point to join the shortest path
STEP3: Joining the points and finding tapping point, capacitance at tapping point and delay
STEP4: Repeat the STEP 2 and STEP 3 till we get the single tapping point
STEP5: Finding clock latency and distance at the end
VIT,University,Vellore
Page 1
PROGRAM:
%/************ClockTreeSynthesisAssignment.m***************/
clc;
clear all;
close all;
sumz=0;
rw=0.1; % resistance in ohm
cw=0.2; % capacitance in Farad
% Formation of input Matrix
fprintf('Enter the value of number of sinks \n');
N=input('');
for i=1:N;
a(i)=0; b(i)=0; c(i)=0;
end
fprintf('Enter the value of X co-ordinates\n');
for i=1:N
a(i)=input('');
end
fprintf('Enter the value of Y co-ordinates\n');
for i=1:N;
b(i)=input('');
end
fprintf('Enter the value of Capacitances\n');
for i=1:N;
c(i)=input('');
end
d=(1:N);
% Transposing the input matrix
M=[ d' a' b' c'];
disp(M)
n=size(M,1); % calculating the size of first column
color=['b' 'r' 'g' 'm' 'y' 'k' 'c'];% Line colors
%Matrix Formation
for i =1:n
x(i)=M(i,2);
y(i)=M(i,3);
end
plot(x,y,'X');%Plot X Y coordinates
axis([0 25 0 25]);% Axis Scaling
hold on;
xlabel('Length of chip in units');
ylabel('Width of chip in units');
z=M;
z(:,5)=0; %delay of leaf nodes
VIT,University,Vellore
Page 2
Page 3
For 4 inputs
Page 4
8 12
VIT,University,Vellore
Page 5
For 10 Inputs
Page 6
10 10
12 12
14 14
16 16
18 18
VIT,University,Vellore
Page 7
20 20 10
For 14 Inputs
VIT,University,Vellore
Page 8
VIT,University,Vellore
Page 9
8 12
10 15
12 18
14
16
18
10
20
8 10
11
3 10 11
12
6 12 12
13
9 14 13
14
12 16 14
VIT,University,Vellore
Page 10
VIT,University,Vellore
Page 11