Cadence Skill 论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 37|回复: 2

[原创] axlRunBatchDBProgram函数详细介绍

[复制链接]
发表于 前天 10:28 | 显示全部楼层 |阅读模式
函数格式
axlRunBatchDBProgram(
t_prog
t_cmdFmt
[?logfile t_logfile]
[?startMsg t_startMsg]
[?reloadDB t/nil]
[?noUnload t/nil]
[?silent t/nil]
[?noProgress   t/nil]
[?warnProgram  t/nil]
)
⇒ t/x_error
函数内容
t_prog          包含程序名的字符串       例如"Create NC Drill"
t_cmdFmt        包含起始参数的字符串(包括程序)
例如sprintf(format "nctape -$ -q -b %s.brd" axlCurrentDesign())
t_logfile       显示日志文件的可选字符串
t_startMsg      具有开始消息的可选字符串
?reloadDB      可选t/nil,在作业完成后重新加载数据库
?noUnload      不应保存可选的t/nil声明数据库
?silent        可选t/nil控制信息消息
?noProgress    可选t/nil控制进度表
t               批处理作业已运行。
x_error         程序依赖于故障的错误号。
用如下代码实现:;在grber目录生成所有.drl
        sprintf(format "nctape -$ -q -b %s.brd" axlCurrentDesign())
        axlRunBatchDBProgram("Create NC Drill" format ?logfile "ncdrill")

t_cmdFmt的具体使用是放在C:\cadence\SPB_17.4\share\pcb\batchhelp文件夹下。

官方举了几个案例:
原文:
skill:例子1:
sprintf(format "genfeedformat -$ %s %%s", "-b")   ;format=  "genfeedformat -$ -b %s"
axlRunBatchDBProgram("genfeedformat" format ?logfile "genfeed")


Without sprintf不使用sprintf函数(即直接写t_cmdFmt的内容):
axlRunBatchDBProgram("genfeedformat" "genfeedformat -$ -b %s" ?logfile "genfeed")

/*****genfeedformat.txt中部分内容*************
Command line arguments for genfeedformat                                          genfeedformat的命令行参数
Outputs Cadence netlists (Capture, conceptHDL or SCM) from allegro      从Allegro输出Cadence网表(Capture、ConceptHDL或SCM)
   genfeedformat [-s <schematic_name>] -b <.brd_name>
      -b <.brd_name> The layout board name
      -proj <project_file_name>      The HDL project file (HDL only)
      -o   Output directory (optional).
If a project file is specified using the -proj option, places the files in the directory specified by the "view packager" global directive in the project file.
如果使用-proj选项指定了项目文件,则将文件放置在项目文件中“view packager”全局指令指定的目录中。
If no project file is specified, the output files are placed in the current working directory.
如果未指定项目文件,则输出文件将放置在当前工作目录中。
The -o argument overrides the project file.      -o参数会覆盖项目文件。
      -c   Output Electrical data (cmdbview.dat) 输出电气数据(cmdbview.dat)
      -m   <mode> Output Chips data (chipsview.dat).
             If <mode> is 1  generate normal multi pin slot chips file; if <mode> is 2 generate single pin slot chips file.
             如果<mode>为1,则生成正常的多引脚插槽芯片文件;如果<mode>为2,则生成单引脚槽芯片文件。
   OBSOLETE Concept-SCALD Switches
      [-s <schematic_name>]  Schematics directory (SCALD only)
      [-d]  Update dependency table (SCALD only)
      [-t]  namemap file update
      [-x]  Use Packager-XL  (defaults to Package-XL)
****************************/

例子2:
axlRunBatchDBProgram("notepad" "notepad allegro.jrl" ?noUnload t ?noProgress t)
Spawn 3rd party program, notepad, on an existing file "allegro.jrl". In this case we do not want to save design (?noUnload t) and no progress meter is required (?noProgress t)
在现有文件“allegro.jrl”上生成第三方程序、记事本。在这种情况下,我们不想保存设计(?noUnload t),也不需要进度表(?Progress t)

例子3:
axlRunBatchDBProgram("netin" "netin -$ -g -y 1 netlist %s" ?startMsg "Logic Import" ?logfile "netin" ?reloadDB t)
Spawn 3rd party import login, a program that requires read/write database wrapping. Read existing 3rd party netlist file called "netlist.txt". Since design needs to be reloaded if import is successful use the "?reloadDB t" option.
生成第三方导入登录,这是一个需要读/写数据库包装的程序。读取名为“netlist.txt”的现有第三方网表文件。由于导入成功后需要重新加载设计,请使用“reloadDB t”选项。
Program Args:
-$ - silent静默
-g - run gate assign
-y 1 - Always Place changed component
netlist - name of netlist file (for example, netlist.txt)
%s - use current design

