|
发表于 2011-1-17 05:53:09
|
显示全部楼层
我来帮帮楼主
ASIC/FPGA Design and Verification Out Source Services
Code Indentation
The following set of scripts indent a code, which is written in e (specman) or verilog or vhdl. The motivation for indentation is to have all code with the same indentation using spaces only (no TABs). Using spaces for indentation makes the indentation independent of the editor and its configuration, which is used.
Sometimes a block of code is not complete, be it VHDL, verilog or specman, and it is difficult to find where a {} (e) is missing. When running the script, it would try to find the number of first mis-match. The default indentation size is two spaces.
The script modified output file is written always to a file named 2.e. The user than should use diff -w and confirm the changes.
How to use : perl ind.pl my_code.e
How to use : perl ind_verilog.pl my_code.v
How to use : perl ind_vhdl.pl my_code.vhd
Note: if the file is in DOS format, you may want to first run dos2unix on the file.
codes.rar
(6.04 KB, 下载次数: 770 )
|
|