#include <springbok.h>
#include <stdio.h>
#include <stdlib.h>

#include "pw_unit_test/framework.h"
#include "softrvv.h"

namespace softrvv_vaddu_test {
namespace {

uint16_t src1[] = {1, 2, 3, 4, 5};
uint16_t src2[] = {1, 2, 3, 4, 5};
uint16_t rs1 = 3;
const uint32_t AVL_CONST = sizeof(src1)/sizeof(src1[0]);
uint32_t dest[AVL_CONST];

uint32_t ref_vv[] = {2, 4, 6, 8, 10};
uint32_t ref_vx[] = {4, 5, 6, 7, 8};

class SoftRvvVwaddTest : public ::testing::Test {
 protected:
  void SetUp() override { memset(dest, 0, sizeof(dest)); }
};

TEST_F(SoftRvvVwaddTest, UVV) {
  softrvv::vwadd_vv<uint32_t, uint16_t>(dest, src1, src2, AVL_CONST);
  ASSERT_EQ(memcmp(dest, ref_vv, sizeof(dest)), 0);
}

TEST_F(SoftRvvVwaddTest, UVX) {
  softrvv::vwadd_vx<uint32_t, uint16_t>(dest, src1, &rs1, AVL_CONST);
  ASSERT_EQ(memcmp(dest, ref_vx, sizeof(dest)), 0);
}

}  // namespace
}  // namespace softrvv_vwaddu_test
