Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jess916

    Find and Replace multiple strings

    I am using the script below to find and replace while comparing variable names. Basically there are two sperate files where I extract a register name. When two registers match I need the register name to replaced with an old name. the problem with the script below is that it will do the replace...
  2. jess916

    Reenter while loop

    Sorry, I should have explained more thouroughly. The code is looking for all the information i need for the first "block" of information. Then I need to go to the second file to see if it matches with a block in the second file. The code as is will compare the first register name from the first...
  3. jess916

    Reenter while loop

    How would I reenter a while loop within a while loop. So far my code reads a line from the first file and checks the first line of the second file to see if they are the same. If they do not match the next line of the 1st file is read, but I need the 2nd line of the first file to be read. Thus...
  4. jess916

    Count Occurances of string in an array or text file

    Thanks Kevin. Sorry for not being more specific but I need the code to count the number of signals without specifying the signal name. In other words I have a hash and the code would count the instances were a signal is repeated without knowing a specific signal to look for. Is this possible?
  5. jess916

    Count Occurances of string in an array or text file

    I have a list of strings that are being extracted by pattern matching. I would like to count the number of times any particular string is repeated. I have no idea whether I should store the strings to an array or print to a text file. Any ideas? Sample Data pad1 sigA_1[1] input pad2 sigB output...
  6. jess916

    Read text file and output in different format

    Thanks this worked great. I just had to had one more else statement for the names without comments. else { print OUTFILE "$3 $2\t$1;\n"; }
  7. jess916

    Read text file and output in different format

    Sorry forgot the sample data... Input: signal1 Input "comments" signalA Input signal2 Output "comments" signalB Output This is the format I get from my code: Module name( signal1 signalA signal2 signalB ); input signal 1 input signal A output signal 2 output signal B Endmodule
  8. jess916

    Read text file and output in different format

    Thanks guys! I was actually able to figure something out. The code posted below seemed to work (minus the comments). Also rharsh I doesn't need to be sorted. Thank you again!! #!/usr/bin/perl open ( MYFILE, '<Netlist.txt' ); open ( OUTFILE, '>Verilog.txt' ); $name = <STDIN>; chomp($name)...
  9. jess916

    Read text file and output in different format

    Hi KevinADC, I assure you this is not schoolwork. The data is made up I acutally need this to expedite the process of writing Verilog code which contains signals, direction, and comments. I am taking the netlist, sorting by direction and would like to use Perl to output the verilog format. Due...
  10. jess916

    Read text file and output in different format

    I have outlined the steps I want to take to get the code but since i just started learning the language last week, it has been a challange. Here is what I have so far. #!/usr/bin/perl open ( MYFILE, '<in.txt' ); open ( OUTFILE, '>out.txt' ); $name = <STDIN>; chomp($name); print OUTFILE...
  11. jess916

    Read text file and output in different format

    I am new to Perl so this may be a rather simple task, but I have tab delimited text file that I need to parse through(except the comments that have quotations). For example if I have the following data in a text file what would be the best way to write a script that would output the data in a...

Part and Inventory Search

Back
Top