0% found this document useful (0 votes)
58 views

Cad Assignment 1

This document describes an algorithm for clock mesh synthesis using a capacitance-driven mesh formation approach. The algorithm involves the following main steps: 1) Fetching capacitance coordinates and calculating min/max boundaries, 2) Iteratively dividing blocks to form the mesh structure and calculating mesh length, 3) Calculating stub lengths by finding closest mesh points to leftover capacitance coordinates. The results show a total mesh length of 31mm, stub length of 45.67mm, and total wire length of 76.67m.

Uploaded by

Suyog Chavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Cad Assignment 1

This document describes an algorithm for clock mesh synthesis using a capacitance-driven mesh formation approach. The algorithm involves the following main steps: 1) Fetching capacitance coordinates and calculating min/max boundaries, 2) Iteratively dividing blocks to form the mesh structure and calculating mesh length, 3) Calculating stub lengths by finding closest mesh points to leftover capacitance coordinates. The results show a total mesh length of 31mm, stub length of 45.67mm, and total wire length of 76.67m.

Uploaded by

Suyog Chavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

CAD for VLSI

ASSIGNMENT NO-1
Clock Mesh Synthesis

Submitted By :
13MVD0058

14

13MVD0058

ALGORITHM:
Capacitance Driven mesh Formation
Step 1: Start
Step 2: Fetch the given capacitance matrix to get co-ordinates of each capacitance
x array: All x co-ordinates of capacitance.
y array: All y co-ordinates of capacitance.
Step 3: Set Maximum and minimum co-ordinates of arrays to get the border and plot
the
Border.
Step 4: Set the counter, variables like mesh-length, stub-length.
Step 5: mesh-length calculation.
Step 6: Stub-length calculation
step 7: end of algorithm.
MATLAB CODE:
for i =1:981
x(i)=z(i,2);
y(i)=z(i,3);
end
X31=2E6;
X41=9E5;
a=min(x);
b=min(y);
c=max(x);
d=max(y);
disp(fprintf('min point (+%f %f) and max point ( %f %f ) ',a,b,c,d));
plot(x,y,'X');
xlabel('Length of chip in nm')
ylabel('Width of chip in nm');
X1=a;
X3=c;
X2=b;
X4=d;
count=600;
a=1;
X11=0;
X2=0;
matrix=[];
matrix2=[];
meshlength=0;
stublength=0;
% Mesh Formation and Mesh-length calculation module
while (count>=1)
sum=0;
sum=sumation(X1,X2,X3,X4,z);
if((sum>100)||((X3-X1)>0.3E6)||((X4-X2)>0.3E6))
%check for Target capacitance and maximum area
xnew=(X3-X1)/2;ynew=(X4-X2)/2;
plot([X1+(X3-X1)/2,X1+(X3-X1)/2],[X2,X2+(X4-X2)/2]);

13MVD0058

