Protocol++® (Protocolpp®)  v5.7.0
jsecproducer Class Reference

#include "include/jsecproducer.h"

Detailed Description

Producer for Protocol++® for SEC/CAAM platform

This is the base testbench class for Protocol++® (ProtocolPP®) which contains all the functionality for processing packets to and from the software rings, adding packets to the ring, issue new flows, and updating memory. Your derived testbench should inherit from this class and implement the memory read and write methods for specific to your platform

jproducer uses protocol++ to drive packets into a ring which can then be read by any device that supports a ring. The constructor currently supports two platforms, W.A.S.P which is the XML parser and randomizer native to Protocol++® or the NXP SEC(CAAM) interface. A seed is needed to support reproducibility and generate random data. For the number of responders requested, there is an execution unit created in the responder with it's own rings for processing data The MMU is used to dynamically track all memory allocations. The jdata class contains the randomly generated (or data read from a *.protpp file) to run in the testbench

The ring that's passed will only be assigned to the first jexec unit. If more than one responder is requested, the additional jexec units will have randomly generated rings and data

NXP SEC(CAAM) may support a BIG (QorIQ) or LITTLE (Layerscape) endianess. Packet data in the converted shared descriptor such as IV will need to be in LITTLE endian format in such cases

The constructor for jproducer is as follows

unsigned long seed,
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,
endian_t
Definition: jenum.h:1210
@ BIG
Big endian with formatting as b[3]b[2]b[1]b[0].
Definition: jenum.h:1211
platform_t
Definition: jenum.h:1236

The next set of functions are pure virtual fuctions are related to the platform that is being used and how it reads and writes memory. These will need to be implemented by the user in their own testbench and are as follows

// Get a chunk of memory
virtual uint64_t get_mem(std::string packet, uint32_t length)=0;
// Write memory for uint32_t function to overload in your testbench
virtual void write(uint64_t address, uint32_t data)=0;
// Write memory for uint64_t function to overload in your testbench
virtual void write(uint64_t address, uint64_t data)=0;
// Write memory for byte array function to overload in your testbench
virtual uint64_t write(std::string packet, uint8_t* data, uint32_t length)=0;
// Write function to overload in your testbench
virtual uint64_t write(std::string packet, uint32_t* data, uint32_t length)=0;
// Read uint32_t function to overload in your testbench
virtual uint32_t read(uint64_t address)=0;
// Read byte array function to overload in your testbench
virtual void read(uint64_t address, uint8_t* data, uint32_t length)=0;
// Read word array function to overload in your testbench
virtual void read(uint64_t address, uint32_t* data, uint32_t length)=0;

The accessor methods for jproducer allow the user to setup flows, issue packets, release flows, retrieve the current operating mode of the producer, the current status of the producer, and it's run() method. They are as follows

// 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
void setup(std::shared_ptr<ProtocolPP::jstream>& stream);
// Issues the packet into the testbench or system
void issue(std::shared_ptr<ProtocolPP::jpacket>& packet); //=0;
// If stream is done, release the stream and deallocate
void release(std::string stream); //=0;
// Return current mode of operation
int get_mode();
// run the testbench
void run();
// retrieve the status word
uint32_t get_status(std::string& packet);
// Create and return a SG table for SEC/CAAM
uint64_t get_sgt(uint32_t datasize, uint8_t* data);
See also
jring
jdata
jpacket
jstream
protocolpp
jtestbench
jlogger
jmmu
jprotocolpp
Protocol++® (ProtocolPP®) written by : John Peter Greninger • © John Peter Greninger 2015-2024 • All Rights Reserved
All copyrights and trademarks are the property of their respective owners

The source code contained or described herein and all documents related to the source code (herein called "Material") are owned by John Peter Greninger and Sheila Rocha Greninger. Title to the Material remains with John Peter Greninger and Sheila Rocha Greninger. The Material contains trade secrets and proprietary and confidential information of John Peter Greninger and Sheila Rocha Greninger. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without prior express written consent of John Peter Greninger and Sheila Rocha Greninger (both are required)

No license under any patent, copyright, trade secret, or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel, or otherwise. Any license under such intellectual property rights must be express and approved by John Peter Greninger and Sheila Rocha Greninger in writing

Licensing information can be found at www.protocolpp.com/license with use of the binary forms permitted provided that the following conditions are met:

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution
  • Any and all modifications must be returned to John Peter Greninger at GitHub.com https://github.com/jpgreninger/protocolpp for evaluation. Inclusion of modifications in the source code shall be determined solely by John Peter Greninger. Failure to provide modifications shall render this license NULL and VOID and revoke any rights to use of Protocol++®
  • Commercial use (incidental or not) requires a fee-based license obtainable at www.protocolpp.com/shop
  • Academic or research use requires prior written and notarized permission from John Peter and Sheila Rocha Greninger

Use of the source code requires purchase of the source code. Source code can be purchased at www.protocolpp.com/shop

  • US Copyrights at https://www.copyright.gov/
    • TXu002059872 (Version 1.0.0)
    • TXu002066632 (Version 1.2.7)
    • TXu002082674 (Version 1.4.0)
    • TXu002097880 (Version 2.0.0)
    • TXu002169236 (Version 3.0.1)
    • TXu002182417 (Version 4.0.0)
    • TXu002219402 (Version 5.0.0)
    • TXu002272076 (Version 5.2.1)
    • TXu002383571 (Version 5.4.3)

The name of its contributor may not be used to endorse or promote products derived from this software without specific prior written permission and licensing

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE


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