|
| jproducer (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< ringin >> &iring, std::shared_ptr< jring< ringout >> &oring, ProtocolPP::endian_t endianess=ProtocolPP::BIG) |
|
virtual | ~jproducer ()=default |
| standard deconstructor
|
|
virtual uintptr_t | get_mem (std::string packet, uint32_t length)=0 |
|
virtual void | write (uintptr_t address, uint32_t data)=0 |
|
virtual void | write (uintptr_t address, uint64_t data)=0 |
|
virtual uintptr_t | write (std::string packet, uint8_t *data, uint32_t length)=0 |
|
virtual uintptr_t | write (std::string packet, uint32_t *data, uint32_t length)=0 |
|
virtual uint32_t | read (uintptr_t address)=0 |
|
virtual void | read (uintptr_t address, uint8_t *data, uint32_t length)=0 |
|
virtual void | read (uintptr_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 and issue packets
|
|
void | process () |
| process the packets, status, post-processing
|
|
uint32_t | get_status (std::string &packet) |
|
uint64_t | get_field (ProtocolPP::field_t field) |
|
| jproducer (jproducer &rhs)=delete |
|
| jproducer (const jproducer &rhs)=delete |
|
|
std::shared_ptr< jmmu > | m_mmu |
| MMU for tracking memory.
|
|
◆ jproducer()
InterfacePP::jproducer::jproducer |
( |
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< ringin >> & |
iring, |
|
|
std::shared_ptr< jring< ringout >> & |
oring, |
|
|
ProtocolPP::endian_t |
endianess = ProtocolPP::BIG |
|
) |
| |
jproducer 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 | - tracks dynamic memory |
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 |
◆ get_field()
retrieve the field
- Returns
- - value of the field
◆ get_mem()
virtual uintptr_t InterfacePP::jproducer::get_mem |
( |
std::string |
packet, |
|
|
uint32_t |
length |
|
) |
| |
|
pure virtual |
Get a chunk of memory
- Parameters
-
packet | - name of the packet to write data for |
length | - Length of memory in bytes |
- Returns
- address to memory
Implemented in InterfacePP::jtestbench.
◆ get_mode()
int InterfacePP::jproducer::get_mode |
( |
| ) |
|
- Returns
- - current mode of operation
◆ get_status()
uint32_t InterfacePP::jproducer::get_status |
( |
std::string & |
packet | ) |
|
retrieve the status word
- Returns
- - status of the indicated packet
◆ issue()
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::jproducer::read |
( |
uintptr_t |
address | ) |
|
|
pure virtual |
Read function to overload in your testbench
- Parameters
-
address | - Address to register |
- Returns
- value of the register
Implemented in InterfacePP::jtestbench.
◆ read() [2/3]
virtual void InterfacePP::jproducer::read |
( |
uintptr_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::jtestbench.
◆ read() [3/3]
virtual void InterfacePP::jproducer::read |
( |
uintptr_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::jtestbench.
◆ release()
void InterfacePP::jproducer::release |
( |
const std::string & |
stream | ) |
|
Stream is done, release the stream and deallocate
- Parameters
-
stream | - name of the stream to releasae |
◆ setup()
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 uintptr_t InterfacePP::jproducer::write |
( |
std::string |
packet, |
|
|
uint32_t * |
data, |
|
|
uint32_t |
length |
|
) |
| |
|
pure virtual |
Write function to overload in your testbench
- Parameters
-
packet | - name of the packet to write data for |
data | - Word oriented data to write |
length | - length of data to write |
- Returns
- address - Address data written to
Implemented in InterfacePP::jtestbench.
◆ write() [2/4]
virtual uintptr_t InterfacePP::jproducer::write |
( |
std::string |
packet, |
|
|
uint8_t * |
data, |
|
|
uint32_t |
length |
|
) |
| |
|
pure virtual |
Write function to overload in your testbench
- Parameters
-
packet | - name of the packet to write data for |
data | - Data to write to memory |
length | - length of data to write |
- Returns
- address - Address data written to
Implemented in InterfacePP::jtestbench.
◆ write() [3/4]
virtual void InterfacePP::jproducer::write |
( |
uintptr_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::jtestbench.
◆ write() [4/4]
virtual void InterfacePP::jproducer::write |
( |
uintptr_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::jtestbench.
The documentation for this class was generated from the following file:
- jtestbench/include/jproducer.h