Quantcast
Channel: Cadence PCB Skill Forum
Viewing all 2132 articles
Browse latest View live

How can i read the width & the height value using skill

$
0
0

hi Dave, all

I am using 17.2 padstack editor . How can i read the width & the height value using skill code?

I am having decimal points issues on custom shapes, when ever there is a shape with X & Y size which has a 3rd decimal as "5", it either rounds up or rounds down.Our standard  setup is in 3 decimals.

Please advice how can i tackle this issue.

Thanks


How to find if Padstack is used or not?

$
0
0

How to find if the padstack in a design is used or not using Allegro Skill?

Thanks,

Kirti

Parse a line in XML format

$
0
0

When I try to parse a line in a file in XML format I get an error:

E- *Error* parseString: argument #1 should be either a string or a symbol (type template = "SS") - ("global_min_aper")

The code I am using is:

axlExportXmlDBRecords("./temp_params.txt" nil)
    minWidth_port = infile("./temp_params.txt")
        when( minWidth_port
            while( param_line = gets(param_line minWidth_port)
                    if(rexMatchp("smooth_min_gap" param_line) then
                    println(list("Global aper raw value = " param_line ))
                global_min_aper = nth( 1 parseString(global_min_aper "<>"))
                    println(list("Global aper parsed value = " param_line ))
                        );if
                    );while
            );when
    close( minWidth_port )

This is basically a copy of the code which works for me on a typical report text file .
Can anyone point out what I am missing here?
Thanks.

How to delete a padstack

$
0
0

Hello,

I want to delete a padstack in Allegro design which is not used.

Is there an Allergo skill function to delete specific padstack?

Thanks,

Kirti

How to use Skill to import updated IPC2581 XML file

$
0
0

I am trying to create a skill function to automate updating the stackup in Allegro PCB Designer using an IPC-2581. The program will grab an ipc2581.xml file that was previously updated earlier in the skill program and import it into Allegro PCB Designer. 

I have tried two approaches but both fail to meet my needs. 

The first attempt was to make a system call to execute the ipc2581_in command.

board = axlCurrentDesign() ; test.brd
sprintf(command "ipc2581_in ipc2581.xml -x -o %s" board)
system(command)

The issue with this process is the stackup for test.brd in Allegro does not reflect the changes from the import once the import complets. The ipc2581_in function parses the xml file and the brd file. It then deletes the brd file and creates a new one (this is because they are both named the same thing). After the process is complete the skill function exits and I am returned to the PCB Designer window. Opening up the stackup window displays the same data that was there before the import. If I close the design (without saving) and open the board back up, the stackup will then reflect the changes from the import. For this process to work I would need to alter the above block of code to somehow refresh the board but I am unaware of a function that does this. NOTE: When you utilize the Cadence built in IPC2581 import function this is what appears to occur because the Cadence command window states 

PC2581 In completed successfully, use Viewlog to review the log file.
Opening existing design...

My second attempt was to use the axlShell function to run the ipc2581 command but this also does not work. I can run

axlShell("ipc2581 in") ; note there is no underscore

which will open up the Cadence IPC2581 In Gui but that defeats the purpose of automating the process since the designer now needs to still manually complete the process. I also tried running something similar to attempt 1 but without luck

board = axlCurrentDesign() ; test.brd
sprintf(command "ipc2581_in ipc2581.xml -x -o %s" board) ;
axlShell(command)

I tried the code above using "ipc2581 in" which just opened the Cadence gui and ignored all the text after the word in and I also tried using "ipc2581_in" which resulted in Allegro complaining there is no such command. 

Any help would be greatly appreciated!!

Thanks

Jonathan

How to color a string using SKill

$
0
0

Hi Dave, all

I have a code to check footprint prints in our library. In my code i will output it into a log file called MCL log file. 

In the code i have pass/fail messages in which for pass messages, i want to color it green & fail message as red.

How do i do that. Below is a portion of the code.Hope anyone can help.

Thanks

JerryWilson

