in reply to Re: verilog perl usage
in thread verilog perl usage

Thanks toolic,appreciate your help.the information was very useful. I am trying to do the following a)open the files in a given directory/subdirectories-only files with extension .v/.vh/.svn/.sv/.svi. At present concentrating on only .v and .vh b)search for verilog module definition c)for each module that is defined more than once the list of all files(full path /relative path) in which the module is defined should be printed. d)must be able to exclude // from parsing i figured out i could do much of the stuff using o the vhier,but i am unsure of how to use the verilog arguments like 1.+incdir+dir =item -Idir Add the directory to the list of directories that should be searched for include directories or libraries. 2.and also the vhier -f file:Read the specified file, and act as if all text inside it was specified as command line parameters. Should a filehandle be passed or just the filename? I know this sounds really silly asking such basic questions but I am good at writing perl code rather than using packages Would appreciate if you could throw some light on this. Thanks

Replies are listed 'Best First'.
Re^3: verilog perl usage
by toolic (Bishop) on Feb 26, 2009 at 01:23 UTC
    It looks like vhier can do all the things you want to do. The script accepts filenames, just like any standard unix command. Just give it a try.
    $ vhier -f file.txt --modules --input-files
      Hi toolic I am trying to give a particular directory for vhier to search for the include directories and libraries The usage is vhier +incdir+dir. This translates to what I give on the command prompt, I am in a directory just above i2c( vhier +incdir+./i2c --modules i2c_master_top.v).this gives that it cannot find i2c. I have tried a lot of options on the command prompt like vhier --II<./i2c> and vhier +incdir+I<./i2c>. This usage is mentioned in vhier script itself(downloaded from cpan version 3.110) wonder if you could throw some light on how to give the option for the include directories.would really appreciate it. thanks for your time