Changeset 217 for soft/giet_vm


Ignore:
Timestamp:
Sep 19, 2012, 9:15:52 AM (12 years ago)
Author:
alain
Message:

Introducing comments in xml_parser.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/xml/xml_parser.c

    r216 r217  
    55// Copyright (c) UPMC-LIP6
    66///////////////////////////////////////////////////////////////////////////////////////
    7 // This program translate an xml file containing a MAPPING_INFO data structure
    8 // to a binary file that can be directly loaded in the boot ROM and used by the GIET.
    9 // The C strcutures are defined in the mapping_info.h file.
     7// This program translate a "map.xml" source file to a binary file "map.bin" that
     8// can be directly loaded in the boot ROM and used by the GIET-VM operating system.
     9//
     10// This map.xml file contains :
     11// 1) the multi-cluster/multi-processors hardware architecture description
     12// 2) the various multi-threaded software applications
     13// 3) the mapping directives bor both the tasks and the virtual segments.
     14// The corresponding C structures are defined in the "mapping_info.h" file.
     15//
     16// This program also generates the "hard_config.h" and the "giet_vsegs.ld" files,
     17// required  to compile the GIET-VM code.
    1018///////////////////////////////////////////////////////////////////////////////////////
    1119
     
    3543#define MAX_PERIPHS             8192
    3644
    37 #define XML_PARSER_DEBUG        0
     45#define XML_PARSER_DEBUG   0
    3846
    3947///////////////////////////////////////////////////////////////////////////////////
     
    20672075}
    20682076
    2069 
     2077//////////////////////////////////////////
    20702078void file_write(int fdout, char* towrite)
    20712079{
     
    20782086}
    20792087
     2088//////////////////////////////////////////////////
    20802089void def_int_write(int fdout, char* def, int num)
    20812090{
     
    20832092    sprintf(buf, "#define\t %s  %d\n", def, num);
    20842093    file_write(fdout, buf);
    2085 
    20862094}
    20872095
     2096/////////////////////////////////////////////////
    20882097void def_hex_write(int fdout, char* def, int num)
    20892098{
     
    20932102}
    20942103
    2095 ///////////////////////////
     2104///////////////////////////////////////
    20962105void  genHd( const char* file_path )
    2097 ///////////////////////////
     2106///////////////////////////////////////
    20982107{
    20992108    int fdout = open_file(file_path);
    21002109
    2101     char* prol = " /* AUTO GENRATED FILE */\n\n#ifndef _HD_CONFIG_H\n#define _HD_CONFIG_H\n\n";
     2110    char* prol = " /* Generated from the mapping_info file */\n\n#ifndef _HD_CONFIG_H\n#define _HD_CONFIG_H\n\n";
    21022111    file_write(fdout, prol);
    21032112
    21042113    def_int_write(fdout, "CLUSTER_X"       , cluster_x);
    21052114    def_int_write(fdout, "CLUSTER_Y"       , cluster_y);
    2106     def_int_write(fdout, "NB_CLUSTERS"      , cluster_index);
     2115    def_int_write(fdout, "NB_CLUSTERS"     , cluster_index);
    21072116    def_hex_write(fdout, "CLUSTER_SIZE"    , ( ((unsigned long)1) << 32)/cluster_index);
    2108     def_int_write(fdout, "NB_PROCS_MAX"     , nb_proc_max);
     2117    def_int_write(fdout, "NB_PROCS_MAX"    , nb_proc_max);
    21092118    def_int_write(fdout, "NB_TIMERS_MAX"   , nb_timer_channel_max);
    21102119    def_int_write(fdout, "NB_DMAS_MAX"     , nb_dma_channel_max);
     
    21232132}
    21242133
     2134////////////////////////////////////////////////////////
    21252135void ld_write(int fdout, char* seg, unsigned int addr)
    21262136{
     
    21312141}
    21322142
    2133 ///////////////////////////
     2143///////////////////////////////////////
    21342144void  genLd( const char* file_path )
    2135 ///////////////////////////
     2145///////////////////////////////////////
    21362146{
    21372147    int fdout = open_file(file_path);
    21382148
    2139     char* prol = "/* AUTO GENRATED FILE */\n\n";
     2149    char* prol = "/* Generated from the mapping_info file */\n\n";
    21402150    file_write(fdout, prol);
    21412151
Note: See TracChangeset for help on using the changeset viewer.