Home > Community > Forums > PCB SKILL > how to assign cset to netclass using skill

Share

  • Email
  • Social Web
* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 how to assign cset to netclass using skill 

Last post Tue, Aug 11 2009 12:56 PM by Jmus. 7 replies.
Started by Ejlersen 25 Jun 2009 01:31 PM. Topic has 7 replies.
Page 1 of 1 (8 items)
Sort Posts:
  • Thu, Jun 25 2009 1:31 PM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 243
    • Points 3,695
    how to assign cset to netclass using skill Reply

    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

    • Post Points: 20
  • Fri, Jul 24 2009 1:06 PM

    • asedehi99
    • Top 150 Contributor
    • Joined on Thu, Jul 3 2008
    • Aliso Viejo, CA
    • Posts 17
    • Points 150
    Re: how to assign cset to netclass using skill Reply

    any luck?

    Ali Sedehi
    • Post Points: 20
  • Fri, Jul 24 2009 1:55 PM

    • fxffxf
    • Top 50 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 70
    • Points 1,260
    Re: how to assign cset to netclass using skill Reply

     this cannot be done using pure skill code.

    • Post Points: 20
  • Fri, Jul 31 2009 4:17 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 243
    • Points 3,695
    Re: how to assign cset to netclass using skill Reply

    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

    • Post Points: 20
  • Mon, Aug 10 2009 8:52 AM

    • Jmus
    • Not Ranked
    • Joined on Mon, Aug 10 2009
    • Posts 2
    • Points 25
    Re: how to assign cset to netclass using skill Reply

    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

    • Post Points: 20
  • Tue, Aug 11 2009 9:58 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 243
    • Points 3,695
    Re: how to assign cset to netclass using skill Reply

    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

    • Post Points: 20
  • Tue, Aug 11 2009 10:01 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 243
    • Points 3,695
    Re: how to assign cset to netclass using skill Reply

    Forgot to mention that whenever the code is completely finished and we've held the first seminars around it I'll be able to publish it on our homepage for general download and use.

    You'll perhaps not be able to wait, but just to let you know. 

    Ole

    • Post Points: 5
  • Tue, Aug 11 2009 12:56 PM

    • Jmus
    • Not Ranked
    • Joined on Mon, Aug 10 2009
    • Posts 2
    • Points 25
    Re: how to assign cset to netclass using skill Reply

    This looks very similar to the scripts I started generating from my .jrl file yesterday after I made my post. Your code has several of the extra allegro commands removed from it which is good because my script will run with higher efficiency. 

    Thanks for posting a reply quickly.  I wish there were a way to do this with pure skill code, but I guess we will need to wait for that to come out in a later version!

     JM

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by Ejlersen at 25 Jun 2009 01:31 PM. Topic has 7 replies.