procedure(compareMOS(layMos schMos)
prog(nil
unless( and(layMos->w schMos->w layMos->l schMos->l)
sprintf(errorC
"Nil parameter: w:%g l:%g (layout) w:%g l:%g (schematic)"
layMos->w layMos->l schMos->w schMos->l)
return(errorC)
)
when(abs(layMos->w - schMos->w * schMos->m) > 0.01 * schMos->w * schMos->m
&& abs(layMos->l - schMos->l) > 0.001 * schMos->l
sprintf(errorwl
"Gate w & l mismatch : total w:%g l:%g (layout) w:%g m:%g l:%g (schematic)"
float(layMos->w) float(layMos->l)
float(schMos->w) float(schMos->m) float(schMos->l))
return(errorwl)
)
when(abs(layMos->w - schMos->w * schMos->m) > 0.01 * schMos->w * schMos->m
sprintf(errorw "Gate w mismatch: total w:%g (layout) w:%g m:%g (schematic)"
float(layMos->w) float(schMos->w) float(schMos->m) )
return(errorw)
)
when(abs(layMos->l - schMos->l) > 0.001 * schMos->l
sprintf(errorl
"Gate length mismatch: %g layout to %g schematic"
float(layMos->l) float(schMos->l))
return(errorl)
)
return(nil)