Schematic Composer :: Is it possible to force users to use a

S

Suresh Jeevanandam

Guest
Hi,
I want to set a min grid for a design library and force the users to
use this as the min grid.

However, I could not find a direct solution. But, I did this by writing
a small grid checker program and call that every time user does check
and save -- by registering my callback with schRegPostCheckTrigger().

Can anybody suggest a better way of doing this, if any.

regards,
Suresh
 
We have some converted designs that use a finer grid than the standard
Cadence setting. The CAD group offered a bindkey to switch between the
finer grid and standard grid so that the motivation to stay in
"standard" grid is larger.

I am amazed at the level of accetance some designers have towards
sloppines in the way they use the tool vs. their pedantic opinions
towards use of transistors in designs.

But "forcing" such a guy to do anything is counterproductive. Offer a
macro to make it easier to clean up the mess.

Just my opinion.

--
Svenn
 
Just putting this line in the design library's libInit.il file solves
the problem.

schSetEnv("schSnapSpacing" 0.0625)

(But still user can open the options form and modify it.)

regards,
Suresh

svenn.are@bjerkem.de wrote:
We have some converted designs that use a finer grid than the standard
Cadence setting. The CAD group offered a bindkey to switch between the
finer grid and standard grid so that the motivation to stay in
"standard" grid is larger.

I am amazed at the level of accetance some designers have towards
sloppines in the way they use the tool vs. their pedantic opinions
towards use of transistors in designs.

But "forcing" such a guy to do anything is counterproductive. Offer a
macro to make it easier to clean up the mess.

Just my opinion.
 
This is the code you are looking for to disalbe
editing in the grid and snap setting fields in the options form.


unless( boundp( 'schDisplayOptionsForm )
schCreateDisplayOptionsForm( )
hiInstantiateForm( schDisplayOptionsForm )
) ;; unless
hiSetFieldEditable( schDisplayOptionsForm->gridSpacing nil )
hiSetFieldEditable( schDisplayOptionsForm->gridMultiple nil )
hiSetFieldEditable( schDisplayOptionsForm->snapSpacing nil )


Bernd

Suresh Jeevanandam wrote:
Just putting this line in the design library's libInit.il file solves
the problem.

schSetEnv("schSnapSpacing" 0.0625)

(But still user can open the options form and modify it.)

regards,
Suresh

svenn.are@bjerkem.de wrote:

We have some converted designs that use a finer grid than the standard
Cadence setting. The CAD group offered a bindkey to switch between the
finer grid and standard grid so that the motivation to stay in
"standard" grid is larger.

I am amazed at the level of accetance some designers have towards
sloppines in the way they use the tool vs. their pedantic opinions
towards use of transistors in designs.

But "forcing" such a guy to do anything is counterproductive. Offer a
macro to make it easier to clean up the mess.

Just my opinion.
 
Bernd,

Nice snippet, thanks. I agree with Svenn: you can not enforce that unless you
also distribute a solution for the existing offgrid schematics. I have put the
following in a bindkey for anyone to use.


procedure(CmSnapTo( @optional (g nil) (verbose nil) (cv nil) ) ;"fgd" argument
template removed, failed on nil cv.
let((x y xnew ynew left bottom right top box center width height
fig pointA pointB pointsnew (returnVal t))

unless(cv cv=geGetEditCellView() || error("Snap to grid:can not open cellview.") )

g||(g = ((cv->DBUPerUU && 10.0/cv->DBUPerUU)||(10.0/160)) )
g = abs(g)

verbose && info("Snapping %L %L %L to a grid of %L.\n" cv->libName cv->cellName
cv->viewName g)

verbose && info("snap instances:\n")
foreach(inst cv~>instances
x=car(inst~>xy) y=cadr(inst~>xy)
if( and( x && y && ( xnew=g*round(x/g) ) && ( ynew=g*round(y/g) )
xnew!=x || ynew!=y)
then
inst->xy=list(xnew ynew)
verbose && info("instance %s of a %s , from %L:%L to %L:%L\n" (inst~>name ||
"") (inst~>cellName || "") x y xnew ynew)
/* else warn("Instance %s %s is of type %s and will be ignored\n" (inst~>name
|| "") (inst~>cellName || "") inst~>objType) */
);fi
);foreach instance

verbose && info("snap non-pin shapes\n")
foreach(shape setof(s cv~>shapes not(s->pin))
when(shape~>points
pointsnew = nil
foreach(point shape~>points
x = car(point) y = cadr(point)
pointA = list( g*round(x/g) g*round(y/g))
pointsnew = cons(pointA pointsnew)
);foreach
shape->points=reverse(pointsnew)
);when points
when( shape~>objType=="rect"
box=shape->bBox
left=leftEdge(box)
bottom=bottomEdge(box)
right=rightEdge(box)
top=topEdge(box)
pointA=list(g*round(left/g) g*round(bottom/g))
pointB=list(g*round(right/g) g*round(top/g))
box=list(pointA pointB)
shape->bBox=box
);when rect
);foreach non-pin shape

/* caar((cv=geGetEditCellView())->terminals~>pins~>fig)->?? */
verbose && info("snap terminals' centerpoint\n")
foreach(term cv->terminals
foreach(pin term->pins
when((fig=pin->fig)&&fig->objType=="rect"
box=fig->bBox center=centerBox(box)
width=abs(leftEdge(box)-rightEdge(box))
height=abs(topEdge(box)-bottomEdge(box))
x=car(center) y=cadr(center)
when(and( x && y && ( xnew=g*round(x/g) ) && ( ynew=g*round(y/g) )
(xnew!=x || ynew!=y) )
fig->bBox=list( (xnew-width/2):(ynew-height/2)
(xnew+width/2):(ynew+height/2) )
verbose && info("pinrect of pin %s on terminal %s , moved from %L:%L to
%L:%L\n" (fig->pin->name || "") (fig->pin->term->name || "") x y xnew ynew)
);when
);when fig and rect
);foreach pins
);foreach term
;;;;;;;;;;;;;;;;;;;;;;
returnVal
);let
);proc


Bernd Fischer > wrote:
This is the code you are looking for to disalbe
editing in the grid and snap setting fields in the options form.


unless( boundp( 'schDisplayOptionsForm )
schCreateDisplayOptionsForm( )
hiInstantiateForm( schDisplayOptionsForm )
) ;; unless
hiSetFieldEditable( schDisplayOptionsForm->gridSpacing nil )
hiSetFieldEditable( schDisplayOptionsForm->gridMultiple nil )
hiSetFieldEditable( schDisplayOptionsForm->snapSpacing nil )


Bernd

Suresh Jeevanandam wrote:

Just putting this line in the design library's libInit.il file solves
the problem.

schSetEnv("schSnapSpacing" 0.0625)

(But still user can open the options form and modify it.)

regards,
Suresh

svenn.are@bjerkem.de wrote:

We have some converted designs that use a finer grid than the standard
Cadence setting. The CAD group offered a bindkey to switch between the
finer grid and standard grid so that the motivation to stay in
"standard" grid is larger.

I am amazed at the level of accetance some designers have towards
sloppines in the way they use the tool vs. their pedantic opinions
towards use of transistors in designs.

But "forcing" such a guy to do anything is counterproductive. Offer a
macro to make it easier to clean up the mess.

Just my opinion.
 

Welcome to EDABoard.com

Sponsor

Back
Top