Protocol++® (Protocolpp®)  v5.7.0
InterfacePP::jsectestbench Class Reference
Inheritance diagram for InterfacePP::jsectestbench:
Collaboration diagram for InterfacePP::jsectestbench:

Public Member Functions

 jsectestbench (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 ~jsectestbench ()=default
 standard deconstructor
 
uint64_t get_mem (std::string packet, uint32_t length)
 
void write (uint64_t address, uint32_t data)
 
void write (uint64_t address, uint64_t data)
 
uint64_t write (std::string packet, uint8_t *data, uint32_t length)
 
uint64_t write (std::string packet, uint32_t *data, uint32_t length)
 
uint32_t read (uint64_t address)
 
void read (uint64_t address, uint8_t *data, uint32_t length)
 
void read (uint64_t address, uint32_t *data, uint32_t length)
 
 jsectestbench (jsectestbench &rhs)=delete
 
 jsectestbench (const jsectestbench &rhs)=delete
 
- Public Member Functions inherited from 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)
 
virtual ~jsecproducer ()=default
 standard deconstructor
 
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
 

Additional Inherited Members

- Protected Member Functions inherited from InterfacePP::jsecproducer
void set_mem (std::string &packet, uint8_t *ptr)
 run the testbench
 
void free_mem (std::string &packet)
 run the testbench
 

Constructor & Destructor Documentation

◆ jsectestbench()

InterfacePP::jsectestbench::jsectestbench ( 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 
)

jsectestbench 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 pointer (either 4 or 8 default=8)
sgtsize- size of SG table entries (either 8 or 16 default=16)

Member Function Documentation

◆ get_mem()

uint64_t InterfacePP::jsectestbench::get_mem ( std::string  packet,
uint32_t  length 
)
virtual

Retrieve pointer to uninitialized memory

Parameters
packet- name of packet to associate memory with
length- Length in bytes for memory location
Returns
address to memory

Implements InterfacePP::jsecproducer.

◆ read() [1/3]

uint32_t InterfacePP::jsectestbench::read ( uint64_t  address)
virtual

Read function to overload in your testbench

Parameters
address- Address to register
Returns
value of the register

Implements InterfacePP::jsecproducer.

◆ read() [2/3]

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

Read function to overload in your testbench

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

Implements InterfacePP::jsecproducer.

◆ read() [3/3]

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

Read function to overload in your testbench

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

Implements InterfacePP::jsecproducer.

◆ write() [1/4]

uint64_t InterfacePP::jsectestbench::write ( std::string  packet,
uint32_t *  data,
uint32_t  length 
)
virtual

Write function to overload in your testbench

Parameters
packet- name of packet to associate memory with
data- Word oriented data to write
length- length of data to write

Implements InterfacePP::jsecproducer.

◆ write() [2/4]

uint64_t InterfacePP::jsectestbench::write ( std::string  packet,
uint8_t *  data,
uint32_t  length 
)
virtual

Write function to overload in your testbench

Parameters
packet- name of packet to associate memory with
data- Data to write to memory
length- length of data to write

Implements InterfacePP::jsecproducer.

◆ write() [3/4]

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

Write function to overload in your testbench

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

Implements InterfacePP::jsecproducer.

◆ write() [4/4]

void InterfacePP::jsectestbench::write ( uint64_t  address,
uint64_t  data 
)
virtual

Write function to overload in your testbench

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

Implements InterfacePP::jsecproducer.


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