Changeset 613


Ignore:
Timestamp:
Jan 1, 2014, 11:30:42 AM (10 years ago)
Author:
almaless
Message:

almos-tsar-mipsel: update the topcell in case of mono-cluster configuration.

  • Clear the cluster_io_index.
  • Increase the max RAM size (128 MiB).
  • Use specific base addresses for xicu, mdma and memc controlers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/almos-tsar-mipsel/top.cpp

    r609 r613  
    265265   size_t   yfb              = FBUF_Y_SIZE;        // frameBuffer lines number
    266266   size_t   fb_mode          = 420;
    267    size_t   memc_size        = RAM_SIZE;
     267   size_t   ram_size         = RAM_SIZE;
    268268   size_t   blk_size         = BDEV_SECTOR_SIZE;
    269269   size_t   l1_i_ways        = L1_IWAYS;
     
    274274   size_t   memc_ways        = MEMC_WAYS;
    275275   size_t   xram_latency     = XRAM_LATENCY;
     276   size_t   ram_base         = RAM_BASE;
     277   size_t   xicu_base        = XICU_BASE;
     278   size_t   mdma_base        = MDMA_BASE;
     279   size_t   memc_base        = MEMC_BASE;
     280   bool     isRamSizeSet     = false;
    276281   size_t   cluster_io_id;                         // index of cluster containing IOs
    277282   struct   timeval t1,t2;
     
    312317         else if((strcmp(argv[n], "-MEMSZ") == 0) && (n+1 < argc))
    313318         {
    314             memc_size = atoi(argv[n+1]);
     319            ram_size = atoi(argv[n+1]);
     320            isRamSizeSet = true;
    315321         }
    316322         else if((strcmp(argv[n], "-MCWAYS") == 0) && (n+1 < argc))
     
    461467    std::cout << " - MEMC_WAYS        = " << memc_ways << std::endl;
    462468    std::cout << " - MEMC_SETS        = " << memc_sets << std::endl;
    463     std::cout << " - RAM_SIZE         = " << memc_size << std::endl;
     469    std::cout << " - RAM_SIZE         = " << ram_size << std::endl;
    464470    std::cout << " - RAM_LATENCY      = " << xram_latency << std::endl;
    465471    std::cout << " - MAX_FROZEN       = " << frozen_cycles << std::endl;
     
    512518   else                y_width = 4;
    513519
    514    cluster_io_id = 0xbfc00000 >> (vci_address_width - x_width - y_width); // index of cluster containing IOs
     520   if((xmax == 1) && (ymax == 1))
     521   {
     522      cluster_io_id = 0;
     523      ram_size      = (isRamSizeSet == true) ? ram_size : 0x8000000;
     524      xicu_base     = 0x80f00000;
     525      memc_base     = 0x80f40000;
     526      mdma_base     = 0x80f30000;
     527   }
     528   else
     529      cluster_io_id = 0xbfc00000 >> (vci_address_width - x_width - y_width); // index of cluster containing IOs
    515530
    516531   /////////////////////
     
    519534
    520535   // internal network
    521    MappingTable maptabd(vci_address_width, 
     536   MappingTable maptabd(vci_address_width,
    522537                        IntTab(x_width + y_width, 16 - x_width - y_width),
    523538                        IntTab(x_width + y_width, vci_srcid_width - x_width - y_width),
     
    534549         std::ostringstream    si;
    535550         si << "seg_xicu_" << x << "_" << y;
    536          maptabd.add(Segment(si.str(), XICU_BASE + offset, XICU_SIZE,
     551         maptabd.add(Segment(si.str(), xicu_base + offset, XICU_SIZE,
    537552                  IntTab(cluster(x,y),XICU_TGTID), false));
    538553
    539554         std::ostringstream    sd;
    540555         sd << "seg_mdma_" << x << "_" << y;
    541          maptabd.add(Segment(sd.str(), MDMA_BASE + offset, MDMA_SIZE,
     556         maptabd.add(Segment(sd.str(), mdma_base + offset, MDMA_SIZE,
    542557                  IntTab(cluster(x,y),MDMA_TGTID), false));
    543558
    544559         std::ostringstream    sh;
    545560         sh << "seg_ram_" << x << "_" << y;
    546          maptabd.add(Segment(sh.str(), RAM_BASE + offset, memc_size,
     561         maptabd.add(Segment(sh.str(), RAM_BASE + offset, ram_size,
    547562                  IntTab(cluster(x,y),MEMC_TGTID), true));
    548563
    549564         std::ostringstream    sconf;
    550565         sconf << "seg_memc_config_" << x << "_" << y;
    551          maptabd.add(Segment(sconf.str(), MEMC_BASE + offset, MEMC_SIZE,
     566         maptabd.add(Segment(sconf.str(), memc_base + offset, RAM_SIZE,
    552567                             IntTab(cluster(x,y),MEMC_TGTID), true, true));
    553568
     
    592607
    593608         maptabx.add(Segment(sh.str(), RAM_BASE + offset,
    594                      memc_size, IntTab(cluster(x,y)), false));
     609                     ram_size, IntTab(cluster(x,y)), false));
    595610      }
    596611   }
Note: See TracChangeset for help on using the changeset viewer.