Dear all,
I would like to split a file incrementally. My file looks like:
$path {
$name "path_sparc_ifu_dec_1" ;
$transition {
"dtu_inst_d[22]" v ; // (in)
"U622/Y" ^ ; // (INVX16_LVT)
"U870/Y" ^ ; // (AND2X1_LVT)
"U873/Y" v ; // (INVX1_LVT)
"U872/Y" ^ ; // (NAND3X0_LVT)
"U1045/Y" v ; // (NAND3X0_LVT)
"U1046/Y" ^ ; // (NAND3X0_LVT)
"U1063/Y" ^ ; // (OR3X1_LVT)
"U1092/Y" ^ ; // (OR3X1_LVT)
"U1095/Y" ^ ; // (OA21X1_LVT)
"illinste_ff_q_reg_0_/D" ^ ; // (DFFX1_LVT)
}
}
$path {
$name "path_sparc_ifu_dec_2" ;
$transition {
"dtu_inst_d[22]" ^ ; // (in)
"U622/Y" v ; // (INVX16_LVT)
"U870/Y" v ; // (AND2X1_LVT)
"U873/Y" ^ ; // (INVX1_LVT)
"U872/Y" v ; // (NAND3X0_LVT)
"U1045/Y" ^ ; // (NAND3X0_LVT)
"U1046/Y" v ; // (NAND3X0_LVT)
"U1063/Y" v ; // (OR3X1_LVT)
"U1092/Y" v ; // (OR3X1_LVT)
"U1095/Y" v ; // (OA21X1_LVT)
"illinste_ff_q_reg_0_/D" v ; // (DFFX1_LVT)
}
}
$path {
$name "path_sparc_ifu_dec_3" ;
$transition {
"dtu_inst_d[22]" v ; // (in)
"U622/Y" ^ ; // (INVX16_LVT)
"U782/Y" ^ ; // (AND2X1_LVT)
"U781/Y" ^ ; // (AND2X1_LVT)
"U632/Y" v ; // (INVX0_LVT)
"U999/Y" ^ ; // (NAND4X0_LVT)
"U1000/Y" v ; // (NAND2X0_LVT)
"U1006/Y" ^ ; // (NAND4X0_LVT)
"U1007/Y" ^ ; // (AND4X1_LVT)
"prope_ff_q_reg_0_/D" ^ ; // (DFFX1_LVT)
}
}
.
.
.
I would like to have files which have "path" incrementally.
The 1st file has the 1st path. The 2nd file has the 1st and 2nd paths. The 3rd file has the 1st, 2nd, and 3rd paths. This incremental splitting will be continued the end of the original file. (upto n).
P1:
$path {
$name "path_sparc_ifu_dec_1" ;
$transition {
"dtu_inst_d[22]" v ; // (in)
"U622/Y" ^ ; // (INVX16_LVT)
"U870/Y" ^ ; // (AND2X1_LVT)
"U873/Y" v ; // (INVX1_LVT)
"U872/Y" ^ ; // (NAND3X0_LVT)
"U1045/Y" v ; // (NAND3X0_LVT)
"U1046/Y" ^ ; // (NAND3X0_LVT)
"U1063/Y" ^ ; // (OR3X1_LVT)
"U1092/Y" ^ ; // (OR3X1_LVT)
"U1095/Y" ^ ; // (OA21X1_LVT)
"illinste_ff_q_reg_0_/D" ^ ; // (DFFX1_LVT)
}
}
P2:
$path {
$name "path_sparc_ifu_dec_1" ;
$transition {
"dtu_inst_d[22]" v ; // (in)
"U622/Y" ^ ; // (INVX16_LVT)
"U870/Y" ^ ; // (AND2X1_LVT)
"U873/Y" v ; // (INVX1_LVT)
"U872/Y" ^ ; // (NAND3X0_LVT)
"U1045/Y" v ; // (NAND3X0_LVT)
"U1046/Y" ^ ; // (NAND3X0_LVT)
"U1063/Y" ^ ; // (OR3X1_LVT)
"U1092/Y" ^ ; // (OR3X1_LVT)
"U1095/Y" ^ ; // (OA21X1_LVT)
"illinste_ff_q_reg_0_/D" ^ ; // (DFFX1_LVT)
}
}
$path {
$name "path_sparc_ifu_dec_2" ;
$transition {
"dtu_inst_d[22]" ^ ; // (in)
"U622/Y" v ; // (INVX16_LVT)
"U870/Y" v ; // (AND2X1_LVT)
"U873/Y" ^ ; // (INVX1_LVT)
"U872/Y" v ; // (NAND3X0_LVT)
"U1045/Y" ^ ; // (NAND3X0_LVT)
"U1046/Y" v ; // (NAND3X0_LVT)
"U1063/Y" v ; // (OR3X1_LVT)
"U1092/Y" v ; // (OR3X1_LVT)
"U1095/Y" v ; // (OA21X1_LVT)
"illinste_ff_q_reg_0_/D" v ; // (DFFX1_LVT)
}
}
P3:
$path {
$name "path_sparc_ifu_dec_1" ;
$transition {
"dtu_inst_d[22]" v ; // (in)
"U622/Y" ^ ; // (INVX16_LVT)
"U870/Y" ^ ; // (AND2X1_LVT)
"U873/Y" v ; // (INVX1_LVT)
"U872/Y" ^ ; // (NAND3X0_LVT)
"U1045/Y" v ; // (NAND3X0_LVT)
"U1046/Y" ^ ; // (NAND3X0_LVT)
"U1063/Y" ^ ; // (OR3X1_LVT)
"U1092/Y" ^ ; // (OR3X1_LVT)
"U1095/Y" ^ ; // (OA21X1_LVT)
"illinste_ff_q_reg_0_/D" ^ ; // (DFFX1_LVT)
}
}
$path {
$name "path_sparc_ifu_dec_2" ;
$transition {
"dtu_inst_d[22]" ^ ; // (in)
"U622/Y" v ; // (INVX16_LVT)
"U870/Y" v ; // (AND2X1_LVT)
"U873/Y" ^ ; // (INVX1_LVT)
"U872/Y" v ; // (NAND3X0_LVT)
"U1045/Y" ^ ; // (NAND3X0_LVT)
"U1046/Y" v ; // (NAND3X0_LVT)
"U1063/Y" v ; // (OR3X1_LVT)
"U1092/Y" v ; // (OR3X1_LVT)
"U1095/Y" v ; // (OA21X1_LVT)
"illinste_ff_q_reg_0_/D" v ; // (DFFX1_LVT)
}
}
$path {
$name "path_sparc_ifu_dec_3" ;
$transition {
"dtu_inst_d[22]" v ; // (in)
"U622/Y" ^ ; // (INVX16_LVT)
"U782/Y" ^ ; // (AND2X1_LVT)
"U781/Y" ^ ; // (AND2X1_LVT)
"U632/Y" v ; // (INVX0_LVT)
"U999/Y" ^ ; // (NAND4X0_LVT)
"U1000/Y" v ; // (NAND2X0_LVT)
"U1006/Y" ^ ; // (NAND4X0_LVT)
"U1007/Y" ^ ; // (AND4X1_LVT)
"prope_ff_q_reg_0_/D" ^ ; // (DFFX1_LVT)
}
}
Could you let me know how to do this job? Any language (sed,awk,grep) are okay to me.
Best,
Jaeyoung