Formatting

This commit is contained in:
Camille Monière 2022-04-21 15:32:39 +02:00
parent da8bffc606
commit cb06836072
Signed by: moniere
GPG key ID: 188DD5B072181C0F
6 changed files with 10 additions and 14 deletions

View file

@ -18,6 +18,3 @@
*/
#include "CCordicAbs.hpp"

View file

@ -63,11 +63,10 @@ public:
}
static constexpr ap_uint<Out_W> scale_cordic(ap_uint<Out_W> in) {
return ap_uint<Out_W>(ap_uint<Out_W+4>(in * ap_uint<4>(kn_i)) >> 4U);
return ap_uint<Out_W>(ap_uint<Out_W + 4>(in * ap_uint<4>(kn_i)) >> 4U);
}
#if !defined (XILINX_MAJOR) || XILINX_MAJOR >= 2020
#if !defined(XILINX_MAJOR) || XILINX_MAJOR >= 2020
static constexpr ap_uint<Out_W> process(ap_int<In_W> re_in, ap_int<In_W> im_in) {
ap_int<Out_W> A[nb_stages + 1];
ap_int<Out_W> B[nb_stages + 1];

View file

@ -134,7 +134,7 @@ TEST_CASE("Constexpr CordicAbs works with C-Types", "[CORDICABS]") {
// outfile << values_in[iter].real() << " " << values_in[iter].imag() << " " << values_out[iter] << " " << results[iter] << endl;
REQUIRE_THAT(cordic_abs::scale_cordic(double(values_out[iter])) / cordic_abs::out_scale_factor , WithinAbsMatcher(results[iter], abs_margin));
REQUIRE_THAT(cordic_abs::scale_cordic(double(values_out[iter])) / cordic_abs::out_scale_factor, WithinAbsMatcher(results[iter], abs_margin));
}
// outfile.close();
}

View file

@ -19,7 +19,7 @@
#include "top_level_cordic.hpp"
#if !defined (XILINX_MAJOR) || XILINX_MAJOR >= 2020
#if !defined(XILINX_MAJOR) || XILINX_MAJOR >= 2020
void cordic_abs_16_4_6(
ap_int<cordic_abs_t::In_W> re_in,