I
icebrakers2008
Hi,
I am new to perl, I have a sample file like this
***********************************************************************************
Path 11: VIOLATED Hold Check with Pin core1_2/tx_lr/ifft128/
u7_mem_fft_0/u5_
data_ram_5/\mem_reg[8][13] /CP
Endpoint: core1_2/tx_lr/ifft128/u7_mem_fft_0/u5_data_ram_5/\mem_r
eg[8][13] /D (v) checked with leading edge of 'x_clk'
Beginpoint: core1_2/tx_lr/ifft128/u4_fft_core_top_0/
u0_fft_mux_0/\dout_5_
reg[13] /Q (v) triggered by leading edge of 'x_clk'
Path Groups: {reg2reg}
Other End Arrival Time 0.805
+ Hold -0.017
+ Phase Shift 0.000
- CPPR Adjustment 0.055
+ Uncertainty 0.100
= Required Time 0.834
Arrival Time 0.795
Slack Time -0.039
Clock Rise Edge 0.000
= Beginpoint Arrival Time 0.000
Timing Path:
****************************************************************************************
I need to print whole line which starts with 'Endpoint' - But this
line is spread in two lines as shown above, I want to print this in
the same line. The whole file contains thousands of similar lines. I
could able to print the line by searching "Endpoint" - but it only
gives half the line and other half is in next line, which I am not
able to print.
Here is what I have:
#!/usr/bin/perl
use warnings;
use strict;
my $fh;
open($fh, "<test2.rpt") - # test2.rpt is the file containing lines I
mentioned above.
or die "Can't open: $!";
while (my $line = <$fh>) # was $line
{
if ($line=~m/Endpoint:/) {
print "\n";
#print "$1";
print "$line";
}
}
Appreciate your help.
- SR
I am new to perl, I have a sample file like this
***********************************************************************************
Path 11: VIOLATED Hold Check with Pin core1_2/tx_lr/ifft128/
u7_mem_fft_0/u5_
data_ram_5/\mem_reg[8][13] /CP
Endpoint: core1_2/tx_lr/ifft128/u7_mem_fft_0/u5_data_ram_5/\mem_r
eg[8][13] /D (v) checked with leading edge of 'x_clk'
Beginpoint: core1_2/tx_lr/ifft128/u4_fft_core_top_0/
u0_fft_mux_0/\dout_5_
reg[13] /Q (v) triggered by leading edge of 'x_clk'
Path Groups: {reg2reg}
Other End Arrival Time 0.805
+ Hold -0.017
+ Phase Shift 0.000
- CPPR Adjustment 0.055
+ Uncertainty 0.100
= Required Time 0.834
Arrival Time 0.795
Slack Time -0.039
Clock Rise Edge 0.000
= Beginpoint Arrival Time 0.000
Timing Path:
****************************************************************************************
I need to print whole line which starts with 'Endpoint' - But this
line is spread in two lines as shown above, I want to print this in
the same line. The whole file contains thousands of similar lines. I
could able to print the line by searching "Endpoint" - but it only
gives half the line and other half is in next line, which I am not
able to print.
Here is what I have:
#!/usr/bin/perl
use warnings;
use strict;
my $fh;
open($fh, "<test2.rpt") - # test2.rpt is the file containing lines I
mentioned above.
or die "Can't open: $!";
while (my $line = <$fh>) # was $line
{
if ($line=~m/Endpoint:/) {
print "\n";
#print "$1";
print "$line";
}
}
Appreciate your help.
- SR