Ignore:
Timestamp:
Jan 16, 2015, 1:24:18 PM (9 years ago)
Author:
haoliu
Message:

Implemented a new way to construct the ptabs in boot. In the map.bin file,
each physical segment in cluster[x][y] is handled by the processor[x][y][0]. So
the constrcuting of page table is done in parrallel by all the
processor[x][y][0] at the same time.

This way spents less time than the constructing sequential by one processor(
the processor[0][0][0])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/xcu_driver.c

    r456 r490  
    181181}
    182182
     183////////////////////////////////////////////
     184void _xcu_send_wti_paddr( unsigned int cluster_xy,
     185                          unsigned int wti_index,
     186                          unsigned int wdata )
     187{
     188#if USE_XCU
     189    // parameters checking
     190    unsigned int x = cluster_xy >> Y_WIDTH;
     191    unsigned int y = cluster_xy & ((1<<Y_WIDTH)-1);
     192    if (x >= X_SIZE)               _exit();
     193    if (y >= Y_SIZE)               _exit();
     194    if (wti_index >= 32)           _exit();
     195
     196    paddr_t paddr =
     197         SEG_XCU_BASE + ((paddr_t)cluster_xy << 32) +
     198        (XCU_REG(XCU_WTI_REG, wti_index) << 2);
     199
     200    _physical_write(paddr, wdata);
     201
     202#else
     203    _puts("[GIET ERROR] _xcu_send_wti() should not be used if USE_XCU is not set\n");
     204    _exit();
     205#endif
     206}
    183207///////////////////////////////////////////////////
    184208void _xcu_get_wti_value( unsigned int   cluster_xy,
Note: See TracChangeset for help on using the changeset viewer.