From 4460de8fb5e14028218c527e2180dd907b2918a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camille=20Moni=C3=A8re?= Date: Sun, 17 Apr 2022 17:14:15 +0200 Subject: [PATCH] Widen output of 1 bit to pass Co-Simulaton --- hls_files/cordicabs_16_4_6/script_16_4_6.tcl | 2 +- sources/CCordicAbs/CCordicAbs.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hls_files/cordicabs_16_4_6/script_16_4_6.tcl b/hls_files/cordicabs_16_4_6/script_16_4_6.tcl index 3cd1ce0..9679d10 100644 --- a/hls_files/cordicabs_16_4_6/script_16_4_6.tcl +++ b/hls_files/cordicabs_16_4_6/script_16_4_6.tcl @@ -18,5 +18,5 @@ set_clock_uncertainty 2 #source "./cordicabs_16_4_6/solution/directives.tcl" csim_design -argv "${ROOT_DIR}/data/input.dat" -clean -O csynth_design -# cosim_design -O -argv "${ROOT_DIR}/data/input.dat" +cosim_design -O -argv "${ROOT_DIR}/data/input.dat" export_design -format ip_catalog diff --git a/sources/CCordicAbs/CCordicAbs.hpp b/sources/CCordicAbs/CCordicAbs.hpp index e24b072..0e63cc4 100644 --- a/sources/CCordicAbs/CCordicAbs.hpp +++ b/sources/CCordicAbs/CCordicAbs.hpp @@ -46,8 +46,8 @@ public: static constexpr const unsigned In_W = TIn_W; static constexpr const unsigned In_I = TIn_I; - static constexpr const unsigned Out_W = In_W + 2; - static constexpr const unsigned Out_I = In_I + 2; + static constexpr const unsigned Out_W = In_W + 3; + static constexpr const unsigned Out_I = In_I + 3; static constexpr const unsigned nb_stages = Tnb_stages; static constexpr unsigned kn_i = unsigned(kn_values[nb_stages - 1] * double(1U << 3)); // 3 bits are enough