I pieced together your 2 VCD file fragments, and I created some code which will parse the file:
use warnings;
use strict;
use Verilog::VCD qw(:all);
my $vcd= parse_vcd('sample.vcd');
for my $code (keys %{ $vcd }) {
for my $net (@{ $vcd->{$code}->{nets} }) {
print "$net->{name}\n";
for my $aref (@{ $vcd->{$code}{tv} }) {
print "@{ $aref }\n";
}
}
}
It seems like you really only need the signal names, not the times or logic values (except for maybe your BBPLL_CLKO_DIG_96M signal?). Parsing this way gives you all the info you need. You just need to format it the way you want.
It's odd that your VCD file header declares some signals (such as AGC_IF_CAP[2:0]) multiple times. It seems unnecessary.