defun( _mcl_start ()

let((errors overallerrors)
overallerrors=0

mcl_log.log=axlDMOpenLog("mcl")

fprintf(mcl_log.log " MCL CHECK LOG ............................... Created:")

Date=(getCurrentTime)
fprintf(mcl_log.log "%s\n\n" Date)

axlDBGetDesignUnits()

fprintf(mcl_log.log "\n-----------------------------CHECK DRAWING PARAMETERS----------------------------\n")


errors=0
let((y m p)
y = axlGetParam('paramDesign)
if(y->units=="millimeters" then
;fprintf(mcl_log.log "\nPASSED :USER UNITS." )

else
errors++
overallerrors++
fprintf(mcl_log.log "\nFAILED :INVALID USER UNITS., %s" y->units)
)
if(y->accuracy==3 then
;fprintf(mcl_log.log "\nPASSED :ACCURACY." )
else
errors++
overallerrors++
fprintf(mcl_log.log "\nFAILED :INVALID ACCURACY., %d" y->accuracy)
)
if(y->height==210 then
;fprintf(mcl_log.log "\nPASSED :DRAWING EXTENT HEIGHT." )
else
errors++
overallerrors++
fprintf(mcl_log.log "\nFAILED :INVALID DRAWING EXTENT HEIIGHT., %f" y->height)
)
if(y->width==297 then
;fprintf(mcl_log.log "\nPASSED :DRAWING EXTENT WIDTH." )
else
errors++
overallerrors++
fprintf(mcl_log.log "\nFAILED :INVALID DRAWING EXTENT WIDTH., %f" y->width)
)
if(y->xy==list(-150 -105) then
;fprintf(mcl_log.log "\nPASSED :DRAWING EXTENT LOWER X AND LOWER Y." )
else
errors++
overallerrors++
fprintf(mcl_log.log "\nFAILED :INVALID DRAWING EXTENT LOWER X AND LOWER Y., %P\n" y->xy)
)
m = axlDesignType(t)
if( or( m=="PACKAGE" m=="SHAPE" m=="FLASH" ) then
;fprintf(mcl_log.log "\nPASSED :SYMBOL TYPE., %s\n" m)
else
errors++
overallerrors++
fprintf(mcl_log.log "\nFAILED :INVALID SYMBOL TYPE., %s\n" m)
)

if(errors==0 then
fprintf(mcl_log.log "\n\t%d ERROR(S) ON DRAWING PARAMETERS SETTINGS.\n", errors)
else
fprintf(mcl_log.log "\n\t%d ERROR(S) ON DRAWING PARAMETERS SETTINGS\n", errors)
)
;fprintf(mcl_log.log "***CHECK DRAWING PARAMETERS-END*****\n\n")
)

Concatenation of double quotes (")

$
0
0

Hi All,

I want to run a shell command shown below

reports "Component Report" nographic write

As we know axlshell doesn't allow double quotes inside so I am trying to concatenate with strcat, however I am facing a problem with the double quotes. I also tried with \”, but unable to build a string as shown above. Does anyone have an idea, how can a double quotes can be concatenated in a string.

Thanks,

Sanjeev

Compare to different netlist

$
0
0

Hi everyone,

I would like to ask some help, I created skill program that will determine if there are swap pins. But the problem is when I try to test two different netlist from two different board its not working. 

I am using netlist from export.


Tools used for developing skill programming

$
0
0

Hi Guys,

Does there any tool which can be used to develop the SKILL programs and shows some syntax error or some colour indication if a function or user define function is used?

Currently I use notepad++ to develop the same, however sometimes its very difficult to find a syntax error.

Thanks,

Sanjeev 

Use xhatch thermal width

$
0
0

Hi everyone,

Can anyone help me how to know if use xhatch thermal width is checked.

Or there is a property attached to shape to know this is checked

Or there is a API for this one. Thanks

.

Accessing color

$
0
0

Hi Dave

I tried to use a code you provided in one of the forum below in 17.2, i'm seeing errors 

E- *Error* defun: too few arguments (at least 3 expected, 2 given) - (DE_setLayerColour (layer colour))
E- *Error* load: error while loading file - "L:/ecad_proj/MCLLIB_ZMY12_172/cjj082_adwlib/codes/col.il" at line 1

Tried reomoving the ")", seeing the error below. Am I missing something. Please Advice.

E- *Error* DE_setLayerColour: too few arguments (2 expected, 0 given) - nil

defun( DE_setLayerColour (layer, colour))
let((colourNo, colours, n, p)
cond(
(numberp(colour), colourNo = colour)
(!colour, nil)
(t
colours = '(
(White 255 255 255)
(LtBlue 014 210 255)
(Rose 255 121 203)
(Green 000 255 106)
(Purple 166 016 255)
(Teal 121 153 196)
(Red 255 000 000)
(Yellow 255 255 000)
(Blue 000 000 255)
(Aqua 055 247 215)
(Gray 179 179 185)
(Olive 116 196 143)
(Orange 252 199 046)
(Pink 255 178 255)
(Beige 172 138 138)
(Navy 002 168 213)
(Violet 176 000 206)
(Gold 234 190 000)
(Silver 217 224 224)
(Rust 242 127 134)
(Lime 014 249 182)
(Brown 161 004 004)
(Mauve 224 141 202)
(Black 000 000 000)
)
n = listnindex(mapcar(lambda((colDef), lowerCase(car(colDef))), colours), lowerCase(colour))
when(n, colourNo = n + 1, axlColorSet(colourNo, cdr(nth(n, colours))))
)
)
when(colourNo, p = axlLayerGet(layer), p ->color = colourNo, axlSetParam(p))
))

Using a script inside a foreach loop.

$
0
0

I am trying to output shape reports for all etch shapes in order to check them for errors.
My foreach loop works for normal skill commands but breaks after the first pass when I use
my script to create a report:

        l_etchShapes = axlDBGetShapes( "ETCH" )
        
        foreach( _testEtchShape l_etchShapes
        
                println(list( "Shape Layer 1 = " _testEtchShape->layer )) ;print for debug
                
                axlClearSelSet()
                axlSingleSelectObject( _testEtchShape )
                axlSetActiveLayer( _testEtchShape->layer )
                axlVisibleDesign( nil )
                axlVisibleLayer( _testEtchShape->layer  t )
                axlSetFindFilter(?enabled list("NOALL" "SHAPES" ) ?onButtons list("ALL"))
            
                        shpInstOut = outfile("./shape_rep.scr")
                                fprintf( shpInstOut "scriptmode +w +i\n" )
                                fprintf( shpInstOut "setwindow pcb\n" )
                                fprintf( shpInstOut "generaledit\n" )
                                fprintf( shpInstOut "shape select\n" )
                                fprintf( shpInstOut "pick grid %L\n",  car( _testEtchShape->bBox ))
                                fprintf( shpInstOut "pop shape report\n" )
                                fprintf( shpInstOut "setwindow text\n" )
                                fprintf( shpInstOut "save\n" )
                                fprintf( shpInstOut "fillin \"temp_shp_report.txt\"\n" )
                                fprintf( shpInstOut "setwindow text\n" )
                                fprintf( shpInstOut "close\n" )
                                fprintf( shpInstOut "done\n" )
                                fprintf( shpInstOut "setwindow pcb\n" )
                                fprintf( shpInstOut "generaledit\n" )
                        close( shpInstOut )
                    axlShell("replay ./shape_rep.scr")
                println(list( "Shape Layer 2 = " _testEtchShape->layer )) ;print for debug
            
            );foreach

Can anyone tell me how to keep the loop from being broken by the script?

Length Matching Through Skill Program

$
0
0

Hi Group,

Is it possible to write some skill program to length match the traces? For example, I am looking for some sort of program which allows user to click on particular trace or traces and then tool add serpentine/bends to match the trace length with the total length property on the net.

Or if skill program is not possible then any other way to automate length matching process in the Cadence Allegro? If I have 1000 nets to match then it takes much time. Any suggestion or thinker? Thanks.

DIE/BGA text in using SKILL

$
0
0

Hi, I'm trying to figure out how to do a few simple things in APD using SKILL.

1) create a new mcm project

2) import a die/BGA text file

