Verilog converted to html by ',$js); print_h_or_js($out,' ',$js); print_h_or_js($out," v2html $version<\/A> \n",$js); print_h_or_js($out," (written by",$js); print_h_or_js($out," ",$js); print_h_or_js($out,"Costas Calamvokis<\/A>).<\/i> | ",$js); print_h_or_js($out,''. 'Help |
". "$prevnext | ", $js); } foreach $elem (@{$data->{order}}) { # skip hierarchy if frames are on - it'll always be in top frame next if (($elem eq 'Hierarchy') && $frames); if ( $elem eq $type ) { print_h_or_js($out,"". "$elem | ",$js); } else { print_h_or_js($out,"". "{$elem}\">$elem | ", $js); } } print_h_or_js($out,"<\/tr><\/table><\/center>\n",$js); } ############################################################################### # Index printing ############################################################################### ############################################################################### # Collect the data and print all indexes # sub print_indexes { my ($fdata,$js) = @_; my (@files,@modules,@signals,@tasks,@functions,$m,$sig,$tf,$t_type,$indl); # this stores the mapping between index letter and index file name # for each of the indexes, as well as the nav bar $index_info = {}; # approx line count we'd like for an index, divide be expected lines # per entry to give number of elements per index that we need to # call print index $indl = 1000; @files = &rvp::get_files($fdata); # get the files @modules = &rvp::get_modules($fdata); # get the modules # get the signals @signals = (); foreach $m (&rvp::get_modules($fdata)) { foreach $sig (&rvp::get_modules_signals($fdata,$m)) { push (@signals,"$sig $m"); } } # get the tasks and functions @tasks = @functions = (); foreach $m (&rvp::get_modules($fdata)) { foreach $tf (&rvp::get_modules_t_and_f($fdata,$m)) { ($t_type,,,)=&rvp::get_modules_t_or_f($fdata,$m,$tf); if ($t_type eq 'task') { push (@tasks,"$tf $m"); } else { push (@functions,"$tf $m"); } } } # sort and split them across files $index_info->{Files} = calc_index($fdata,$navbar{Files},\@files, $indl/4); $index_info->{Modules} = calc_index($fdata,$navbar{Modules},\@modules,$indl/8); $index_info->{Signals} = calc_index($fdata,$navbar{Signals},\@signals, $indl/20); $index_info->{Tasks} = calc_index($fdata,$navbar{Tasks},\@tasks, $indl/3); $index_info->{Functions}= calc_index($fdata,$navbar{Functions},\@functions, $indl/3); # now print all the indexes print_index($fdata,$index_info->{Files},'Files',\@files,\&print_file_index); print_index($fdata,$index_info->{Modules},'Modules',\@modules,\&print_module_index); print_index($fdata,$index_info->{Signals},'Signals',\@signals,\&print_signal_index); print_index($fdata,$index_info->{Tasks},'Tasks',\@tasks,\&print_tf_index); print_index($fdata,$index_info->{Functions},'Functions',\@functions,\&print_tf_index); } ############################################################################### # calculate all sorts of stuff about the index (also sorts the data) # returns a hash for the that is stored in $index_info->{type} # sub calc_index { my ($fdata,$fname, $data, $items_per_index) = @_; my ($first_char,$elem_first_char,$info,$page,$ofile,$i,$items); @{$data} = sort { uc($a) cmp uc($b) } @{$data}; # work out the indexes $first_char=""; # make sure it won't match $page=$items=0; $info = {}; $info->{nb} = {}; # navbar, labels and links eg {A}='hierarchy-fn#index--A' $info->{nb}{order} = []; # the navbar order, array of other keys (A,B...) $info->{letters} = {}; # hash mapping start letters to index files $info->{pages} = 0; # number of pages $info->{files} = []; # array of hashes { name, start, end } indexed 1,2... for ($i=0;$i
". "$first_char". " |
$f1 | ". "$f2 |