• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. how to assign cset to netclass using skill

Stats

  • Replies 7
  • Subscribers 161
  • Views 15008
  • Members are here 0
More Content

how to assign cset to netclass using skill

Ejlersen
Ejlersen over 16 years ago

Hi

Anyone knows if there is an axl function to assign a named constraint set to a specific netclass?

Added 26th of June: I've figured out how to do this using script, but would prefer not to do it using scripts.

Best regards

Ole

  • Sign in to reply
  • Cancel
  • asedehi99
    asedehi99 over 16 years ago

    any luck?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fxffxf
    fxffxf over 16 years ago

     this cannot be done using pure skill code.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 16 years ago

    Hi

    Yes I had luck, I recorded a script and in my skill code I'm writing scripts and replaying them.

    Although I would prefer to use skill this is acceptable and works very well.

    Best regards

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Jmus
    Jmus over 16 years ago

    Hi

    What kind of script did you use to assign the cset to a netclass?  I have a external list of net class spacing requirements in the form of a .txt file that I plan to import with skill code. Acorrding to previous posts it appears there is no way to assign the csets to netclasses in skill. How do you pass the cset and netclasses you want to alter with your script?

    I'm not sure what I'm trying to do is the same as what you were doing so I will clarify.  I have netclasses set up in the PCB constraints manager already which have been imported from an OrCAD/Capture schematic. I need to establish spacing rules between netclasses for a high voltage design process where for example one netclass may be a DC bus and another Chassis and I have a precalculated number which I need to enter as a clearance.

     JM

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 16 years ago

    Hi

    I'm using this to parse a number of text files extracted from Excel, I cannot give the code away yet since it is part of a constraint initiative my company is working on for the benefit of Danish electronics developement companies.

    Basically I've got 2 procedures, one to assign spacing and physical cset to a netclass and another procedure to create netclass 2 netclass constraints. The 2 procedures are below. You just need a header and a footer for the script file.

    use file, script to record a script where you do what you want and then you just need to save data to a script and then replay it, example below

       tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
       fprintf(tmp_file "scriptmode +i +n +w +c\n")
       fprintf(tmp_file "setwindow pcb\n")
       fprintf(tmp_file "done\n")
       fprintf(tmp_file "cmgr\n")
       fprintf(tmp_file "setwindow cmgr\n")
       fprintf(tmp_file "cm newView ( worksheet 55:Physical \"56:Physical Constraint Set\" \"57:All Layers\" \"58:All Layers\" )\n")
       fprintf(tmp_file "cm newView ( worksheet 55:Physical 61:Net \"62:All Layers\" \"63:All Layers\" )\n")
       fprintf(tmp_file "cm newView ( worksheet 78:Spacing \"79:Spacing Constraint Set\" \"80:All Layers\" 81:Line )\n")
       fprintf(tmp_file "cm newView ( worksheet 78:Spacing 94:Net \"95:All Layers\" 96:Line )\n")
       fprintf(tmp_file "cm scope Design \"%s\"\n" axlCurrentDesign())
       ns_map_cset2netclass(spacingCset recordid physicalCset)
       fprintf(tmp_file "cm exit\n")
       fprintf(tmp_file "setwindow pcb\n")
       axlDMClose(tmp_file)
       axlShell("replay tmp")
       if( isFile( "tmp.scr") then deleteFile("tmp.scr"))


    ; --------  arg1 = spacing Cset name, arg2 = Netclassname, arg3 = Physical Cset name
    procedure( ns_map_cset2netclass( arg1 arg2 arg3)
    let((nc_domains)
      nc_domains = '(spacing physical)
      axlNetClassCreate(arg2 nc_domains)

      fprintf(tmp_file "cm startTransaction ( Design \"%s\" ) ( \"Net Class\" \"%s\" ) TS_DEFER\n" axlCurrentDesign() arg2)
      fprintf(tmp_file "cm add ( \"Net Class\" \"%s\" ) to ( \"Spacing CSet\" \"%s\" )\n" arg2 arg1)
      fprintf(tmp_file "cm commitTransaction ( Design \"%s\" ) ( \"Net Class\" \"%s\" ) TS_DEFER\n" axlCurrentDesign() arg2)

      fprintf(tmp_file "cm startTransaction ( Design \"%s\" ) ( \"Net Class\" \"%s\" ) TS_DEFER\n" axlCurrentDesign() arg2)
      fprintf(tmp_file "cm add ( \"Net Class\" \"%s\" ) to ( \"Physical CSet\" \"%s\" )\n" arg2 arg3)
      fprintf(tmp_file "cm commitTransaction ( Design \"%s\" ) ( \"Net Class\" \"%s\" ) TS_DEFER\n" axlCurrentDesign() arg2)

     )
    ); end procedure

    ;  --------  arg1 = col_name, arg2 = row_name, arg3 = Spacing Cset name
    procedure( ns_netclass2netclass( arg1 arg2 arg3)
    let((nc_domains)
      nc_domains = '(spacing physical)
      axlNetClassCreate(arg2 nc_domains)
      fprintf(tmp_file "cm create \"Net Class-Class\" ( Design \"%s\" ) \"%s:%s\" \"%s\" \"%s\"\n" axlCurrentDesign() arg1 arg2 arg2 arg1)
      fprintf(tmp_file "cm startTransaction ( Design \"%s\" ) ( \"Net Class-Class\" \"%s:%s\" ) TS_DEFER\n" axlCurrentDesign() arg1 arg2)
      fprintf(tmp_file "cm add ( \"Net Class-Class\" \"%s:%s\" ) to ( \"Spacing CSet\" \"%s\" )\n" arg1 arg2 arg3)
      fprintf(tmp_file "cm commitTransaction ( Design \"%s\" ) ( \"Net Class-Class\" \"%s:%s\" ) TS_DEFER\n" axlCurrentDesign() arg1 arg2)
     )
    ); end procedure


    Best regards

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information