1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_CONCOLIC_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_CONCOLIC_H_
8#include "backends/p4tools/common/lib/model.h"
10#include "lib/big_int_util.h"
12#include "backends/p4tools/modules/testgen/lib/concolic.h"
16enum class Bmv2HashAlgorithm {
27std::ostream &operator<<(std::ostream &os, Bmv2HashAlgorithm algo);
32 static constexpr int CHUNK_SIZE = 8;
35 static const ConcolicMethodImpls::ImplList BMV2_CONCOLIC_METHOD_IMPLS;
39 static big_int computeChecksum(
const std::vector<const IR::Expression *> &exprList,
40 const Model &finalModel, Bmv2HashAlgorithm algo,
41 Model::ExpressionMap *resolvedExpressions);
47 static const IR::Expression *setAndComputePayload(
uint64_t identity(const uint8_t *buf, size_t len)
Identity hash – the first (up to) 64bits of the values (i.e. indexes 0 to 7).
Definition nethash.cpp:242
uint32_t crc32(const uint8_t *buf, size_t len)
Definition nethash.cpp:166
uint16_t csum16(const uint8_t *buf, size_t len)
16-bit ones' complement checksum (used in IP, TCP, UDP, ...).
Definition nethash.cpp:178
uint16_t xor16(const uint8_t *buf, size_t len)
A 16-bit xor of the values.
Definition nethash.cpp:222
uint16_t crc16(const uint8_t *buf, size_t len)
CRC-16 used in BMv2 (parameters: bit-reflection, polynomial 0x8005, init = 0 and xor_out = 0).
Definition nethash.cpp:158