Protocol++® (Protocolpp®)  v5.7.0
InterfacePP::jsecproducer Class Referenceabstract
Inheritance diagram for InterfacePP::jsecproducer:

Public Member Functions

 jsecproducer (ProtocolPP::platform_t platform, uint64_t seed, bool use_crypto, int responders, std::shared_ptr< jmmu > &mmu, std::shared_ptr< jlogger > &logger, std::shared_ptr< ProtocolPP::jdata > &indata, std::shared_ptr< jring< ringflow >> &fring, std::shared_ptr< jring< secin >> &iring, std::shared_ptr< jring< secout >> &oring, ProtocolPP::endian_t endianess=ProtocolPP::BIG, uint32_t ptrsize=8, uint32_t sgtsize=16)
 
virtual ~jsecproducer ()=default
 standard deconstructor
 
virtual uint64_t get_mem (std::string name, uint32_t length)=0
 
virtual void write (uint64_t address, uint32_t data)=0
 
virtual void write (uint64_t address, uint64_t data)=0
 
virtual uint64_t write (std::string name, uint8_t *data, uint32_t length)=0
 
virtual uint64_t write (std::string name, uint32_t *data, uint32_t length)=0
 
virtual uint32_t read (uint64_t address)=0
 
virtual void read (uint64_t address, uint8_t *data, uint32_t length)=0
 
virtual void read (uint64_t address, uint32_t *data, uint32_t length)=0
 
void setup (ProtocolPP::jstream &stream)
 
void issue (std::shared_ptr< ProtocolPP::jpacket > &packet)
 
void release (const std::string &stream)
 
int get_mode ()
 
void run ()
 run the testbench
 
uint32_t get_status (uint64_t address)
 
uint64_t get_sgt (uint32_t datasize, uint8_t *data)
 
uint64_t get_field (ProtocolPP::field_t field)
 
 jsecproducer (jsecproducer &rhs)=delete
 
 jsecproducer (const jsecproducer &rhs)=delete
 

Protected Member Functions

void set_mem (std::string &packet, uint8_t *ptr)
 run the testbench
 
void free_mem (std::string &packet)
 run the testbench
 

Constructor & Destructor Documentation

◆ jsecproducer()

InterfacePP::jsecproducer::jsecproducer ( ProtocolPP::platform_t  platform,
uint64_t  seed,
bool  use_crypto,
int  responders,
std::shared_ptr< jmmu > &  mmu,
std::shared_ptr< jlogger > &  logger,
std::shared_ptr< ProtocolPP::jdata > &  indata,
std::shared_ptr< jring< ringflow >> &  fring,
std::shared_ptr< jring< secin >> &  iring,
std::shared_ptr< jring< secout >> &  oring,
ProtocolPP::endian_t  endianess = ProtocolPP::BIG,
uint32_t  ptrsize = 8,
uint32_t  sgtsize = 16 
)

jsecproducer uses protocol++ to drive packets into a ring which can then be read by any device that supports a ring

Parameters
platform- Platform to connect testbench to (W.A.S.P or SEC)
seed- seed for the testbench
use_crypto- use cryptographic quality random numbers
responders- number of responders used
mmu- dynamic memory tracking
logger- object to print output
indata- JDATA object containing flows and packets
fring- Software ring for the flows
iring- Software ring for the input packets
oring- Software ring for the output packets
endianess- Endianess of the platform to support
ptrsize- size of pointers in descriptors (4 or 8 bytes)
sgtsize- size of the Scatter-Gather tables (8 or 16 byte entries)

Member Function Documentation

◆ get_field()

uint64_t InterfacePP::jsecproducer::get_field ( ProtocolPP::field_t  field)

retrieve the field

Returns
- value of the field

◆ get_mem()

virtual uint64_t InterfacePP::jsecproducer::get_mem ( std::string  name,
uint32_t  length 
)
pure virtual

Get a chunk of memory

Parameters
name- name of packet to retrieve data for
length- Length of memory in bytes
Returns
address to memory

Implemented in InterfacePP::jsectestbench.

◆ get_mode()

int InterfacePP::jsecproducer::get_mode ( )
Returns
- current mode of operation

◆ get_sgt()

uint64_t InterfacePP::jsecproducer::get_sgt ( uint32_t  datasize,
uint8_t *  data 
)

Create and return a SG table for SEC/CAAM

Parameters
datasize- size of the input data found in the pointer
data- byte pointer to data for SG table
Returns
- address to SG table

◆ get_status()

uint32_t InterfacePP::jsecproducer::get_status ( uint64_t  address)

retrieve the status word

Returns
- status of the indicated packet

◆ issue()

void InterfacePP::jsecproducer::issue ( std::shared_ptr< ProtocolPP::jpacket > &  packet)

Issues the packet into the testbench or system must be overloaded in user's code

Parameters
packet- packet to process
See also
jpacket

◆ read() [1/3]

virtual uint32_t InterfacePP::jsecproducer::read ( uint64_t  address)
pure virtual

Read function to overload in your testbench

Parameters
address- Address to register
Returns
value of the register

Implemented in InterfacePP::jsectestbench.

◆ read() [2/3]

virtual void InterfacePP::jsecproducer::read ( uint64_t  address,
uint32_t *  data,
uint32_t  length 
)
pure virtual

Read function to overload in your testbench

Parameters
address- Address to read data from
data- Retrieved data
length- Length of data to read

Implemented in InterfacePP::jsectestbench.

◆ read() [3/3]

virtual void InterfacePP::jsecproducer::read ( uint64_t  address,
uint8_t *  data,
uint32_t  length 
)
pure virtual

Read function to overload in your testbench

Parameters
address- Address to read data from
data- Retrieved data
length- Length of data to read

Implemented in InterfacePP::jsectestbench.

◆ release()

void InterfacePP::jsecproducer::release ( const std::string &  stream)

Stream is done, release the stream and deallocate

Parameters
stream- name of the stream to releasae

◆ setup()

void InterfacePP::jsecproducer::setup ( ProtocolPP::jstream stream)

Setup the stream to process descriptors. Using the security association, program your device to process the flow of packets The security association is accessed as a VOID pointer and must be recast to the correct association type based on the TYPE field in the JSTREAM object

Parameters
stream- Stream object to setup
See also
jstream

◆ write() [1/4]

virtual uint64_t InterfacePP::jsecproducer::write ( std::string  name,
uint32_t *  data,
uint32_t  length 
)
pure virtual

Write function to overload in your testbench

Parameters
name- name of packet to retrieve data for
data- Word oriented data to write
length- length of data to write
Returns
address - Address data written to

Implemented in InterfacePP::jsectestbench.

◆ write() [2/4]

virtual uint64_t InterfacePP::jsecproducer::write ( std::string  name,
uint8_t *  data,
uint32_t  length 
)
pure virtual

Write function to overload in your testbench

Parameters
name- name of packet to retrieve data for
data- Data to write to memory
length- length of data to write
Returns
address - Address data written to

Implemented in InterfacePP::jsectestbench.

◆ write() [3/4]

virtual void InterfacePP::jsecproducer::write ( uint64_t  address,
uint32_t  data 
)
pure virtual

Write function to overload in your testbench

Parameters
address- Address to write data to
data- Data to write to memory

Implemented in InterfacePP::jsectestbench.

◆ write() [4/4]

virtual void InterfacePP::jsecproducer::write ( uint64_t  address,
uint64_t  data 
)
pure virtual

Write function to overload in your testbench

Parameters
address- Address to write data to
data- Data to write to memory

Implemented in InterfacePP::jsectestbench.


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