Sample data in file.txt after parsing two input logs (x.log and y.log) ******************************************open(FILE, "<x.log"); my @array = <FILE>; close(FILE); open(FILE, "<y.log"); my @array1 = <FILE>; close(FILE); open(FILE, ">>file.txt"); my @array2 = <FILE>; foreach $_ (@array & @array1) { @array2 = grep {$_ =~ "mti_clk_chk:"} (@array); print FILE "@array2"; print FILE "\n \n \n"; # close(FILE); @array2 = grep {$_ =~ "mti_clk_chk:"} (@array1); print FILE "@array2"; close(FILE); exit; }
INFO @576892 mti_clk_chk: run_stimulus called; T=576892 INFO @1102266 PHResourceLayer_Z4: mti_clk_chk:################ start o +f test ################ ; T=1102266 INFO @1102334 PHResourceLayer_Z4: mti_clk_chk:Checking the period of M +TI, MTI10 clk from SV; T=1102334 INFO @1102372 mti_clk_chk: Checking period of MTI CLk; T=1102372 INFO @1102377 mti_clk_chk: Period value of MTI Clock: 3.125000 ns; T=1 +102377 INFO @1102377 mti_clk_chk: MTI Clock is being generated correctly ; T= +1102377 INFO @1102377 mti_clk_chk: Checking period of MTI10 CLk; T=1102377 INFO @1102418 mti_clk_chk: Period value of MTI10 Clock: 31.250000 ns; +T=1102418 INFO @1102418 mti_clk_chk: MTI10 Clock is being generated correctly ; +T=1102418 INFO @1102717 PHResourceLayer_Z4: mti_clk_chk: All clock period Checki +ng done; T=1102717 INFO @1148661 mti_clk_chk: C-Code exit execution. code=<aa>; T=1148661 INFO @1148661 mti_clk_chk: ************************ SV END*********** +********* ; T=1148661 UVM_INFO @0 reporter [testbench.top_level_module.\mti_clk_chk::main ]: + MTI_CLK_CHK_STIM Started .....; T=0 UVM_INFO @0 reporter [testbench.top_level_module.\mti_clk_chk::main ]: + run_stimulus called; T=0 UVM_INFO @1092507 reporter [Z4_COREA]: mti_clk_chk: ################ s +tart of test ################ ; T=1092507 UVM_INFO @1092563 reporter [Z4_COREA]: mti_clk_chk: Checking the perio +d of MTI, MTI10 clk from SV; T=1092563 UVM_INFO @1092598 reporter [testbench.top_level_module.\mti_clk_chk::m +ain ]: Checking period of MTI CLk; T=1092598 UVM_INFO @1092605 /proj/rru2_verif/usr/Tilak/SV_UVM/testbench/data_ipd +ss/v_ms_mti_stim_vip/testbench/classes_v/mti_clk_chk.sv(147) uvm_test +_top.default_env.default_sequencer[100]@@mti_clk_chk [mti_clk_chk:INF +O]: Period value of MTI Clock: 3.125000 ns; T=1092605 UVM_INFO @1092605 reporter [testbench.top_level_module.\mti_clk_chk::m +ain ]: MTI Clock is being generated correctly ; T=1092605 UVM_INFO @1092605 reporter [testbench.top_level_module.\mti_clk_chk::m +ain ]: Checking period of MTI10 CLk; T=1092605 UVM_INFO @1092655 /proj/rru2_verif/usr/Tilak/SV_UVM/testbench/data_ipd +ss/v_ms_mti_stim_vip/testbench/classes_v/mti_clk_chk.sv(165) uvm_test +_top.default_env.default_sequencer[100]@@mti_clk_chk [mti_clk_chk:INF +O]: Period value of MTI10 Clock: 31.250000 ns; T=1092655 UVM_INFO @1092655 reporter [testbench.top_level_module.\mti_clk_chk::m +ain ]: MTI10 Clock is being generated correctly ; T=1092655 UVM_INFO @1092850 reporter [Z4_COREA]: mti_clk_chk: All clock period +Checking done; T=1092850 UVM_INFO @1092886 /proj/rru2_verif/usr/Tilak/SV_UVM/testbench/data_ipd +ss/v_ms_mti_stim_vip/testbench/classes_v/mti_clk_chk.sv(186) uvm_test +_top.default_env.default_sequencer[100]@@mti_clk_chk [mti_clk_chk:INF +O]: ************************ SV END******************** ; T=1092886
In reply to Compare two log files line by line containing a keyword by rahu_6697
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |