Ignore:
Timestamp:
Jan 16, 2015, 1:24:18 PM (10 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])

Location:
soft/giet_vm/giet_drivers
Files:
2 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,
  • soft/giet_vm/giet_drivers/xcu_driver.h

    r437 r490  
    9393                           unsigned int wdata );
    9494
     95///////////////////////////////////////////////////////////////////////////////
     96// This function writes the "wdata" by physical xcu address value in the mailbox
     97// defined by the "cluster_xy" and "wti_index" arguments.
     98////////////////////////////////////////////////////////////////////////////////
     99void _xcu_send_wti_paddr( unsigned int cluster_xy,
     100                          unsigned int wti_index,
     101                          unsigned int wdata );
    95102////////////////////////////////////////////////////////////////////////////////
    96103// This function returns the value contained in a WTI mailbox defined by
Note: See TracChangeset for help on using the changeset viewer.