.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Getopt 3pm" .TH Getopt 3pm "2014-09-21" "perl v5.20.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Verilog::Getopt \- Get Verilog command line options .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Verilog::Getopt; \& \& my $opt = new Verilog::Getopt; \& $opt\->parameter (qw( +incdir+standard_include_directory )); \& \& @ARGV = $opt\->parameter (@ARGV); \& ... \& print "Path to foo.v is ", $opt\->file_path(\*(Aqfoo.v\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Verilog::Getopt provides standardized handling of options similar to Verilog/VCS and cc/GCC. .SH "OPTIONS" .IX Header "OPTIONS" The \fInew()\fR constructor accepts the following options: .IP "filename_expansion=>1" 4 .IX Item "filename_expansion=>1" Enable converting filenames to relative filenames when possible. This option is needed when the \-F option will be used. If flags are passed through Getopt which should otherwise not be expanded (e.g. \*(L"\-\-out myfile.v\*(R") having this option set may undesirably expand myfile.v to an absolute filename. .IP "gcc_style=>0" 4 .IX Item "gcc_style=>0" Disable parsing of GCC-like parameters. .IP "vcs_style=>0" 4 .IX Item "vcs_style=>0" Disable parsing of VCS-like parameters. .SH "METHODS" .IX Header "METHODS" .ie n .IP "$opt = Verilog::Getopt\->new ( \fIopts\fR )" 4 .el .IP "\f(CW$opt\fR = Verilog::Getopt\->new ( \fIopts\fR )" 4 .IX Item "$opt = Verilog::Getopt->new ( opts )" Create a new Getopt. See \s-1OPTIONS\s0 above. .ie n .IP "$self\->file_path ( \fIfilename\fR, [\fIlookup_type\fR] )" 4 .el .IP "\f(CW$self\fR\->file_path ( \fIfilename\fR, [\fIlookup_type\fR] )" 4 .IX Item "$self->file_path ( filename, [lookup_type] )" Returns a new path to the filename, using the library directories and search paths to resolve the file. Optional lookup_type is 'module', \&'include', or 'all', to use only module_dirs, incdirs, or both for the lookup. .ie n .IP "$self\->get_parameters ( )" 4 .el .IP "\f(CW$self\fR\->get_parameters ( )" 4 .IX Item "$self->get_parameters ( )" Returns a list of parameters that when passed through \f(CW$self\fR\->\fIparameter()\fR should result in the same state. Often this is used to form command lines for downstream programs that also use Verilog::Getopt. .ie n .IP "$self\->parameter ( \e@params )" 4 .el .IP "\f(CW$self\fR\->parameter ( \e@params )" 4 .IX Item "$self->parameter ( @params )" Parses any recognized parameters in the referenced array, removing the standard parameters and returning a array with all unparsed parameters. .Sp The below list shows the VCS-like parameters that are supported, and the functions that are called: .Sp .Vb 10 \& +libext+I+I... libext (I) \& +incdir+I incdir (I) \& +define+I[+=]I define (I,I) \& +define+I define (I,undef) \& +librescan Ignored \& \-F I Parse parameters in file relatively \& \-f I Parse parameters in file \& \-v I library (I) \& \-y I module_dir (I) \& all others Put in returned list .Ve .Sp The below list shows the GCC-like parameters that are supported, and the functions that are called: .Sp .Vb 7 \& \-DI=I define (I,I) \& \-DI define (I,undef) \& \-UI undefine (I) \& \-II incdir (I) \& \-F I Parse parameters in file relatively \& \-f I Parse parameters in file \& all others Put in returned list .Ve .ie n .IP "$self\->write_parameters_file ( \fIfilename\fR )" 4 .el .IP "\f(CW$self\fR\->write_parameters_file ( \fIfilename\fR )" 4 .IX Item "$self->write_parameters_file ( filename )" Write the output from get_parameters to the specified file. .SH "ACCESSORS" .IX Header "ACCESSORS" .ie n .IP "$self\->define ( $token, $value )" 4 .el .IP "\f(CW$self\fR\->define ( \f(CW$token\fR, \f(CW$value\fR )" 4 .IX Item "$self->define ( $token, $value )" This method is called when a define is recognized. The default behavior loads a hash that is used to fulfill define references. This function may also be called outside parsing to predefine values. .Sp An optional third argument specifies parameters to the define, and a fourth argument if true indicates the define was set on the command line and should not be removed by `undefineall. .ie n .IP "$self\->define_names_sorted" 4 .el .IP "\f(CW$self\fR\->define_names_sorted" 4 .IX Item "$self->define_names_sorted" Return sorted list of all define names that currently exist. .ie n .IP "$self\->defparams ( $token )" 4 .el .IP "\f(CW$self\fR\->defparams ( \f(CW$token\fR )" 4 .IX Item "$self->defparams ( $token )" This method returns the parameter list of the define. This will be defined, but false, if the define does not have arguments. .ie n .IP "$self\->defvalue ( $token )" 4 .el .IP "\f(CW$self\fR\->defvalue ( \f(CW$token\fR )" 4 .IX Item "$self->defvalue ( $token )" This method returns the value of a given define, or prints a warning. .ie n .IP "$self\->defvalue_nowarn ( $token )" 4 .el .IP "\f(CW$self\fR\->defvalue_nowarn ( \f(CW$token\fR )" 4 .IX Item "$self->defvalue_nowarn ( $token )" This method returns the value of a given define, or undef. .ie n .IP "$self\->depend_files ()" 4 .el .IP "\f(CW$self\fR\->depend_files ()" 4 .IX Item "$self->depend_files ()" Returns reference to list of filenames referenced with file_path, useful for creating dependency lists. With argument, adds that file. With list reference argument, sets the list to the argument. .ie n .IP "$self\->file_abs ( $filename )" 4 .el .IP "\f(CW$self\fR\->file_abs ( \f(CW$filename\fR )" 4 .IX Item "$self->file_abs ( $filename )" Using the incdir and libext lists, convert the specified module or filename (\*(L"foo\*(R") to a absolute filename (\*(L"include/dir/foo.v\*(R"). .ie n .IP "$self\->file_skip_special ( $filename )" 4 .el .IP "\f(CW$self\fR\->file_skip_special ( \f(CW$filename\fR )" 4 .IX Item "$self->file_skip_special ( $filename )" Return true if the filename is one that generally should be ignored when recursing directories, such as for example, \*(L".\*(R", \*(L"\s-1CVS\*(R",\s0 and \*(L".svn\*(R". .ie n .IP "$self\->file_substitute ( $filename )" 4 .el .IP "\f(CW$self\fR\->file_substitute ( \f(CW$filename\fR )" 4 .IX Item "$self->file_substitute ( $filename )" Removes existing environment variables from the provided filename. Any undefined variables are not substituted nor cause errors. .ie n .IP "$self\->incdir ()" 4 .el .IP "\f(CW$self\fR\->incdir ()" 4 .IX Item "$self->incdir ()" Returns reference to list of include directories. With argument, adds that directory. .ie n .IP "$self\->libext ()" 4 .el .IP "\f(CW$self\fR\->libext ()" 4 .IX Item "$self->libext ()" Returns reference to list of library extensions. With argument, adds that extension. .ie n .IP "$self\->libext_matches (\fIfilename\fR)" 4 .el .IP "\f(CW$self\fR\->libext_matches (\fIfilename\fR)" 4 .IX Item "$self->libext_matches (filename)" Returns true if the passed filename matches the libext. .ie n .IP "$self\->library ()" 4 .el .IP "\f(CW$self\fR\->library ()" 4 .IX Item "$self->library ()" Returns reference to list of libraries. With argument, adds that library. .ie n .IP "$self\->module_dir ()" 4 .el .IP "\f(CW$self\fR\->module_dir ()" 4 .IX Item "$self->module_dir ()" Returns reference to list of module directories. With argument, adds that directory. .ie n .IP "$self\->remove_defines ( $token )" 4 .el .IP "\f(CW$self\fR\->remove_defines ( \f(CW$token\fR )" 4 .IX Item "$self->remove_defines ( $token )" Return string with any definitions in the token removed. .ie n .IP "$self\->undef ( $token )" 4 .el .IP "\f(CW$self\fR\->undef ( \f(CW$token\fR )" 4 .IX Item "$self->undef ( $token )" Deletes a hash element that is used to fulfill define references. This function may also be called outside parsing to erase a predefined value. .ie n .IP "$self\->undefineall ()" 4 .el .IP "\f(CW$self\fR\->undefineall ()" 4 .IX Item "$self->undefineall ()" Deletes all non-command line definitions, for implementing `undefineall. .SH "DISTRIBUTION" .IX Header "DISTRIBUTION" Verilog-Perl is part of the free Verilog \s-1EDA\s0 software tool suite. The latest version is available from \s-1CPAN\s0 and from . .PP Copyright 2000\-2014 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the \s-1GNU\s0 Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. .SH "AUTHORS" .IX Header "AUTHORS" Wilson Snyder .SH "SEE ALSO" .IX Header "SEE ALSO" Verilog-Perl, Verilog::Language = cut