• 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 Scripting - Skill
  3. Quick reports generation using skill

Stats

  • Replies 1
  • Subscribers 18
  • Views 10542
  • Members are here 0
More Content

Quick reports generation using skill

rish87
rish87 over 5 years ago

Hello,

Is there any function in allegro skill to generate quick reports in pcb editor and write the same to a text or html file.

Thanks,

harish

  • Sign in to reply
  • Cancel
Parents
  • ePeter
    ePeter over 5 years ago

    Maybe you can call with axlRunBatchDBProgram the report command ?

    switches for the report command can be found in %CDSROOT%\share\pcb\batchhelp\report.txt

    Otherwise I think you have to write your own report routine.

    Something like this (this will report all pins of one component with Ref Des,Pin Number,Die Pin,X-Coord,Y-Coord,Net Name ),

    defun( report_for_model (Comp_to_select)

     if( axlOKToProceed() then

     units = car(axlDBGetDesignUnits())
      cond(
       (equal(units "microns")  (conv_factor = 1));
       (equal(units "millimeters") (conv_factor = 1000));
       (equal(units "centimeters") (conv_factor = 10000));
       (equal(units "mils")   (conv_factor = 25.4));
       (equal(units "inches")   (conv_factor = 25400)  );
      ) ; end of cond
     
     sel_pin=axlSelectByName("PIN" strcat(Comp_to_select ".*") t)
     if(length(sel_pin) <=0 then
      printf("E- Component %s not found.\n" Comp_to_select)
     else
      Pin_List = axlGetSelSet()

      axlClearSelSet()

      Report_to="report_for_model.csv"
      report_file = axlDMOpenLog(Report_to)
      count_col_pins=0
      fprintf(report_file,"Ref Des,Pin Number,Die Pin,X-Coord,Y-Coord,Net Name \n" )
       foreach(sPin Pin_List
        refdes = sPin->parent->refdes
        pad_number=sPin->number
        pad_name=pad_number
        ;xy_coord=sPin->xy
        pin_x=car(sPin->xy)*conv_factor
        pin_y=cadr(sPin->xy)*conv_factor
        net_name=sPin->net->name
        fprintf(report_file,"%s,%s,%s,%f,%f,%s\n",refdes,pad_number,pad_name,pin_x,pin_y,net_name )
       )

      axlDMClose(report_file)
     )
      else
       printf("E- Please terminate your interactive command .\n")
      );end-if

    );

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • ePeter
    ePeter over 5 years ago

    Maybe you can call with axlRunBatchDBProgram the report command ?

    switches for the report command can be found in %CDSROOT%\share\pcb\batchhelp\report.txt

    Otherwise I think you have to write your own report routine.

    Something like this (this will report all pins of one component with Ref Des,Pin Number,Die Pin,X-Coord,Y-Coord,Net Name ),

    defun( report_for_model (Comp_to_select)

     if( axlOKToProceed() then

     units = car(axlDBGetDesignUnits())
      cond(
       (equal(units "microns")  (conv_factor = 1));
       (equal(units "millimeters") (conv_factor = 1000));
       (equal(units "centimeters") (conv_factor = 10000));
       (equal(units "mils")   (conv_factor = 25.4));
       (equal(units "inches")   (conv_factor = 25400)  );
      ) ; end of cond
     
     sel_pin=axlSelectByName("PIN" strcat(Comp_to_select ".*") t)
     if(length(sel_pin) <=0 then
      printf("E- Component %s not found.\n" Comp_to_select)
     else
      Pin_List = axlGetSelSet()

      axlClearSelSet()

      Report_to="report_for_model.csv"
      report_file = axlDMOpenLog(Report_to)
      count_col_pins=0
      fprintf(report_file,"Ref Des,Pin Number,Die Pin,X-Coord,Y-Coord,Net Name \n" )
       foreach(sPin Pin_List
        refdes = sPin->parent->refdes
        pad_number=sPin->number
        pad_name=pad_number
        ;xy_coord=sPin->xy
        pin_x=car(sPin->xy)*conv_factor
        pin_y=cadr(sPin->xy)*conv_factor
        net_name=sPin->net->name
        fprintf(report_file,"%s,%s,%s,%f,%f,%s\n",refdes,pad_number,pad_name,pin_x,pin_y,net_name )
       )

      axlDMClose(report_file)
     )
      else
       printf("E- Please terminate your interactive command .\n")
      );end-if

    );

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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