#include "types.h"
#include "ezxml.h"
Go to the source code of this file.
Functions | |
void | read_config_file (char *file_name) |
void read_config_file | ( | char * | file_name | ) |
Definition at line 47 of file read_xml_config_file.c.
00048 { 00049 ezxml_t doc, next; 00050 00051 /* Parse the xml file */ 00052 oassert(file_name != NULL); 00053 doc = ezxml_parse_file(file_name); 00054 00055 if (doc == NULL) 00056 { 00057 printf("error: could not parse xml configuration file\n"); 00058 return; 00059 } 00060 00061 /* Root element should be config */ 00062 CheckElement(doc, "config"); 00063 00064 /* Process the verilog files */ 00065 next = FindElement(doc, "verilog_files", (boolean)TRUE); 00066 read_verilog_files(next, &configuration); 00067 FreeNode(next); 00068 00069 /* Process the output */ 00070 next = FindElement(doc, "output", (boolean)TRUE); 00071 read_outputs(next, &configuration); 00072 FreeNode(next); 00073 00074 /* Process the optimizations */ 00075 set_default_optimization_settings(&configuration); 00076 next = FindElement(doc, "optimizations", (boolean)FALSE); 00077 if (next) 00078 { 00079 read_optimizations(next, &configuration); 00080 FreeNode(next); 00081 } 00082 00083 /* Process the debug switches */ 00084 next = FindElement(doc, "debug_outputs", (boolean)TRUE); 00085 read_debug_switches(next, &configuration); 00086 FreeNode(next); 00087 00088 /* Release the full XML tree */ 00089 FreeNode(doc); 00090 return; 00091 }