From d8ccd0fc4cc4f9eaf99586aea897a809dbda8979 Mon Sep 17 00:00:00 2001 From: Matthew Schiller Date: Fri, 26 May 2023 14:38:03 -0400 Subject: [PATCH] Everything seems to work on my "machine". Vivado 2020 synthesis, Vivado 2020 Xsim, ghdl simulations, and quartus simulations Squashed commit of the following: commit f693ec9f2d6422f503b6cc4daa8b83da58eed1d3 Author: Matthew Schiller Date: Fri May 26 14:29:03 2023 -0400 Fixes for size of sepa data and fix for I=I Q=I problem. commit a436eca39e526d276dfe479ed39bf06411fa8bbf Author: Matthew Schiller Date: Fri May 26 11:31:03 2023 -0400 Fix for xsims and projects commit 482b810cc1cdf177c918470cbecc1833e98ac638 Author: Matthew Schiller Date: Fri May 26 10:41:59 2023 -0400 Removing types doc commit 73d2e66df33143680a46ac4956c1d8d42632ac0b Merge: 5d5aa2d 4eb6392 Author: Matthew Schiller Date: Fri May 26 10:34:01 2023 -0400 Merge remote-tracking branch 'origin/main' commit 5d5aa2d038e63d0e54c61841be3d26f7ee610a84 Author: Matthew Schiller Date: Fri May 26 10:31:23 2023 -0400 Possible fix for vunit simulations in newer GHDL? commit 4eb6392884f543c7f6739d16b01f6da2374963eb Author: Matthew Schiller Date: Fri May 26 08:09:10 2023 -0400 Update .gitlab-ci.yml file commit e1541111e9a85e0a02f4f4d7bfd8c8b408747e4c Author: Matthew Schiller Date: Fri May 26 07:51:34 2023 -0400 Update .gitlab-ci.yml file to get ghdl version commit e868cac16cc9a9db9773e3fe174a373832057f05 Author: Matthew Schiller Date: Fri May 26 07:41:45 2023 -0400 fix type errors commit 4071b3629f9612b83b2d60b0f411b3e74b15cc63 Author: Matthew Schiller Date: Thu May 25 12:48:31 2023 -0400 Fix syntax errors in run.py commit aaab566ce22c0603426fb2d3db2e99e941a95194 Author: Matthew Schiller Date: Thu May 25 12:45:02 2023 -0400 Fix to load numpy for all test benches in vunit ghdl commit 880f2da0dab0fadf1fd7dc4f498be26e36680eaf Author: Matthew Schiller Date: Thu May 25 12:39:29 2023 -0400 more python fixes commit f94c4ddbe065dd48b4f12956ad208fc22fec52b1 Author: Matthew Schiller Date: Thu May 25 12:14:01 2023 -0400 Updating for vunit 5.0+ as per https://github.com/VUnit/vunit/issues/777 commit a9c15ffd8d026869c1bb2b4bf66ea4d0393399d9 Author: Matthew Schiller Date: Thu May 25 11:36:29 2023 -0400 Removed parts of fixed/float package that confuses GHDL commit b214ab52246f1d1755582cf7385e72da06de62db Author: Matthew Schiller Date: Thu May 25 11:00:40 2023 -0400 Try 1241234123 to fix python commit 1ad5e1c55fa88c900c32738dac400dd9479a3ea5 Author: Matthew Schiller Date: Thu May 25 10:53:48 2023 -0400 MOre python issues... commit 507f9260b15e5d33c218590cda5099fa7b72b9f0 Author: Matthew Schiller Date: Thu May 25 10:47:14 2023 -0400 Implemented version 4.7.0 changes as per https://github.com/VUnit/vunit/issues/777 commit 352461fdaacc3e424be403469ced9227c70b16f5 Author: Matthew Schiller Date: Thu May 25 10:41:39 2023 -0400 Ugh more typos commit 89ae7d650ba823f4138393db36d5da34a6f0c890 Author: Matthew Schiller Date: Thu May 25 10:36:32 2023 -0400 Fix to include new fixed point files to work around vhdl 2008 compatability in Xsim commit d07430c9d5972e50eb23a825e1439f48cdbf8ff1 Author: Matthew Schiller Date: Thu May 25 10:25:41 2023 -0400 Changing to vunit docker and runtime installing numpy and pytest --- .gitlab-ci.yml | 41 +- casper_accumulators/run.py | 4 + casper_adder/run.py | 5 +- casper_counter/run.py | 4 + casper_delay/run.py | 4 + casper_fifo/run.py | 5 +- .../casper_filter_proj/casper_filter_proj.xpr | 17 +- casper_filter/run.py | 5 +- casper_filter/tb_fil_ppf_wide.vhd | 4 +- casper_flow_control/run.py | 4 + casper_multiplexer/run.py | 5 +- casper_multiplier/run.py | 2 +- casper_ram/run.py | 4 + .../casper_wb_fft_vivproj.xpr | 9 +- casper_wb_fft/fft_gnrcs_intrfcs_pkg.vhd | 6 +- casper_wb_fft/fft_r2_wide.vhd | 11 +- casper_wb_fft/fft_sepa_wide.vhd | 4 +- casper_wb_fft/run.py | 17 +- casper_wb_fft/tb_vu_wb_fft_vfmodel.vhd | 2 +- casper_wbpfb/run.py | 14 + casper_wbpfb/wbpfb_vivproj/wbpfb_vivproj.xpr | 12 +- common_pkg/common_pkg.vhd | 2 +- common_pkg/fixed_float_types_c.vhd | 35 - .../fixed_generic_pkg_2008redirect.vhdl | 7758 +++++++++++++++++ common_pkg/fixed_pkg_c.vhd | 109 +- common_pkg/fixed_pkg_c_2008redirect.vhdl | 55 + .../float_generic_pkg_2008redirect.vhdl | 6713 ++++++++++++++ common_pkg/float_pkg_c.vhd | 57 +- common_pkg/float_pkg_c_2008redirect.vhdl | 58 + misc/run.py | 4 + r2sdf_fft/data/test/out/uniNoise_out.txt | 7169 --------------- .../r2SDF_FFT_proj.cache/wt/xsim.wdf | 8 +- r2sdf_fft/r2SDF_FFT_proj/r2SDF_FFT_proj.xpr | 17 +- r2sdf_fft/run.py | 21 +- r2sdf_fft/tb_vu_rtwosdf_vfmodel.vhd | 2 +- r2sdf_fft/tb_vu_twiddlepkg.vhd | 2 +- r2sdf_fft/twiddlesPkg.vhd | 2 +- 37 files changed, 14770 insertions(+), 7421 deletions(-) delete mode 100644 common_pkg/fixed_float_types_c.vhd create mode 100755 common_pkg/fixed_generic_pkg_2008redirect.vhdl create mode 100755 common_pkg/fixed_pkg_c_2008redirect.vhdl create mode 100755 common_pkg/float_generic_pkg_2008redirect.vhdl create mode 100755 common_pkg/float_pkg_c_2008redirect.vhdl diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a9142e1..ce316fcc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: gitlabvunit:latest +image: ghdl/vunit:mcode-master variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/casper_dspdevel GIT_SUBMODULE_STRATEGY: recursive @@ -11,9 +11,12 @@ casper_accumulators_test: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 + - ghdl --version - /usr/bin/python3 casper_accumulators/run.py --xunit-xml ./casper_accumulators/casper_accumulators_report.xml artifacts: when: always @@ -27,6 +30,8 @@ casper_adders_test: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -43,6 +48,8 @@ counter: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -59,6 +66,8 @@ delay: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -76,6 +85,8 @@ filter: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -92,6 +103,8 @@ flow_control: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -108,6 +121,8 @@ misc: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -124,6 +139,8 @@ multiplexer: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -140,6 +157,8 @@ multiplier: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -156,6 +175,8 @@ fifo: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -172,6 +193,8 @@ ram: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -188,6 +211,8 @@ rtwosdf_fft: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -204,6 +229,8 @@ rtwosdf_fft_bitaccurate_twid: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -221,6 +248,8 @@ pipe_fft: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -238,6 +267,8 @@ par_fft: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -254,6 +285,8 @@ wide_fft: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -271,6 +304,8 @@ single_filter: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -287,6 +322,8 @@ wide_filter: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 @@ -303,6 +340,8 @@ wbpfb: # This job runs in the test stage. tags: - ghdl script: + - python3 -m pip install pytest --progress-bar off + - python3 -m pip install numpy --progress-bar off - echo Attempting to start Vunit Tests - cd $GIT_CLONE_PATH - echo Starting Vunit in python3 diff --git a/casper_accumulators/run.py b/casper_accumulators/run.py index d9936f58..a690c0a0 100644 --- a/casper_accumulators/run.py +++ b/casper_accumulators/run.py @@ -5,6 +5,7 @@ # Create VUnit instance by parsing command line arguments vu = VUnit.from_argv() +vu.add_vhdl_builtins() script_dir = dirname(__file__) # XPM Library compile @@ -28,6 +29,9 @@ # Create library 'common_pkg_lib' common_pkg_lib = vu.add_library("common_pkg_lib") +#common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/fixed_float_types_c.vhd")) +common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/fixed_pkg_c.vhd")) +common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/float_pkg_c.vhd")) common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/common_pkg.vhd")) # Create library 'ip_xpm_ram_lib' diff --git a/casper_adder/run.py b/casper_adder/run.py index f1e398e5..101ec316 100644 --- a/casper_adder/run.py +++ b/casper_adder/run.py @@ -58,7 +58,7 @@ def generate_tests(obj, direc, add_sub, inp_pipeline, out_pipeline, in_dat_w): ) vu = VUnit.from_argv() - +vu.add_vhdl_builtins() script_dir = os.path.dirname(__file__) lib1 = vu.add_library("casper_adder_lib",allow_duplicate=True) @@ -83,6 +83,9 @@ def generate_tests(obj, direc, add_sub, inp_pipeline, out_pipeline, in_dat_w): lib2.add_source_files(os.path.join(script_dir, "../common_components/*.vhd")) lib3 = vu.add_library("common_pkg_lib",allow_duplicate = True) +#lib3.add_source_files(os.path.join(script_dir, "../common_pkg/fixed_float_types_c.vhd")) +lib3.add_source_files(os.path.join(script_dir, "../common_pkg/fixed_pkg_c.vhd")) +lib3.add_source_files(os.path.join(script_dir, "../common_pkg/float_pkg_c.vhd")) lib3.add_source_files(os.path.join(script_dir, "../common_pkg/*.vhd")) vu.set_compile_option("ghdl.a_flags", ["-Wno-hide"]) diff --git a/casper_counter/run.py b/casper_counter/run.py index e5727023..2386275b 100644 --- a/casper_counter/run.py +++ b/casper_counter/run.py @@ -3,6 +3,7 @@ # Create VUnit instance by parsing command line arguments vu = VUnit.from_argv() +vu.add_vhdl_builtins() script_dir = dirname(__file__) # Create library 'casper_counter_lib' @@ -10,6 +11,9 @@ casper_counter_lib.add_source_files(join(script_dir,"./*.vhd")) common_pkg_lib = vu.add_library("common_pkg_lib") +#common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/fixed_float_types_c.vhd")) +common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/fixed_pkg_c.vhd")) +common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/float_pkg_c.vhd")) common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/common_pkg.vhd")) TB_GENERATED = casper_counter_lib.test_bench("tb_tb_vu_common_counter") diff --git a/casper_delay/run.py b/casper_delay/run.py index 62f01caa..2c93a80f 100644 --- a/casper_delay/run.py +++ b/casper_delay/run.py @@ -5,6 +5,7 @@ # Create VUnit instance by parsing command line arguments vu = VUnit.from_argv() +vu.add_vhdl_builtins() script_dir = dirname(__file__) # XPM Library compile @@ -28,6 +29,9 @@ # Create library 'common_pkg_lib' common_pkg_lib = vu.add_library("common_pkg_lib") +#common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/fixed_float_types_c.vhd")) +common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/fixed_pkg_c.vhd")) +common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/float_pkg_c.vhd")) common_pkg_lib.add_source_files(join(script_dir, "../common_pkg/common_pkg.vhd")) # Create library 'ip_xpm_ram_lib' diff --git a/casper_fifo/run.py b/casper_fifo/run.py index fe03a916..0e31a975 100644 --- a/casper_fifo/run.py +++ b/casper_fifo/run.py @@ -2,7 +2,7 @@ from vunit import VUnit vu = VUnit.from_argv() - +vu.add_vhdl_builtins() script_dir = os.path.dirname(__file__) lib1 = vu.add_library("tb_lib",allow_duplicate=True) @@ -23,6 +23,9 @@ lib2.add_source_files(os.path.join(script_dir, "../common_components/common_async.vhd")) lib3 = vu.add_library("common_pkg_lib",allow_duplicate = True) +#lib3.add_source_files(os.path.join(script_dir, "../common_pkg/fixed_float_types_c.vhd")) +lib3.add_source_files(os.path.join(script_dir, "../common_pkg/fixed_pkg_c.vhd")) +lib3.add_source_files(os.path.join(script_dir, "../common_pkg/float_pkg_c.vhd")) lib3.add_source_files(os.path.join(script_dir, "../common_pkg/*.vhd")) lib5 = vu.add_library("dp_pkg_lib",allow_duplicate = True) diff --git a/casper_filter/casper_filter_proj/casper_filter_proj.xpr b/casper_filter/casper_filter_proj/casper_filter_proj.xpr index 21f9be5d..6dac250b 100644 --- a/casper_filter/casper_filter_proj/casper_filter_proj.xpr +++ b/casper_filter/casper_filter_proj/casper_filter_proj.xpr @@ -38,7 +38,7 @@