Sponsored Content
Top Forums Shell Programming and Scripting perl help to split big verilog file into smaller ones for each module Post 302315583 by return_user on Tuesday 12th of May 2009 08:04:02 PM
Old 05-12-2009
Quote:
Originally Posted by vgersh99
Code:
nawk '$1 == "module" { close(file);file= $2 ".v" } {print > file}' myFile


I don't have nawk so tried awk but got following error:
123 temp > awk '$1 == "module" { close(file);file= $2 ".v" } {print > file}' intxt.txt
awk: (FILENAME=intxt.txt FNR=1) fatal: expression for `>' redirection has null string value

Anything you could suggest?
thank you for the prompt help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Split a big file into two others files

Hello, i have a very big file that has more then 80 MBytes (100MBytes). So with my CVS Application I cannot commit this file (too Big) because it must have < 80 MBytes. How can I split this file into two others files, i think the AIX Unix command : split -b can do that, buit how is the right... (2 Replies)
Discussion started by: steiner
2 Replies

2. Shell Programming and Scripting

Segment a big file into smaller ones

Greeting to all. I have big text file that I would like to segment into many smaller files. Each file should be maximum 10 000 lines. The file is called time.txt. after the execution of the file I would like to have. time_01.txt, time_02, txt, ...,time_n.txt Can anybody help. Br. (2 Replies)
Discussion started by: flash80
2 Replies

3. Shell Programming and Scripting

parsing data from a big file using keys from another smaller file

Hi, I have 2 files format of file 1 is: a1 b2 a2 c2 d1 f3 format of file 2 is (tab delimited): a1 1.2 0.5 0.06 0.7 0.9 1 0.023 a3 0.91 0.007 0.12 0.34 0.45 1 0.7 a2 1.05 2.3 0.25 1 0.9 0.3 0.091 b1 1 5.4 0.3 9.2 0.3 0.2 0.1 b2 3 5 7 0.9 1 9 0 1 b3 0.001 1 2.3 4.6 8.9 10 0 1 0... (10 Replies)
Discussion started by: Lucky Ali
10 Replies

4. Shell Programming and Scripting

Split large file into smaller file

hi Guys i need some help here.. i have a file which has > 800,000 lines in it. I need to split this file into smaller files with 25000 lines each. please help thanks (1 Reply)
Discussion started by: sitaldip
1 Replies

5. Shell Programming and Scripting

How to split a file into smaller files

Hi, I have a big text file with m columns and n rows. The format is like: STF123450001000200030004STF123450005000600070008STF123450009001000110012 STF234560345002208330154STF234590705620600070080STF234567804094562357688 STF356780001000200030004STF356780005000600070080STF356780800094562657687... (2 Replies)
Discussion started by: wintersnow2011
2 Replies

6. Shell Programming and Scripting

Help needed - Split large file into smaller files based on pattern match

Help needed urgently please. I have a large file - a few hundred thousand lines. Sample CP START ACCOUNT 1234556 name 1 CP END ACCOUNT CP START ACCOUNT 2224444 name 1 CP END ACCOUNT CP START ACCOUNT 333344444 name 1 CP END ACCOUNT I need to split this file each time "CP START... (7 Replies)
Discussion started by: frustrated1
7 Replies

7. HP-UX

How to split big file on HP-UX and join on Windows?

Hi HP-admins, I have 120GB file on HP-UX and need to split to 4GB pieces and join them on Windows. As I don't want to use zipsplit, tried to use split command and join on windows using "copy /b" but it doesn't work (It merges and creates new file but file is corrupt) What is the correct... (6 Replies)
Discussion started by: prvnrk
6 Replies

8. UNIX for Dummies Questions & Answers

Split large file to smaller fastly

hi , I have a requirement input file: 1 1111111111111 108 1 1111111111111 109 1 1111111111111 109 1 1111111111111 110 1 1111111111111 111 1 1111111111111 111 1 1111111111111 111 1 1111111111111 112 1 1111111111111 112 1 1111111111111 112 The output should be, (19 Replies)
Discussion started by: mechvijays
19 Replies

9. UNIX for Dummies Questions & Answers

Split files into smaller ones with 1000 hierarchies in a single file.

input file: AD,00,--,---,---,---,---,---,---,--,--,--- AM,000,---,---,---,---,---,--- AR, ,---,--,---,--- AA,---,---,---,--- AT,--- AU,---,---,--- AS,---,--- AP,---,---,--- AI,--- AD,00,---,---,---, ,---,---,---,---,---,--- AM,000,---,---,--- AR,... (6 Replies)
Discussion started by: kcdg859
6 Replies

10. UNIX for Beginners Questions & Answers

Split large file into smaller files without disturbing the entry chunks

Dears, Need you help with the below file manipulation. I want to split the file into 8 smaller files but without cutting/disturbing the entries (meaning every small file should start with a entry and end with an empty line). It will be helpful if you can provide a one liner command for this... (12 Replies)
Discussion started by: Kamesh G
12 Replies
VHIER(1p)						User Contributed Perl Documentation						 VHIER(1p)

NAME
vhier - Return all files in a verilog hierarchy using Verilog::Netlist SYNOPSIS
vhier --help vhier [verilog_options] [-o filename] [verilog_files.v...] DESCRIPTION
Vhier reads the Verilog files passed on the command line and outputs a tree of all of the filenames, modules, and cells referenced by that file. VERILOG ARGUMENTS
The following arguments are compatible with GCC, VCS and most Verilog programs. +define+var+value =item -Dvar=value Defines the given preprocessor symbol. -F file Read the specified file, and act as if all text inside it was specified as command line parameters. Any relative paths are relative to the directory containing the specified file. -f file Read the specified file, and act as if all text inside it was specified as command line parameters. Any relative paths are relative to the current directory. +incdir+dir =item -Idir Add the directory to the list of directories that should be searched for include directories or libraries. +libext+ext+ext... Specify the extensions that should be used for finding modules. If for example module x is referenced, look in x.ext. -sv Specifies SystemVerilog language features should be enabled; equivalent to "--language 1800-2009". This option is selected by default, it exists for compatibility with other simulators. -y dir Add the directory to the list of directories that should be searched for include directories or libraries. VHIER ARGUMENTS
--help Displays this message and program version and exits. --o file Use the given filename for output instead of stdout. --cells Show the module name of all cells in top-down order. --forest Show "ASCII-art" hierarchy tree of all cells (like ps --forest) --input-files Show all input filenames. Copying all of these files should result in only those files needed to represent the entire design. --instance Show module instance names. --language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009> Set the language standard for the files. This determines which tokens are signals versus keywords, such as the ever-common "do" (data- out signal, versus a do-while loop keyword). --resolve-files Show resolved filenames passed on the command line. This will convert raw module and filenames without paths to include the library search path directory. Output filenames will be in the same order as passed on the command line. Unlike --input-files or --module-files, hierarchy is not traversed. --module-files Show all module filenames in top-down order. Child modules will always appear as low as possible, so that reversing the list will allow bottom-up processing of modules. Unlike input-files, header files are not included. --modules Show all module names. --nomissing Do not complain about references to missing modules. --missing-modules With --nomissing, show all modules that are not found. --synthesis Define SYNTHESIS, and ignore text bewteen "ambit", "pragma", "synopsys" or "synthesis" translate_off and translate_on meta comments. Note using metacomments is discouraged as they have led to silicon bugs (versus ifdef SYNTHESIS); see <http://www.veripool.org/papers/TenIPEdits_SNUGBos07_paper.pdf>. --top-module module Start the report at the specified module name, ignoring all modules that are not the one specified with --top-module or below, and report an error if the --top-module specified does not exist. Without this option vhier will report all modules, starting at the module(s) that have no children below them. Note this option will not change the result of the --input-files list, as the files needed to parse any design are independent of which modules are used. --version Displays program version and exits. --xml Create output in XML format. DISTRIBUTION
Verilog-Perl is part of the <http://www.veripool.org/> free Verilog EDA software tool suite. The latest version is available from CPAN and from http://www.veripool.org/verilog-perl <http://www.veripool.org/verilog-perl>. Copyright 2005-2012 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. AUTHORS
Wilson Snyder <wsnyder@wsnyder.org> SEE ALSO
Verilog-Perl, Verilog::Getopt, Verilog::Preproc, Verilog::Netlist perl v5.14.2 2012-05-04 VHIER(1p)
All times are GMT -4. The time now is 09:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy