Skip to content

Group sync_proto

Modules > sync_proto

Synchronization protocol interface.

Public Functions

Type Name
void InterChiplet::barrierSync (int __src_x, int __src_y, int __uid, int __count)
Send BARRIER command and wait for SYNC command.
TimeType InterChiplet::cycleSync (TimeType __cycle)
Send CYCLE command and wait for SYNC command.
std::string InterChiplet::dumpCmd (const SyncCommand & __cmd)
Dump command to a string for debugging.
void InterChiplet::launchSync (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send LAUNCH command and wait for SYNC command.
void InterChiplet::lockSync (int __src_x, int __src_y, int __uid)
Send UNLOCK command and wait for SYNC command.
SyncCommand InterChiplet::parseCmd (const std::string & __message)
Parse command from string.
SyncCommand InterChiplet::parseCmd (int __fd_in=STDIN_FILENO)
Receive command from stdin and parse the message. Used by simulator only.
std::string InterChiplet::pipeName (const AddrType & __src, const AddrType & __dst)
Return name of file name in a std::string. Return directory related to the directory of main process.
TimeType InterChiplet::readSync (TimeType __cycle, int __src_x, int __src_y, int __dst_x, int __dst_y, int __nbyte, long __desc)
Send READ command and wait for SYNC command.
std::string InterChiplet::receiveSync (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send RECEIVE command and wait for SYNC command.
void InterChiplet::sendBarrierCmd (int __src_x, int __src_y, int __uid, int __count)
Send BARRIER command.
void InterChiplet::sendCycleCmd (TimeType __cycle)
Send CYCLE command.
void InterChiplet::sendLaunchCmd (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send LAUNCH command.
void InterChiplet::sendLockCmd (int __src_x, int __src_y, int __uid)
Send LOCK command.
void InterChiplet::sendReadCmd (TimeType __cycle, int __src_x, int __src_y, int __dst_x, int __dst_y, int __nbyte, long __desc)
Send READ command.
void InterChiplet::sendReceiveCmd (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send RECEIVE command.
void InterChiplet::sendResultCmd ()
Send RESULT command.
void InterChiplet::sendResultCmd (const std::vector< std::string > & __res_list)
Send RESULT command.
void InterChiplet::sendResultCmd (const std::vector< long > & __res_list)
Send RESULT command.
void InterChiplet::sendResultCmd (int __fd)
Send RESULT command.
void InterChiplet::sendResultCmd (int __fd, const std::vector< std::string > & __res_list)
Send RESULT command.
void InterChiplet::sendResultCmd (int __fd, const std::vector< long > & __res_list)
Send RESULT command.
void InterChiplet::sendSendCmd (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send SEND command.
std::string InterChiplet::sendSync (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send SEND command and wait for SYNC command.
void InterChiplet::sendSyncCmd (TimeType __cycle)
Send SYNC command.
void InterChiplet::sendSyncCmd (int __fd, TimeType __cycle)
Send SYNC command to specified file descriptor.
void InterChiplet::sendUnlockCmd (int __src_x, int __src_y, int __uid)
Send UNLOCK command.
void InterChiplet::sendWaitlaunchCmd (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send WAITLAUNCH command.
void InterChiplet::sendWriteCmd (TimeType __cycle, int __src_x, int __src_y, int __dst_x, int __dst_y, int __nbyte, long __desc)
Send WRITE command.
void InterChiplet::unlockSync (int __src_x, int __src_y, int __uid)
Send UNLOCK command and wait for SYNC command.
void InterChiplet::waitlaunchSync (int * __src_x, int * __src_y, int __dst_x, int __dst_y)
Send WAITLAUNCH command and wait for LAUNCH command.
TimeType InterChiplet::writeSync (TimeType __cycle, int __src_x, int __src_y, int __dst_x, int __dst_y, int __nbyte, long __desc)
Send WRITE command and wait for SYNC command.

Public Functions Documentation

function barrierSync

Send BARRIER command and wait for SYNC command.

inline void InterChiplet::barrierSync (
    int __src_x,
    int __src_y,
    int __uid,
    int __count
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __uid Barrier ID.
  • __count Number of items in barrier.

function cycleSync

Send CYCLE command and wait for SYNC command.

inline TimeType InterChiplet::cycleSync (
    TimeType __cycle
) 

Parameters:

  • __cycle Cycle to send CYCLE command.

Returns:

Cycle to receive SYNC command.

function dumpCmd

Dump command to a string for debugging.

inline std::string InterChiplet::dumpCmd (
    const SyncCommand & __cmd
) 

Parameters:

  • __cmd Structure of synchronization command.

Returns:

String of message.

function launchSync

Send LAUNCH command and wait for SYNC command.

inline void InterChiplet::launchSync (
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.

function lockSync

Send UNLOCK command and wait for SYNC command.

inline void InterChiplet::lockSync (
    int __src_x,
    int __src_y,
    int __uid
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __uid Mutex ID.

function parseCmd

Parse command from string.

inline SyncCommand InterChiplet::parseCmd (
    const std::string & __message
) 

Parameters:

  • __message String of message.

Returns:

Structure of synchronization command.

function parseCmd

Receive command from stdin and parse the message. Used by simulator only.

inline SyncCommand InterChiplet::parseCmd (
    int __fd_in=STDIN_FILENO
) 

Parameters:

  • __fd_in Input file descriptor.

Returns:

Structure of synchronization command.

function pipeName

Return name of file name in a std::string. Return directory related to the directory of main process.

inline std::string InterChiplet::pipeName (
    const AddrType & __src,
    const AddrType & __dst
) 

Parameters:

  • __src Source address.
  • __dst Destiantion address.

function readSync

Send READ command and wait for SYNC command.

inline TimeType InterChiplet::readSync (
    TimeType __cycle,
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y,
    int __nbyte,
    long __desc
) 

Parameters:

  • __cycle Cycle to send READ command.
  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.
  • __nbyte Number of bytes to read.
  • __desc Synchronization protocol descriptor.

Returns:

Cycle to receive SYNC command.

function receiveSync

Send RECEIVE command and wait for SYNC command.

inline std::string InterChiplet::receiveSync (
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.

Returns:

Pipe name.

function sendBarrierCmd

Send BARRIER command.

inline void InterChiplet::sendBarrierCmd (
    int __src_x,
    int __src_y,
    int __uid,
    int __count
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __uid Barrier ID.
  • __count Number of items in barrier.

function sendCycleCmd

Send CYCLE command.

inline void InterChiplet::sendCycleCmd (
    TimeType __cycle
) 

Parameters:

  • __cycle Cycle to send CYCLE command.

function sendLaunchCmd

Send LAUNCH command.

inline void InterChiplet::sendLaunchCmd (
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.

function sendLockCmd

Send LOCK command.

inline void InterChiplet::sendLockCmd (
    int __src_x,
    int __src_y,
    int __uid
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __uid Barrier ID.

function sendReadCmd

Send READ command.

inline void InterChiplet::sendReadCmd (
    TimeType __cycle,
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y,
    int __nbyte,
    long __desc
) 

Parameters:

  • __cycle Cycle to send READ command.
  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.
  • __nbyte Number of bytes to read.
  • __desc Synchronization protocol descriptor.

function sendReceiveCmd

Send RECEIVE command.

inline void InterChiplet::sendReceiveCmd (
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.

function sendResultCmd

inline void InterChiplet::sendResultCmd () 

function sendResultCmd

Send RESULT command.

inline void InterChiplet::sendResultCmd (
    const std::vector< std::string > & __res_list
) 

Parameters:

  • __res_list Result list.

function sendResultCmd

Send RESULT command.

inline void InterChiplet::sendResultCmd (
    const std::vector< long > & __res_list
) 

Parameters:

  • __res_list Result list.

function sendResultCmd

Send RESULT command.

inline void InterChiplet::sendResultCmd (
    int __fd
) 

Parameters:

  • __fd File descriptor.

function sendResultCmd

Send RESULT command.

inline void InterChiplet::sendResultCmd (
    int __fd,
    const std::vector< std::string > & __res_list
) 

Parameters:

  • __fd File descriptor.
  • __res_list Result list.

function sendResultCmd

Send RESULT command.

inline void InterChiplet::sendResultCmd (
    int __fd,
    const std::vector< long > & __res_list
) 

Parameters:

  • __fd File descriptor.
  • __res_list Result list.

function sendSendCmd

Send SEND command.

inline void InterChiplet::sendSendCmd (
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.

function sendSync

Send SEND command and wait for SYNC command.

inline std::string InterChiplet::sendSync (
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.

Returns:

Pipe name.

function sendSyncCmd

Send SYNC command.

inline void InterChiplet::sendSyncCmd (
    TimeType __cycle
) 

Parameters:

  • __cycle Cycle to receive SYNC command.

function sendSyncCmd

Send SYNC command to specified file descriptor.

inline void InterChiplet::sendSyncCmd (
    int __fd,
    TimeType __cycle
) 

Parameters:

  • __fd File descriptor.
  • __cycle Cycle to receive SYNC command.

function sendUnlockCmd

Send UNLOCK command.

inline void InterChiplet::sendUnlockCmd (
    int __src_x,
    int __src_y,
    int __uid
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __uid Barrier ID.

function sendWaitlaunchCmd

Send WAITLAUNCH command.

inline void InterChiplet::sendWaitlaunchCmd (
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.

function sendWriteCmd

Send WRITE command.

inline void InterChiplet::sendWriteCmd (
    TimeType __cycle,
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y,
    int __nbyte,
    long __desc
) 

Parameters:

  • __cycle Cycle to send WRITE command.
  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.
  • __nbyte Number of bytes to write.
  • __desc Synchronization protocol descriptor.

function unlockSync

Send UNLOCK command and wait for SYNC command.

inline void InterChiplet::unlockSync (
    int __src_x,
    int __src_y,
    int __uid
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __uid Mutex ID.

function waitlaunchSync

Send WAITLAUNCH command and wait for LAUNCH command.

inline void InterChiplet::waitlaunchSync (
    int * __src_x,
    int * __src_y,
    int __dst_x,
    int __dst_y
) 

Parameters:

  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.

function writeSync

Send WRITE command and wait for SYNC command.

inline TimeType InterChiplet::writeSync (
    TimeType __cycle,
    int __src_x,
    int __src_y,
    int __dst_x,
    int __dst_y,
    int __nbyte,
    long __desc
) 

Parameters:

  • __cycle Cycle to send WRITE command.
  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __dst_x Destiantion address in X-axis.
  • __dst_y Destination address in Y-axis.
  • __nbyte Number of bytes to write.
  • __desc Synchronization protocol descriptor.

Returns:

Cycle to receive SYNC command.