Protocol++® (Protocolpp®)  v5.7.0
InterfacePP::jexecbuf Class Reference

Public Member Functions

 jexecbuf (uint64_t seed, bool use_crypto, std::shared_ptr< jlogger > &logger, std::shared_ptr< jring< ringout >> &outputring, std::shared_ptr< ProtocolPP::jbuffer< uint8_t, 256 >> &memory, const char *units="us", const char *read_latency="80..120", const char *compute_latency="2000..5000", const char *write_latency="60..100")
 
virtual ~jexecbuf ()=default
 standard deconstructor
 
void set_readlat (const char *latency)
 
void set_computlat (const char *latency)
 
void set_writelat (const char *latency)
 
std::string get_readlat ()
 
std::string get_complat ()
 
std::string get_writelat ()
 
bool get_busy ()
 
uint32_t get_status ()
 
uint32_t get_outlen ()
 
void exec (uintptr_t inaddr, uint32_t inlen, uintptr_t outaddr, uint32_t outlen, std::shared_ptr< std::map< std::string, std::shared_ptr< ProtocolPP::jstream >>> &flows, bool protect=false, std::string stream=std::string(""))
 
 jexecbuf ()=delete
 dont use
 

Constructor & Destructor Documentation

◆ jexecbuf()

InterfacePP::jexecbuf::jexecbuf ( uint64_t  seed,
bool  use_crypto,
std::shared_ptr< jlogger > &  logger,
std::shared_ptr< jring< ringout >> &  outputring,
std::shared_ptr< ProtocolPP::jbuffer< uint8_t, 256 >> &  memory,
const char *  units = "us",
const char *  read_latency = "80..120",
const char *  compute_latency = "2000..5000",
const char *  write_latency = "60..100" 
)

Execution units for use in a responder equivalent for a superscale design with multiple threads

Parameters
seed- seed for random number generator for randomizing latencies
use_crypto- use cryptographic quality random numbers
logger- object for logging output
outputring- output work queue to write processed packet and status
memory- output work queue to write processed packet and status
units- units of measure for latency (s, ms, us, ns)
read_latency- latency of reads, can be a range (i.e., "4..30")
compute_latency- latency of computation, can be a range (i.e., "100..200")
write_latency- latency of writes, can be a range (i.e., "50..80")

Member Function Documentation

◆ exec()

void InterfacePP::jexecbuf::exec ( uintptr_t  inaddr,
uint32_t  inlen,
uintptr_t  outaddr,
uint32_t  outlen,
std::shared_ptr< std::map< std::string, std::shared_ptr< ProtocolPP::jstream >>> &  flows,
bool  protect = false,
std::string  stream = std::string("") 
)

Executes the packet with the latencies requested

Parameters
inaddr- address to read input from
inlen- Length of the input data
outaddr- address to write output to
outlen- Length of the desired output
flows- map to all available flows
protect- apply protection to the packet
stream- stream for encapsulation

◆ get_busy()

bool InterfacePP::jexecbuf::get_busy ( )

Checks to see if the execution unit is busy

Returns
- state of execution unit

◆ get_complat()

std::string InterfacePP::jexecbuf::get_complat ( )

Retrives the compute latency as a string

Returns
- compute latency

◆ get_outlen()

uint32_t InterfacePP::jexecbuf::get_outlen ( )

Retrieve the output packet length

Returns
- length of the output packet

◆ get_readlat()

std::string InterfacePP::jexecbuf::get_readlat ( )

Retrives the read latency as a string

Returns
- read latency

◆ get_status()

uint32_t InterfacePP::jexecbuf::get_status ( )

Checks to see if the execution unit is busy

Returns
- status of processing

◆ get_writelat()

std::string InterfacePP::jexecbuf::get_writelat ( )

Retrives the write latency as a string

Returns
- write latency

◆ set_computlat()

void InterfacePP::jexecbuf::set_computlat ( const char *  latency)

Sets the compute latency in the execution unit

Parameters
latency- lantency (i.e., "5..20")

◆ set_readlat()

void InterfacePP::jexecbuf::set_readlat ( const char *  latency)

Sets the read latency in the execution unit

Parameters
latency- lantency (i.e., "5..20")

◆ set_writelat()

void InterfacePP::jexecbuf::set_writelat ( const char *  latency)

Sets the write latency in the execution unit

Parameters
latency- lantency (i.e., "5..20")

The documentation for this class was generated from the following file: