Below is a sequence that is repeated multiple times in the file that I will be reading using TCL.
Startpoint: FF1 (rising edge-triggered flip-flop clocked by Clk)
Endpoint: FF2 (rising edge-triggered flip-flop clocked by Clk)
Path Group: Clk
Path Type: max
Point Incr Path
-----------------------------------------------------------
clock Clk (rise edge) 0.00 0.00
clock network delay (propagated) 1.10 * 1.10
FF1/CLK (fdef1a15) 0.00 1.10 r
FF1/Q (fdef1a15) 0.50 * 1.60 r
U2/Y (buf1a27) 0.11 * 1.71 r
U3/Y (buf1a27) 0.11 * 1.82 r
FF2/D (fdef1a15) 0.05 * 1.87 r
data arrival time 1.87
clock Clk (rise edge) 4.00 4.00
clock network delay (propagated) 1.00 * 5.00
FF2/CLK (fdef1a15) 5.00 r
library setup time -0.21 * 4.79
data required time 4.79
------------------------------------------------------------
data required time 4.79
data arrival time -1.87
------------------------------------------------------------
slack (MET) 2.92
The start is indicated by Startpoint and end is indicated by slack.
I am finding a way to write a loop that will read the first line Startpoint.
Then file pointer goes to subsequent lines and I read and do postprocessing on them.
Once Slack line encountered, loop goes to the next Startpoint in the file and same thing repeats.
Only if startpoint line found, I go further and do all the processing.
Just having trouble finding way for the file pointer to shift to next line once Startpoint line is encountered. Similarly, file pointer should shift to next Startpoint line when slack line is encountered.
I am new to TCL and trying to imagine how this would work.
Python equivalent of what I want to acheive is:
open file for read with pointer fp
for line in fp:
if startpoint found
for next_line_in_file in fp:
do post processing until slack line found and then continue from outer for loop