Verilog Documentation Generator
veridoc-page-factory.c File Reference

Defines functions and structures responsible for building the documentation pages. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "veridoc-page-factory.h"

Functions

void veridoc_pf_build (veridoc_manifest *manifest, veridoc_config *config, verilog_source_tree *source)
 Top level function for exporting the whole parsed data set to html. More...
 
void veridoc_pf_copy_assets (veridoc_config *config)
 Responsible for copying all template asset files to the output folder.
 
void veridoc_pf_export_file_list_json (veridoc_manifest *manifest, json_file *fh)
 Responsible for exporting the list of parsed files to a json data file. More...
 
json_object * veridoc_pf_export_hierarchy_json (ast_module_declaration *top_module, json_file *destination, unsigned int depth)
 Responsible for emitting the verilog module hierarchy as JSON. More...
 
void veridoc_pf_export_module_json (veridoc_config *config, ast_module_declaration *module)
 Function responsible for exporting information on a module as JSON. More...
 
void veridoc_pf_export_module_list_json (verilog_source_tree *source, json_file *fh)
 Responsible for emitting the list of modules for the project.
 
char * veridoc_pf_jsonfilename (veridoc_config *config, char *filename)
 concatenates the config->v_output and supplied filename into a single file path and returns it.
 
char * veridoc_pf_module_filename (veridoc_config *config, ast_module_declaration *module)
 Creates a uniform filename for a module's JSON data structure.
 
boolean veridoc_pf_setup_output_folder (veridoc_config *config)
 Sets up the output folder. More...
 

Detailed Description

Defines functions and structures responsible for building the documentation pages.

Function Documentation

void veridoc_pf_build ( veridoc_manifest manifest,
veridoc_config config,
verilog_source_tree *  source 
)

Top level function for exporting the whole parsed data set to html.

Parameters
[in]manifest- The list of files parsed.
[in]config- Configuration options for the output.
[in]source- The parsed source tree
void veridoc_pf_export_file_list_json ( veridoc_manifest manifest,
json_file fh 
)

Responsible for exporting the list of parsed files to a json data file.

Parameters
[in]manifest- The list of files.
[in]destination- The JSON file to write to.
Returns
Void
json_object* veridoc_pf_export_hierarchy_json ( ast_module_declaration *  top_module,
json_file destination,
unsigned int  depth 
)

Responsible for emitting the verilog module hierarchy as JSON.

Parameters
[in]top_module- The top level module / root of the hierarchy.
[in]source- The parsed source tree
void veridoc_pf_export_module_json ( veridoc_config config,
ast_module_declaration *  module 
)

Function responsible for exporting information on a module as JSON.

Parameters
[in]config- The veridoc config being adhered to.
[in]module- The module to document.
boolean veridoc_pf_setup_output_folder ( veridoc_config config)

Sets up the output folder.

Returns
True if all goes well, false otherwise.