Email: bknpk@hotmail.com Phone: +972-54-7649119



 

ASIC/FPGA Design and Verification Out Source Services

A perl script example, that prints the scripts process ID and measures the time, which it takes the script to finish its work.

  1. This script is just an example, which shows how to get the process ID (same as in a bash script $$ example ).
    The script also demonstrates how to measure the time it takes the script to finish.

  2. The simple example is shown below:

    #!/bin/perl

    $start_t=time();
    sleep(8);
    system("ps -aefH | grep examp_time_pID");
    print("$$\n");
    $time_t=time()-$start_t;
    print("$time_t\n");

  3. The output of the script is listed below:

    pini@colinux:~/Home_2/GeneralInfo/youtube$ perl ~/bin/examp_time_pID.pl
    pini 4292 3030 0 09:58 pts/0 00:00:00 perl /mnt/Home/pini/bin/examp_time_pID.pl
    pini 4293 4292 0 09:58 pts/0 00:00:00 sh -c ps -aefH | grep examp_time_pID
    4292
    8


Home

An extension to the example from cadance of producer consumer.

SD slave with Samsung flash (k9f1208) (vhdl project).

Run a perl script from vim on a specified text block and convert verilog registers and wires to VHDL signals.






Search This Site


Feedback This Site




new pages on this site