在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子

[资料] 转一篇华为内部的关于IC验证的经验总结

[复制链接]
发表于 2011-4-14 19:22:15 | 显示全部楼层
写的很好,很受教育啊~~~
发表于 2011-4-15 09:54:57 | 显示全部楼层
谢谢分享~
发表于 2011-4-16 13:26:16 | 显示全部楼层
谢谢!
发表于 2011-4-16 16:37:07 | 显示全部楼层
我也来受受教育
发表于 2011-4-16 21:02:37 | 显示全部楼层
感谢分享~~
发表于 2011-4-17 10:59:53 | 显示全部楼层
经验这东西书本上学不到啊。
发表于 2011-4-22 17:06:19 | 显示全部楼层
How to use Perl in your SystemVerilog HDL Design Flow?
Anyone who designs with SystemVerilog HDL has probably grown tired of generating module instantiations in a hierarchical design, or creating a new top level or lower level SystemVerilog HDL module. I have generated a few Perl Scripts that will automatically generate the module instantiations, top level module, and lower level module for you. These Perl Scripts can be invoked from within VI/VIM/GVIM, or a DOS Command Window. If you invoke them from within VI, the script output will be printed in the current file. If you invoke them from within a DOS Command Window, then you will have to either cut and paste into your SystemVerilog HDL file or pipe the output to a new file. Below are the scripts:
sv_mod_top.pl : SystemVerilog HDL Top Level Module Template Perl Script
sv_mod_low.pl : SystemVerilog HDL Lower Level Module Template Perl Script
sv_inst.pl : SystemVerilog HDL Module Instantiation Perl Script
sv_tb.pl : SystemVerilog HDL Test Bench Module Generation Perl Script
--------------------------------------------------------------------------------
How to use sv_mod_top.pl?
This utility is intended to make creating new SystemVerilog HDL modules easier using a good editor, such as VI. As long as you set the top line to correctly point to your perl binary, and place this script in a directory in your path, you can invoke it from VI. Simply use the !! command and call this script with the filename you wish to instantiate. This script will create a new text file called "new_module_name.sv" when you type the following command:
!! sv_mod_top.pl new_module_name.sv
The script will generate the empty SystemVerilog HDL template for you in the file "new_module_name.sv". Note: "new_module_name.sv" is the name of the new SystemVerilog HDL file and can be anything you like. The module declaration uses Verilog 2001 ANSI-C style. You can either use VI or a DOS Command prompt to run this script. If you want to use a DOS Command prompt, then see the instructions below:
Change directory to the desired directory
cd C:\design\new_module
If the directory "new_module" does not exist type: mkdir C:\design\new_module, before changing directory.
Type the following: perl sv_mod_top.pl new_module_name.sv
When the script is finished you will see the message: "The script has finished successfully! You can now use new_module_name.sv."
Back to Top
--------------------------------------------------------------------------------
How to use sv_mod_low.pl?
This utility is intended to make creating new SystemVerilog HDL modules easier using a good editor, such as VI. As long as you set the top line to correctly point to your perl binary, and place this script in a directory in your path, you can invoke it from VI. Simply use the !! command and call this script with the filename you wish to instantiate. This script will create a new text file called "new_module_name.sv" when you type the following command:
!! sv_mod_low.pl new_module_name.sv
The script will generate the empty SystemVerilog HDL template for you in the file "new_module_name.sv". Note: "new_module_name.sv" is the name of the new SystemVerilog HDL file and can be anything you like. The module declaration uses Verilog 2001 ANSI-C style. You can either use VI or a DOS Command prompt to run this script. If you want to use a DOS Command prompt, then see the instructions below:
Change directory to the desired directory
cd C:\design\new_module
If the directory "new_module" does not exist type: mkdir C:\design\new_module, before changing directory.
Type the following: perl sv_mod_top.pl new_module_name.sv
When the script is finished you will see the message: "The script has finished successfully! You can now use new_module_name.sv."
Back to Top
--------------------------------------------------------------------------------
How to use sv_inst.pl?
This utility is intended to make instantiation in SystemVerilog easier using a good editor, such as VI. As long as you set the top line to correctly point to your perl binary, and place this script in a directory in your path, you can invoke it from VI. Simply use the !! command and call this script with the filename you wish to instantiate.
!! sv_inst.pl adder.sv
The script will retrieve the module definition from the file you specify and provide the instantiation for you in the current file at the cursor position.
For instance, if adder.sv contains the following definition:
        module adder (a, b, sum, carry);
                - or -
        module adder (input wire a,
                      input wire b,
                      output reg sum,
                      output reg carry);
Then this is what the script will insert in your editor for you:
adder adder (
  .a (a),
  .b (b),
  .sum (sum),
  .carry (carry)
         );
The keyword "module" must be left justified in the SystemVerilog file you are instantiating to work.
Back to Top
--------------------------------------------------------------------------------
How to use sv_tb.pl?
This utility is intended to make creating new SystemVerilog HDL Test Bench modules easier using a good editor, such as VI. As long as you set the top line to correctly point to your perl binary, and place this script in a directory in your path, you can invoke it from VI. Simply use the !! command and call this script with the filename you wish to instantiate. This script will create a new text file called "tb_new_module_name.sv" when you type the following command:
        !! sv_tb.pl new_module_name.sv
The script will generate the SystemVerilog HDL test bench template for you with the port contents of "new_module_name.sv". Note: "new_module_name.sv" is the name of the existing SystemVerilog HDL file, and "tb_new_module_name.sv" is the new test bench file.
The script will retrieve the module definition from the "new_module_name.sv" file you specify and provide the instantiation for you in the new "tb_new_module_name.sv" file.
The keyword "module" must be left justified in the SystemVerilog file you are instantiating to work.
You can either use VI or a DOS Command prompt to run this script. If you want to use a DOS Command prompt, then see the instructions below:
1.Change directory to the desired directory
  cd C:\design\new_module
2.Type the following: perl sv_tb.pl new_module_name.sv
3.When the script is finished you will see the message: "The script has finished successfully! You can now use tb_new_module_name.sv."
发表于 2011-4-22 21:31:23 | 显示全部楼层
学习看看。
发表于 2011-4-23 08:16:05 | 显示全部楼层
值得学习,看看
发表于 2011-4-24 00:18:35 | 显示全部楼层
受益匪浅 谢谢了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

×

小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-19 18:40 , Processed in 0.033784 second(s), 5 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表