/*****netin.txt中部分内容*************
Arguments and Switches:参数和开关:
    -a or -A Creates an A size drawing.
    -b or -B Creates a B size drawing.
    -c or -C Creates a C size drawing.
    -d or -D Creates a D size drawing.
    -e or -E Creates an E size drawing.
    -g         Run gate assign 运行闸门分配
    -h   Search and update device STEP mapping data. 搜索和更新器件STEP映射数据。
    -i   Obsolete 过时的
    -s   Supersedes all logical data with the new netlist. 用新网表替换所有逻辑数据。
    -v   Prevents creation of device log files. 阻止创建设备日志文件。
    -x   Corresponds to the Allow Etch Removal During ECO field on the Netlist-In form. 对应于ECO期间允许蚀刻去除字段网表格式。
         Use the x switch to rip up etch during an ECO.在ECO期间使用x开关撕开走线。
    -y <number> Corresponds to the Placed Changed Components in Design radio buttons on the Netlist-In form.
                        对应于放置的更改组件,它在网表输入窗体上的设计发射按钮里。
                -y 1 = Always
                -y 2 = If/Same
                -y 3 = Never
    -z   Ignore FIXED property when updating design.  更新设计时忽略FIXED属性。

    <netlist> Is the name of the input file.

    <input_drawing> Optional drawing name into which the netlist data is to be loaded. 网表数据要加载到其中的可选图形名称。
                              You do not need to type in the .brd file extension. 您不需要键入.brd文件扩展名。
                              This field is optional, if no argument is specified, netin assumes you only want a syntax check the netlist.
                               此字段是可选的,如果没有指定参数,netin假设您只需要对网表进行语法检查。

****************************/
/*****nctape.txt中部分内容*************
NC Tape Generator
        nctape [<args>] [<design>]

   Arguments
        [-b]   - enable backdrill. Design must be set-up for backdrilling  启用背钻。必须设置背钻设计
        [-c]   - enable counterdrill.   启用反钻。
        [-l]   - enable drill by layer. Output drill multiple drill files for each layer of design (example <brd>-bl-1-2.drl, <brd>-bl-2-3.drl)
                 启用逐层钻孔。为每一层设计输出多个钻孔文件(例如<brd>-bl-1-2.drl,<brd>-bl-2-3.drl)
        [-n <outfile>] - if present will override nc_param.txt TAPE-FILE parameter used in generating base .drl name and output directory
                 如果存在,将覆盖在生成base.drl名称和输出目录时使用的nc_param.txt TAPE-FILE参数
        [-o]   - reduce drill head travel path to increase efficiency
                  减少钻头行程以提高效率
        [-q]   - suppress verbose messages (this is the default)
                  抑制详细消息(这是默认设置)
        [-s <scale>]   - Scales (x y) locations. All x/y locations in drill file will be multiplied by this scale value.
                  缩放(x y)位置。钻孔文件中的所有x/y位置都将乘以此比例值。
        [-v]   - enable verbose messages   启用详细消息

   <design> - design file to generate


   Other notes
        - Expects to find "nc_param.txt" file via in NCDPATH which controls additional tape out settings.                    期望在NCDPATH中通过找到“nc_param.txt”文件,该文件控制其他带子输出设置。
        - Generates one or more drl extension files with the following name convention:
           生成一个或多个具有以下名称约定的drl扩展文件:
             <name>-<l1>-<l2>-<type><plate><-len>.drl
                where
                  name - basename of FILE parameter in "nc_param.txt"                   name-“nc_param.txt”中FILE参数的基名
                  l1     - number of drill start layer
                  l2     - number of drill end layer
                  type   - either laser, plasma, punch or other (from padstack definition) 激光、等离子体、冲压或其他(来自焊盘堆栈定义)
                  plate  - if non-plated add "-np"
                  len    - adds -len<number> if need to break up single file into multiple files due to exceeding file LENGTH specified in nc_param.txt
                             如果由于超过nc_param.txt中指定的文件长度而需要将单个文件拆分为多个文件,则添加-len<number>
          Example a 6 layer board call with "TAPE-FILE of "/home/xyz/u.drl" would have drill files of following names output to /home/xyz directory:
          例如,一个名为“TAPE-FILE为”/home/xyz/u.drl“的6层板调用将把以下名称的钻孔文件输出到/home/xzy目录:
                u-1-6-laser-np.drl
                u-1-6-plasma.drl
                etc.
***************************************/所以上面输出钻孔表的源码解释
        sprintf(format "nctape -$ -q -b %s.brd" axlCurrentDesign())
        axlRunBatchDBProgram("Create NC Drill" format ?logfile "ncdrill")

[-q]   - suppress verbose messages (this is the default)
                  抑制详细消息(这是默认设置)
[-b]   - enable backdrill. Design must be set-up for backdrilling  启用背钻。必须设置背钻设计

 楼主| 发表于 前天 10:28 | 显示全部楼层
不过17.4的代码和16.6用这个函数好像不太一样,用17.4会提示提示批处理缺%s
 楼主| 发表于 前天 10:30 | 显示全部楼层
在grber目录生成所有.drl
        sprintf(format "nctape -$ -q -b %s.brd" axlCurrentDesign())
        axlRunBatchDBProgram("Create NC Drill" format ?logfile "ncdrill")
在17.4提示批处理缺%s
不知道是什么问题,有17.4的帮忙看看你们的版本会报错吗
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|网站地图|Cadence Skill 论坛 ( 蜀ICP备13024417号 )

GMT+8, 2025-4-2 12:24 , Processed in 0.905211 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表