Skip to content

Namespace InterChiplet

Namespace List > InterChiplet

Classes

Type Name
class PipeComm
Pipe communication structure.
class PipeCommUnit
Structure for Single Pipe communication.
class SyncCommand
Structure of synchronization command.

Public Types

Type Name
typedef std::vector< long > AddrType
Address type;.
typedef double InnerTimeType
Time type used by interchiplet module.
enum SyncCommType
Type of synchronization command between simulators.
enum SyncProtocolDesc
Behavior descriptor of synchronization protocol.
enum SysCallID
Syscall ID used in CPU/GPU.
typedef unsigned long long TimeType
Time type used between simulators.

Public Attributes

Type Name
decltype(syscall(0)) typedef syscall_return_t

Public Functions

Type Name
syscall_return_t barrier (int64_t __uid, int64_t __src_x, int64_t __src_y, int64_t __count=0)
Barrier.
void barrierSync (int __src_x, int __src_y, int __uid, int __count)
Send BARRIER command and wait for SYNC command.
TimeType cycleSync (TimeType __cycle)
Send CYCLE command and wait for SYNC command.
std::string dumpCmd (const SyncCommand & __cmd)
Dump command to a string for debugging.
syscall_return_t launch (int64_t __dst_x, int64_t __dst_y, int64_t __src_x, int64_t __src_y)
Launch application to remote chiplet.
void launchSync (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send LAUNCH command and wait for SYNC command.
syscall_return_t lock (int64_t __uid, int64_t __src_x, int64_t __src_y)
Lock mutex.
void lockSync (int __src_x, int __src_y, int __uid)
Send UNLOCK command and wait for SYNC command.
SyncCommand parseCmd (const std::string & __message)
Parse command from string.
SyncCommand parseCmd (int __fd_in=STDIN_FILENO)
Receive command from stdin and parse the message. Used by simulator only.
std::string 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 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.
syscall_return_t receiveMessage (int64_t __dst_x, int64_t __dst_y, int64_t __src_x, int64_t __src_y, void * __addr, int64_t __nbyte)
Read data from remote chiplet.
std::string receiveSync (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send RECEIVE command and wait for SYNC command.
void sendBarrierCmd (int __src_x, int __src_y, int __uid, int __count)
Send BARRIER command.
void sendCycleCmd (TimeType __cycle)
Send CYCLE command.
void sendLaunchCmd (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send LAUNCH command.
void sendLockCmd (int __src_x, int __src_y, int __uid)
Send LOCK command.
syscall_return_t sendMessage (int64_t __dst_x, int64_t __dst_y, int64_t __src_x, int64_t __src_y, void * __addr, int64_t __nbyte)
Send data to remote chiplet.
void sendReadCmd (TimeType __cycle, int __src_x, int __src_y, int __dst_x, int __dst_y, int __nbyte, long __desc)
Send READ command.
void sendReceiveCmd (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send RECEIVE command.
void sendResultCmd ()
Send RESULT command.
void sendResultCmd (const std::vector< std::string > & __res_list)
Send RESULT command.
void sendResultCmd (const std::vector< long > & __res_list)
Send RESULT command.
void sendResultCmd (int __fd)
Send RESULT command.
void sendResultCmd (int __fd, const std::vector< std::string > & __res_list)
Send RESULT command.
void sendResultCmd (int __fd, const std::vector< long > & __res_list)
Send RESULT command.
void sendSendCmd (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send SEND command.
std::string sendSync (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send SEND command and wait for SYNC command.
void sendSyncCmd (TimeType __cycle)
Send SYNC command.
void sendSyncCmd (int __fd, TimeType __cycle)
Send SYNC command to specified file descriptor.
void sendUnlockCmd (int __src_x, int __src_y, int __uid)
Send UNLOCK command.
void sendWaitlaunchCmd (int __src_x, int __src_y, int __dst_x, int __dst_y)
Send WAITLAUNCH command.
void sendWriteCmd (TimeType __cycle, int __src_x, int __src_y, int __dst_x, int __dst_y, int __nbyte, long __desc)
Send WRITE command.
syscall_return_t unlock (int64_t __uid, int64_t __src_x, int64_t __src_y)
Unlock mutex.
void unlockSync (int __src_x, int __src_y, int __uid)
Send UNLOCK command and wait for SYNC command.
syscall_return_t waitLaunch (int64_t __dst_x, int64_t __dst_y, int64_t * __src_x, int64_t * __src_y)
Wait launch from remote chiplet.
void waitlaunchSync (int * __src_x, int * __src_y, int __dst_x, int __dst_y)
Send WAITLAUNCH command and wait for LAUNCH command.
TimeType 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 Types Documentation

typedef AddrType

typedef std::vector<long> InterChiplet::AddrType;

typedef InnerTimeType

typedef double InterChiplet::InnerTimeType;

enum SyncCommType

enum InterChiplet::SyncCommType {
    SC_CYCLE,
    SC_SEND,
    SC_RECEIVE,
    SC_BARRIER,
    SC_LOCK,
    SC_UNLOCK,
    SC_LAUNCH,
    SC_WAITLAUNCH,
    SC_READ,
    SC_WRITE,
    SC_SYNC,
    SC_RESULT
};

enum SyncProtocolDesc

enum InterChiplet::SyncProtocolDesc {
    SPD_ACK = 0x01,
    SPD_PRE_SYNC = 0x02,
    SPD_POST_SYNC = 0x04,
    SPD_LAUNCH = 0x10000,
    SPD_BARRIER = 0x20000,
    SPD_LOCK = 0x40000,
    SPD_UNLOCK = 0x80000
};

enum SysCallID

enum InterChiplet::SysCallID {
    SYSCALL_LAUNCH = 501,
    SYSCALL_WAITLAUNCH = 502,
    SYSCALL_BARRIER = 503,
    SYSCALL_LOCK = 504,
    SYSCALL_UNLOCK = 505,
    SYSCALL_REMOTE_READ = 506,
    SYSCALL_REMOTE_WRITE = 507
};

typedef TimeType

typedef unsigned long long InterChiplet::TimeType;

Public Attributes Documentation

variable syscall_return_t

decltype(syscall(0)) typedef InterChiplet::syscall_return_t;

Public Functions Documentation

function barrier

Barrier.

syscall_return_t InterChiplet::barrier (
    int64_t __uid,
    int64_t __src_x,
    int64_t __src_y,
    int64_t __count=0
) 

Parameters:

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

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 launch

Launch application to remote chiplet.

syscall_return_t InterChiplet::launch (
    int64_t __dst_x,
    int64_t __dst_y,
    int64_t __src_x,
    int64_t __src_y
) 

Parameters:

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

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 lock

Lock mutex.

syscall_return_t InterChiplet::lock (
    int64_t __uid,
    int64_t __src_x,
    int64_t __src_y
) 

Parameters:

  • __uid Mutex ID.
  • __src_x Source address in X-axis.
  • __src_y Source 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 receiveMessage

Read data from remote chiplet.

syscall_return_t InterChiplet::receiveMessage (
    int64_t __dst_x,
    int64_t __dst_y,
    int64_t __src_x,
    int64_t __src_y,
    void * __addr,
    int64_t __nbyte
) 

Parameters:

  • __dst_x Destination address in X-axis.
  • __dst_y Destination address in Y-axis.
  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __addr Data address.
  • __nbyte Number of bytes.

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 sendMessage

Send data to remote chiplet.

syscall_return_t InterChiplet::sendMessage (
    int64_t __dst_x,
    int64_t __dst_y,
    int64_t __src_x,
    int64_t __src_y,
    void * __addr,
    int64_t __nbyte
) 

Parameters:

  • __dst_x Destination address in X-axis.
  • __dst_y Destination address in Y-axis.
  • __src_x Source address in X-axis.
  • __src_y Source address in Y-axis.
  • __addr Data address.
  • __nbyte Number of bytes.

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 unlock

Unlock mutex.

syscall_return_t InterChiplet::unlock (
    int64_t __uid,
    int64_t __src_x,
    int64_t __src_y
) 

Parameters:

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

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 waitLaunch

Wait launch from remote chiplet.

syscall_return_t InterChiplet::waitLaunch (
    int64_t __dst_x,
    int64_t __dst_y,
    int64_t * __src_x,
    int64_t * __src_y
) 

Parameters:

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

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.


The documentation for this class was generated from the following file /data_sda/junwan02/legosim/Chiplet_Heterogeneous_newVersion/interchiplet/includes/apis_c.h