hold on;
meshlength=meshlength+ynew;
plot([X1,X1+(X3-X1)/2],[X2+(X4-X2)/2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+xnew;
plot([X1+(X3-X1)/2,X3],[X2+(X4-X2)/2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+(X3-xnew-X1);
plot([X1+(X3-X1)/2,X1+(X3-X1)/2],[X2+(X4-X2)/2,X4]);
hold on;
meshlength=meshlength+(X4-ynew-X2);
new_row=[X1,X2,xnew+X1,ynew+X2];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[xnew+X1,X2,(2*xnew+X1),ynew+X2];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[X1,ynew+X2,xnew+X1,(2*ynew+X2)];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[xnew+X1,ynew+X2,(2*xnew+X1),(2*ynew+X2)];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
X3=xnew;
X4=ynew;
else
[row,col] = size(matrix);
old_row=matrix(row,:);
matrix(row,:)=[];
X1=old_row(1);
X2=old_row(2);
X3=old_row(3);
X4=old_row(4);
% modify the Block co-ordinates.
count=count-1;
end
end
cout=40;
X1=1E6;X3=1.5E6;
X2=0E5;X4=2.25E5;
while cout>=1
sum=0;

13MVD0058

sum=sumation(X1,X2,X3,X4,z);
if((sum>100)||((X3-X1)>0.3E6)||((X4-X2)>0.3E6))
xnew=(X3-X1)/2;ynew=(X4-X2)/2;
plot([X1+(X3-X1)/2,X1+(X3-X1)/2],[X2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+ynew;
plot([X1,X1+(X3-X1)/2],[X2+(X4-X2)/2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+xnew;
plot([X1+(X3-X1)/2,X3],[X2+(X4-X2)/2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+(X3-xnew-X1);
plot([X1+(X3-X1)/2,X1+(X3-X1)/2],[X2+(X4-X2)/2,X4]);
hold on;
meshlength=meshlength+(X4-ynew-X2);
new_row=[X1,X2,xnew+X1,ynew+X2];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[xnew+X1,X2,(2*xnew+X1),ynew+X2];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[X1,ynew+X2,xnew+X1,(2*ynew+X2)];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[xnew+X1,ynew+X2,(2*xnew+X1),(2*ynew+X2)];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
X3=xnew;
X4=ynew;
else
[row,col] = size(matrix);
old_row=matrix(row,:);
matrix(row,:)=[];
X1=old_row(1);
X2=old_row(2);
X3=old_row(3);
X4=old_row(4);
cout=cout-1;
end
end
cout=40;
X1=1E6;X3=1.5E6;

13MVD0058

X2=2.25E5;X4=4.5E5;
while cout>=1
sum=0;
sum=sumation(X1,X2,X3,X4,z);
if((sum>100)||((X3-X1)>0.3E6)||((X4-X2)>0.3E6))
xnew=(X3-X1)/2;ynew=(X4-X2)/2;
plot([X1+(X3-X1)/2,X1+(X3-X1)/2],[X2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+ynew;
plot([X1,X1+(X3-X1)/2],[X2+(X4-X2)/2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+xnew;
plot([X1+(X3-X1)/2,X3],[X2+(X4-X2)/2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+(X3-xnew-X1);
plot([X1+(X3-X1)/2,X1+(X3-X1)/2],[X2+(X4-X2)/2,X4]);
hold on;
meshlength=meshlength+(X4-ynew-X2);
new_row=[X1,X2,xnew+X1,ynew+X2];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[xnew+X1,X2,(2*xnew+X1),ynew+X2];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[X1,ynew+X2,xnew+X1,(2*ynew+X2)];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[xnew+X1,ynew+X2,(2*xnew+X1),(2*ynew+X2)];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
X3=xnew;
X4=ynew;
else
[row,col] = size(matrix);
old_row=matrix(row,:);
matrix(row,:)=[];
X1=old_row(1);
X2=old_row(2);
X3=old_row(3);
X4=old_row(4);
cout=cout-1;
end
end

13MVD0058

cout=40;
X1=1.5E6;X3=2E6;
X2=0E5;X4=2.25E5;
while cout>=1
sum=0;
sum=sumation(X1,X2,X3,X4,z);
if((sum>100)||((X3-X1)>0.3E6)||((X4-X2)>0.3E6))
xnew=(X3-X1)/2;ynew=(X4-X2)/2;
plot([X1+(X3-X1)/2,X1+(X3-X1)/2],[X2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+ynew;
plot([X1,X1+(X3-X1)/2],[X2+(X4-X2)/2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+xnew;
plot([X1+(X3-X1)/2,X3],[X2+(X4-X2)/2,X2+(X4-X2)/2]);
hold on;
meshlength=meshlength+(X3-xnew-X1);
plot([X1+(X3-X1)/2,X1+(X3-X1)/2],[X2+(X4-X2)/2,X4]);
hold on;
meshlength=meshlength+(X4-ynew-X2);
new_row=[X1,X2,xnew+X1,ynew+X2];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[xnew+X1,X2,(2*xnew+X1),ynew+X2];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[X1,ynew+X2,xnew+X1,(2*ynew+X2)];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
new_row=[xnew+X1,ynew+X2,(2*xnew+X1),(2*ynew+X2)];
matrix = [matrix ; new_row];
matrix2 = [matrix2 ; new_row];
X3=xnew;
X4=ynew;
else
[row,col] = size(matrix);
old_row=matrix(row,:);
matrix(row,:)=[];
X1=old_row(1);
X2=old_row(2);
X3=old_row(3);
X4=old_row(4);

13MVD0058

cout=cout-1;
end
end
% Stub Formation and calculation module.
min1mat=[];
for i=1:981
min1arr=[];
minpoint=[];
for j=1:1124
if((z(i,2)<matrix2(j,3)) && (z(i,2)>matrix2(j,1)) && (z(i,3)<matrix2(j,4)) &&
(z(i,3)>matrix2(j,2)))
d1=z(i,2)-matrix2(j,1);
d2=z(i,3)-matrix2(j,2);
d3=matrix2(j,3)-z(i,2);
d4=matrix2(j,4)-z(i,3);
min1=min(min(d1,d2),min(d3,d4));
if(min1==d1)
finalcor=[matrix2(j,1),z(i,3)];
elseif(min1==d2)
finalcor=[z(i,2),matrix2(j,2)];
elseif(min1==d3)
finalcor=[matrix2(j,3),z(i,3)];
elseif(min1==d4)
finalcor=[z(i,2),matrix2(j,4)];
end
min1arr=[min1,finalcor];
min1mat=[min1mat;min1arr];
end
end
[row1,col1] = size(min1mat);
mindist=min(min1mat(1,:));
for k=1:row1
if(min1mat(k,1)==mindist)
cmin=min1mat(k,2);
dmin=min1mat(k,3);
end
end
min1mat=[];
plot([z(i,2),cmin],[z(i,3),dmin],'r');
stublength=stublength+mindist;
hold on;
end
% Function that calculates sum of capacitances in particular regions
function [ out ] = sumation( point1x,point1y,point2x,point3y,z )
sum=0;
for i =1:981

13MVD0058

if (z(i,2)>= point1x && z(i,2) <= point2x && z(i,3)>=point1y && z(i,3)<=point3y)
sum =sum + z(i,4);
end
end
out=sum;
end
RESULTS:
Total Mesh-length calculated= 3.1*10^7 nm=31 mm
Total Stub-length calculated=45.67*10^6 nm=45.67 mm
Total Wire-length=31+8.2 = 76.67 m

OUTPUT WINDOW:
1.Mesh Formation

2.Mesh Formation and Stub length calculation

13MVD0058

You might also like