Changeset 287


Ignore:
Timestamp:
Feb 3, 2014, 4:34:44 PM (10 years ago)
Author:
cfuguet
Message:

Modification on giet_xml parser and driver:

  • Introducing a new field on the mapping_info header which is used to store the number of IRQ per processor. This number must be declared on the header of all XML description files (irq_per_proc).
  • The number of channels of the ICU/XICU must be equal to the number of processors per cluster multiplied by the number of IRQ per processor (this is verified by the xml_parser).
Location:
soft/giet_vm
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_xml/mapping_info.h

    r267 r287  
    139139    unsigned int vspaces;            // number of virtual spaces
    140140    unsigned int increment;          // vseg cluster increment for replicated periphs
     141    unsigned int irq_per_proc;       // number of IRQ per processor
    141142
    142143    unsigned int cma_cluster;        // index of cluster containing CMA controler
  • soft/giet_vm/giet_xml/xml_driver.c

    r263 r287  
    4545        "HARD",
    4646        "SOFT",
     47        "TIME",
    4748    };
    4849
     
    229230    fprintf(fpout, "<?xml version = \"1.0\"?>\n\n");
    230231
    231     fprintf(fpout, "<mapping_info signature = \"0x%x\" \n", header->signature);
    232     fprintf(fpout, "              name      = \"%s\"   \n", header->name);
    233     fprintf(fpout, "              x_size    = \"%d\"   \n", header->x_size);
    234     fprintf(fpout, "              y_size    = \"%d\"   \n", header->y_size);
    235     fprintf(fpout, "              x_width   = \"%d\"   \n", header->x_width);
    236     fprintf(fpout, "              y_width   = \"%d\"   \n", header->y_width);
    237     fprintf(fpout, "              vspaces   = \"%d\"   \n", header->vspaces);
    238     fprintf(fpout, "              increment = \"%d\" >\n\n", header->vspaces);
     232    fprintf(fpout, "<mapping_info signature    = \"0x%x\" \n" , header->signature);
     233    fprintf(fpout, "              name         = \"%s\"   \n" , header->name);
     234    fprintf(fpout, "              x_size       = \"%d\"   \n" , header->x_size);
     235    fprintf(fpout, "              y_size       = \"%d\"   \n" , header->y_size);
     236    fprintf(fpout, "              x_width      = \"%d\"   \n" , header->x_width);
     237    fprintf(fpout, "              y_width      = \"%d\"   \n" , header->y_width);
     238    fprintf(fpout, "              vspaces      = \"%d\"   \n" , header->vspaces);
     239    fprintf(fpout, "              increment    = \"%d\"   \n" , header->vspaces);
     240    fprintf(fpout, "              irq_per_proc = \"%d\" >\n\n", header->irq_per_proc);
    239241
    240242    ///////////////////// clusters ///////////////////////////////////////////////
  • soft/giet_vm/giet_xml/xml_parser.c

    r281 r287  
    115115unsigned int dma_channels     = 0; // max number of DMA channels (per cluster)
    116116
    117 unsigned int icu_channels     = 0; // total number of IRQ per processor
     117unsigned int icu_channels     = 0; // total number of channels  in ICU/XICU
    118118unsigned int tty_channels     = 0; // total number of terminals in TTY
    119119unsigned int hba_channels     = 0; // total number of channels  in HBA
     
    124124unsigned int use_xcu          = 0; // using XCU (not ICU)
    125125unsigned int use_hba          = 0; // using HBA
    126 
    127126
    128127////////////////////////////////////////////////////////////////
     
    20642063            }
    20652064
     2065            // the number of ICU channels must be NB_PROCS * irq_per_proc
     2066            if (icu_channels != (header->irq_per_proc * proc_loc_index))
     2067            {
     2068                printf("[XML ERROR] illegal ICU number of channels. "
     2069                       "It must be equal to NB_PROCS * IRQ_PER_PROC\n");
     2070                exit(1);
     2071            }
     2072
    20662073#if XML_PARSER_DEBUG
    20672074            printf("  end cluster set\n\n");
     
    22942301    {
    22952302        printf("[XML ERROR] illegal or missing <increment> attribute in mapping\n");
     2303        exit(1);
     2304    }
     2305
     2306    ///////// get increment attribute
     2307    value = getIntValue(reader, "irq_per_proc", &ok);
     2308    if (ok)
     2309    {
     2310#if XML_PARSER_DEBUG
     2311        printf("  irq_per_proc = %d\n", value);
     2312#endif
     2313        header->irq_per_proc = value;
     2314    }
     2315    else
     2316    {
     2317        printf("[XML ERROR] illegal or missing <irq_per_proc> attribute in mapping\n");
    22962318        exit(1);
    22972319    }
     
    25702592    file_write(fdout, "\n");
    25712593
    2572     def_int_write(fdout, "IRQ_PER_PROCESSOR ", icu_channels);
     2594    def_int_write(fdout, "IRQ_PER_PROCESSOR ", header->irq_per_proc);
    25732595
    25742596    file_write(fdout, epil);
  • soft/giet_vm/mappings/4c_1p_four.xml

    r281 r287  
    88              y_width      = "4"
    99              vspaces      = "4"
    10               increment    = "0x10000" >
     10                          increment    = "0x10000"
     11                          irq_per_proc = "4" >
    1112
    1213*** The "increment" parameter is the virtual address cluster increment
     
    5051
    5152            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1"  />
    52             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "6"  />
     53            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4"  />
    5354            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
    5455            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1"  />
     
    7374
    7475            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
    75             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "6" />
     76            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4" />
    7677            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    7778        </cluster>
     
    8990
    9091            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
    91             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "6" />
     92            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4" />
    9293            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    9394        </cluster>
     
    105106
    106107            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
    107             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "6" />
     108            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4" />
    108109            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    109110        </cluster>
  • soft/giet_vm/mappings/4c_1p_iob_four.xml

    r265 r287  
    88              y_width      = "4"
    99              vspaces      = "4"
    10               increment    = "0x10000" >
     10                          increment    = "0x10000"
     11                          irq_per_proc = "1" >
    1112
    1213*** The "increment" parameter is the virtual address cluster increment
  • soft/giet_vm/mappings/4c_1p_iob_sort.xml

    r271 r287  
    88              y_width      = "4"
    99              vspaces      = "1"
    10               increment    = "0x10000" >
     10                          increment    = "0x10000"
     11                          irq_per_proc = "1" >
    1112
    1213*** The "increment" parameter is the virtual address cluster increment
  • soft/giet_vm/mappings/4c_1p_sort.xml

    r271 r287  
    88              y_width      = "4"
    99              vspaces      = "1"
    10               increment    = "0x10000" >
     10                          increment    = "0x10000"
     11                          irq_per_proc = "1" >
    1112
    1213*** The "increment" parameter is the virtual address cluster increment
  • soft/giet_vm/mappings/4c_1p_sort_chiplet.xml

    r271 r287  
    88              y_width      = "4"
    99              vspaces      = "1"
    10               increment    = "0x10000" >
     10                          increment    = "0x10000"
     11                          irq_per_proc = "4" >
    1112
    1213*** The "increment" parameter is the virtual address cluster increment
     
    3536            </proc>
    3637
    37             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1"  />
     38            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4"  />
    3839            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
    3940            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1"  />
     
    5354            </proc>
    5455
    55             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1" />
     56            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4" />
    5657            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    5758        </cluster>
     
    6768            </proc>
    6869
    69             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1" />
     70            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4" />
    7071            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    7172        </cluster>
     
    8182            </proc>
    8283
    83             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1" />
     84            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "4" />
    8485            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    8586        </cluster>
  • soft/giet_vm/mappings/4c_2p_four.xml

    r282 r287  
    88              y_width      = "4"
    99              vspaces      = "4"
    10               increment    = "0x10000" >
     10                          increment    = "0x10000"
     11                          irq_per_proc = "1" >
    1112
    1213*** The "increment" parameter is the virtual address cluster increment
     
    5455
    5556            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1"  />
    56             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "6"  />
     57            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "2"  />
    5758            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
    5859            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1"  />
     
    8182
    8283            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
    83             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "6" />
     84            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "2" />
    8485            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    8586        </cluster>
     
    101102
    102103            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
    103             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "6" />
     104            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "2" />
    104105            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    105106        </cluster>
     
    121122
    122123            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
    123             <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "6" />
     124            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "2" />
    124125            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
    125126        </cluster>
Note: See TracChangeset for help on using the changeset viewer.