3) create some shapes, vias, etc.

I can find information in the manual about how to 1) (I think) and 3), but not 2). Any hints?

Thanks!

display net names from SKILL

$
0
0

Hello,

I am looking to control, from a SKILL script/form,  the "Display Net Names Functionality" as given in the Setup>Design Parameters checkboxes:

In the documentation I found 

axlDBDisplayControl('displayNetNames, t/nil)

But obviously it doesn't control the three checkboxes since it is only one parameter.

Anyone know how to do this?

Thanks


Documentation Location

$
0
0

How does one search the documentation for specific functions?

For example, where is the documentation for ipcWait() ?

Need only one particular pin of ref des (TESTER) of a given net name

$
0
0

I need to make a utility in which only tester ref des will given as output when I input the nets.

For example: Net name +5v is input net and output will be J225 no capacitors, resistors, or any component ref des will appear.

Although Allegro generate net-list report but it shows ref des of all components in particular net path.

Export used class and sub class

$
0
0

I would like to see what are all the class/sub class is used in the allegro footprint.

Creating Context skill in SPB17.2

$
0
0

Is there anybody created a context skill and run to 17.2 version without getting any error?
or still not yet fix with the latest hotfix 30?

Thank you

Creating a Mitred Microstrip 45 degree bend in Cadence Allegro without using the Analog RF Option

$
0
0

Is there a skill file that will take an 8 mil trace on a 45 degree bend and create a mitered trace?  If not, how difficult would it be to write a skill file to do this?  I don't have any skill experience.

Width (W) of 8 mils and substrate thickness (h) of 4 mils.
 
When laying out microstrip transmission lines an abrupt bend of 90° can cause a significant portion of the signal on the strip to be reflected back towards its source. This results in only a portion of the signal passing through and causes un-necessary reflections in the system which degrades performance. Mitering the bend is one of the ways in which the reflections can be reduced. A 90 degree bend in a transmission line adds a small amount of capacitance to the transmission line, which causes a mismatch. A Mitered bend reduces some of that capacitance, restoring the line back to it's original characteristic impedance. This calculator below helps calculate the dimension of the mitre bend.
Thanks,
Craig
Viewing all 2132 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>