Changeset 281 for soft/giet_vm/giet_xml


Ignore:
Timestamp:
Jan 30, 2014, 5:32:13 PM (11 years ago)
Author:
cfuguet
Message:

Modifications in GIET_VM:

  • Supporting platforms with more than one IRQ per processor from the XICU.

When this is the case, the IRQ per processor can be signalled
by the XCU peripheric number of channels on the XML file.

The xml_parser will generate a constant on the hard_config.h
file, called IRQ_PER_PROCESSOR and this constant will be use
by the GIET_VM to create accordingly the irq masks on the
ICU

File:
1 edited

Legend:

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

    r267 r281  
    115115unsigned int dma_channels     = 0; // max number of DMA channels (per cluster)
    116116
     117unsigned int icu_channels     = 0; // total number of IRQ per processor
    117118unsigned int tty_channels     = 0; // total number of terminals in TTY
    118119unsigned int hba_channels     = 0; // total number of channels  in HBA
     
    122123unsigned int use_iob          = 0; // using IOB component
    123124unsigned int use_xcu          = 0; // using XCU (not ICU)
    124 unsigned int use_hba          = 0; // using XCU (not IOC)
     125unsigned int use_hba          = 0; // using HBA
    125126
    126127
     
    14421443            if (found_icu || use_xcu)  error = 1;
    14431444            found_icu = 1;
     1445
     1446            if (icu_channels > 0)
     1447            {
     1448                assert( (periph[periph_index]->channels == icu_channels) &&
     1449                        "[XML ERROR] the number of interruptions per processor "
     1450                        "from the ICU (icu channels) must be the same on all "
     1451                        "clusters");
     1452            }
     1453            else
     1454            {
     1455                icu_channels = periph[periph_index]->channels;
     1456            }
    14441457        }
    14451458        //////////////////////////////////
     
    14661479        {
    14671480            periph[periph_index]->type = PERIPH_TYPE_XCU;
    1468             if (found_icu || found_timer)  error = 1;
     1481            if (found_xcu || found_icu || found_timer)  error = 1;
    14691482            found_xcu    = 1;
    14701483            found_timer  = 1;
    14711484            tim_channels = 32;
    14721485            use_xcu      = 1;
     1486
     1487            if (icu_channels > 0)
     1488            {
     1489                assert( (periph[periph_index]->channels == icu_channels) &&
     1490                        "[XML ERROR] the number of interruptions per processor "
     1491                        "from the ICU (icu channels) must be the same on all "
     1492                        "clusters");
     1493            }
     1494            else
     1495            {
     1496                icu_channels = periph[periph_index]->channels;
     1497            }
    14731498        }
    14741499        else
    14751500        {
    1476             printf("[XML ERROR] illegal <type> for peripheral %d in cluster %d\n",
    1477                     periph_loc_index, cluster_index);
     1501            printf("[XML ERROR] illegal <type>: %s for peripheral %d in cluster %d\n",
     1502                    str, periph_loc_index, cluster_index);
    14781503            exit(1);
    14791504        }
     
    14811506        if (error)
    14821507        {
    1483             printf("[XML ERROR] illegal <type> for peripheral %d in cluster %d\n",
    1484                     periph_loc_index, cluster_index);
     1508            printf("[XML ERROR] illegal <type>: %s for peripheral %d in cluster %d\n",
     1509                    str, periph_loc_index, cluster_index);
    14851510            exit(1);
    14861511        }
     
    25092534    sprintf(prol, "/* Generated from file %s.xml */\n\n",header->name);
    25102535
    2511     char * ifdef  = "#ifndef _HARD_CONFIG_H\n#define _HARDD_CONFIG_H\n\n";
     2536    char * ifdef  = "#ifndef _HARD_CONFIG_H\n#define _HARD_CONFIG_H\n\n";
    25122537    char * epil   = "\n#endif //_HARD_CONFIG_H";
    25132538
     
    25422567    def_int_write(fdout, "USE_IOB           ", use_iob);
    25432568    def_int_write(fdout, "USE_HBA           ", use_hba);
     2569
     2570    file_write(fdout, "\n");
     2571
     2572    def_int_write(fdout, "IRQ_PER_PROCESSOR ", icu_channels);
    25442573
    25452574    file_write(fdout, epil);
Note: See TracChangeset for help on using the changeset viewer.