Commit graph

26 commits

Author SHA1 Message Date
Camille Monière b789105732
Merge pull request #3 from DrasLorus/msvc-support-experimental
MSVC++ Support
2022-06-11 21:21:18 +02:00
DrasLorus 55e8754626 MSVC++ Support
- Add cl.exe support using CMake and DepFetch module.
- Inlining doesn't work, but it compiles
2022-06-11 19:58:11 +02:00
anonymous 25fe26307c
Fix source definitions to let clang++ work 2022-06-11 10:27:02 +02:00
anonymous 6afa99d7a1
GNU 4.6 (consequently Xilinx 2019.1) is finally supported
- if GNU version is less than 6.2:
    * Catch2 is disabled, a custom unit test is used instead,
    * Constexpr keyword is largely removed and less used (performance
      loss),
    * Only ML Cordic/Roms are compiled and tested.
- Perfect compilation on g++ v4.6.4, should work on Vivado HLS (g++
  v4.6.3).
2022-05-13 15:53:14 +02:00
Camille Monière 25255802f1
Remove indetermination and patch for Xilinx v2019.1 compatibility
- Use of `rom_cordic_rotate` namespace to isolate functions and
  variables. Useful when CORDICS are included in super project.
- Add define barrier to exclude some code when used when Xilinx v2019.1,
  especially C++11/14 code that are not fully supported by the (crazy)
  old version of GCC in use (v4.6.3).
  Need the definition of `XILINX_MAJOR` (can be done using `set
  XILINX_MAJOR [expr {int( [version -short] )}]` in a Xilinx TCL script
  and then adding it to the cflags using the `-cflags` switch with
  `-DXILINX_MAJOR=${XILINX_MAJOR}` or by manually adding the major
  version to the CFLAGS in gui.
- Add a template version of the helper function, to support v2019.1.
2022-04-25 11:43:31 +02:00
Camille Monière a0ce4ceab0
Update README.md on github
Add a CI badge.
2022-04-21 15:37:46 +02:00
DrasLorus a8433e0188
Fix synthesis and includes bugs
- `catch_common` target renamed `catch_common_${PROJECT_NAME}` to avoid
  conflict with other `catch_common` target when included in a top
  cmake project.
- `scale_cordic(double)` moved outside of the SOFTWARE region, as it can
  be useful in Xilinx testbench and is not synthetized anyway.
- A little modification for debbuging purpose, out_stream can be used to
  dump results in a file if not commented out.
2022-04-20 19:44:52 +02:00
Camille Monière 0dc041b840
Fix test method to really using test vectors
- Grow kn_i to 4 bits to pass the new tests.
2022-04-14 17:19:19 +02:00
Camille Monière 7707d12e98
Add a synthesis-friendly option and yet another formatting
- If ENABLE_SOFTWARE is true, the behavior is the same than before. All
  tests and functions relying on std::complex are obfuscated otherwise.
  This is required for Xilinx tools.
2022-03-14 17:55:16 +01:00
Camille Monière 4a0236baea
Just an auto-formatting correction 2022-03-14 14:19:42 +01:00
Camille Monière f0035238bf
Correct the name and improve widely
- Fix the MC (Monte-Carlo) to the proper algoritm name, ML (maximum
  likelyhood) and remove HalfPi since the use of divider allow to
  theoretically support any pi / 2^k, k an integer. In reality, a too
  low rotation would require more stages than 7 but it is for futur
  improvements.
- Make use of `divider` template to provide rotation grain finer than pi
  / 2. Validated (unit-tested) with pi / 4 with the same margins than pi
  / 2 (2% of error with floating scaling, 3% with fixed scaling).
- Fix rom size which now use N_STAGES+1 bits instead of 8 regardless of
  N_STAGES. Simplify the cordic method implementation, which
  unexpectedly (and fortunately) improved its performance.
2022-03-14 14:07:10 +01:00
Camille Monière 08c18e63a0
Add support and validation for Pi / 4 in Constexpr variant 2022-03-11 18:38:14 +01:00
Camille Monière 1a7a1be5c7
Update CMakeLists and add GCC 6.2 and 6.5 to the supported compiler lists 2022-02-21 11:39:33 +01:00
Camille Monière 5bc9c3eeb1
Big update, that compiles with Xilinx GCC 6.2
- Commit title implies possible Xilinx Vivado HLS 2019.1 support, thus support
  for e.g. all USRP Series 3 from Ettus.
- Add a new CORDIC version, Rom based and meta-programmed via CMake
  features, to be even compiled with earlier GCC (not quite tested, but
  by changing constexpr to const and using gcc 4.6 -sdt=c++0x, it
  worked).
- Class name modified, to be more explicit.
2022-02-18 21:33:59 +01:00
Camille Monière 9b83926968
Fix for GCC 9.4 support, formatting, and license addition. 2022-02-17 20:22:12 +01:00
Camille Monière f921587f5b
Make cordic method static 2022-02-15 19:37:37 +01:00
Camille Monière 0947b52266
Add option to be PEDANTIC© 2022-02-15 19:25:45 +01:00
Camille Monière 1027b8fc09
Merge pull request #2 from DrasLorus/cicd
tentative of actions
2022-02-14 15:57:58 +01:00
Camille Monière e7e7a8eba1
Tentative of action 2022-02-14 15:55:30 +01:00
Camille Monière e3f9a2e1e5
GCC now compiles AND evaluates constexpr during compilation. 2022-02-14 12:13:43 +01:00
Camille Monière 9e21f49577
Fix CMakeLists and add a constexpr test
- ap_types should be correctly foundable now.
- A unit-test to check for constexpr rightness have been added.
2022-02-14 10:44:22 +01:00
Camille Monière d92d11e3e7
GCC now works. 2022-02-11 20:17:10 +01:00
Camille Monière cbd04f1a3e
Clang works, not GCC 2022-02-11 19:17:42 +01:00
Camille Monière f2a7c0c886
Working AP template cordic 2022-02-11 18:17:13 +01:00
Camille Monière d46fbc40b6
Road to template cordic rotate 2022-02-07 18:59:06 +01:00
Camille Monière fcffa1cb7c
initial commit 2022-02-04 19:27:11 +01:00