From ced18a4cad00cdd824bbb1104a94eb2d22ea0370 Mon Sep 17 00:00:00 2001 From: Chris Hurley Date: Thu, 3 Jul 2025 13:59:30 -0700 Subject: [PATCH 1/5] update lwtr4sc subproject to latest commit --- third_party/lwtr4sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/lwtr4sc b/third_party/lwtr4sc index 04c288d5..8e3bb880 160000 --- a/third_party/lwtr4sc +++ b/third_party/lwtr4sc @@ -1 +1 @@ -Subproject commit 04c288d580d8ae8ba695e05bc121178fa2ff2932 +Subproject commit 8e3bb880778192ad791b9124dedbfdf252c3b879 From 918c2ca437c6acedac52afaae94ad30f8a21de04 Mon Sep 17 00:00:00 2001 From: Chris Hurley Date: Mon, 30 Jun 2025 14:42:29 -0700 Subject: [PATCH 2/5] add CI workflow for testing different C++ standards --- .../workflows/ci-transaction_recording.yml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci-transaction_recording.yml diff --git a/.github/workflows/ci-transaction_recording.yml b/.github/workflows/ci-transaction_recording.yml new file mode 100644 index 00000000..353c88a1 --- /dev/null +++ b/.github/workflows/ci-transaction_recording.yml @@ -0,0 +1,44 @@ +name: CI Transaction Recording + +on: + push: + paths: + - '**.cpp' + - '**.h' + - '**CMakeLists.txt' + - '.github/workflows/**' + pull_request: + paths: + - '**.cpp' + - '**.h' + - '**CMakeLists.txt' + - '.github/workflows/**' + +jobs: + build-and-test: + runs-on: ubuntu-latest + strategy: + matrix: + cpp_std: [11, 14, 17, 20] + steps: + - uses: actions/checkout@v4 + + - name: Update submodules + run: git submodule update --init --recursive + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake g++ python3-pip + pip3 install "conan<2.0" + + - name: Configure + run: > + cmake -S . -B build + -DCMAKE_CXX_STANDARD=${{ matrix.cpp_std }} + + - name: Build + run: cmake --build build -j + + - name: Run transaction_recording + run: ./build/examples/transaction_recording/transaction_recording From 4cc80e14b12da4df16ebfdd0390487391a046cd7 Mon Sep 17 00:00:00 2001 From: Chris Hurley Date: Tue, 1 Jul 2025 15:27:09 -0700 Subject: [PATCH 3/5] updated scv_extensions constructors for C++20 compatilbity --- third_party/scv-tr/src/scv-tr/scv_introspection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/scv-tr/src/scv-tr/scv_introspection.h b/third_party/scv-tr/src/scv-tr/scv_introspection.h index bce89256..835a6da9 100644 --- a/third_party/scv-tr/src/scv-tr/scv_introspection.h +++ b/third_party/scv-tr/src/scv-tr/scv_introspection.h @@ -3252,8 +3252,8 @@ template class scv_extensions> : public scv_extensions_base class scv_extensions> : public scv_extensions { public: - scv_extensions>() {} - scv_extensions>(const scv_extensions& rhs) + scv_extensions() {} + scv_extensions(const scv_extensions& rhs) : scv_extensions(rhs) {} virtual ~scv_extensions() {} scv_extensions& operator=(const scv_extensions& rhs) { return scv_extensions::operator=(rhs); } From 40160f1cbb6efc5e297958286905c686670e0fc1 Mon Sep 17 00:00:00 2001 From: Chris Hurley Date: Wed, 2 Jul 2025 14:17:52 -0700 Subject: [PATCH 4/5] update cci to the tip of the accelera-official main for C++20 compatibility --- .../cci-1.0.1/cci/cfg/cci_param_typed.h | 14 +++++++++++++ third_party/cci-1.0.1/cci/core/cci_value.h | 4 ++-- .../cci-1.0.1/cci/core/cci_value_iterator.h | 20 +++++++++---------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/third_party/cci-1.0.1/cci/cfg/cci_param_typed.h b/third_party/cci-1.0.1/cci/cfg/cci_param_typed.h index ad6f93fa..0fcf14f8 100644 --- a/third_party/cci-1.0.1/cci/cfg/cci_param_typed.h +++ b/third_party/cci-1.0.1/cci/cfg/cci_param_typed.h @@ -31,6 +31,14 @@ * @author Enrico Galli, Intel * @author Guillaume Delbergue, GreenSocs / Ericsson */ + +#if defined(__clang__) || \ + (defined(__GNUC__) && ((__GNUC__ * 1000 + __GNUC_MINOR__) >= 4006)) +// ignore warning about hidden "register_post_read_callback()" overloads +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif + CCI_OPEN_NAMESPACE_ // Forward declaration @@ -988,4 +996,10 @@ template using cci_param = cci_param_typed; CCI_CLOSE_NAMESPACE_ + +#if defined(__clang__) || \ + (defined(__GNUC__) && ((__GNUC__ * 1000 + __GNUC_MINOR__) >= 4006)) +#pragma GCC diagnostic pop +#endif + #endif //CCI_CFG_CCI_PARAM_TYPED_H_INCLUDED_ diff --git a/third_party/cci-1.0.1/cci/core/cci_value.h b/third_party/cci-1.0.1/cci/core/cci_value.h index 293a1717..8f5db48d 100644 --- a/third_party/cci-1.0.1/cci/core/cci_value.h +++ b/third_party/cci-1.0.1/cci/core/cci_value.h @@ -764,7 +764,7 @@ class cci_value_map_elem_cref template friend class cci_impl::value_iterator_impl; typedef cci_impl::value_ptr proxy_ptr; - typedef void value_type; // TODO: add explicit value_type + using value_type = cci_value_map_elem_cref; public: typedef cci_value_map_elem_cref const_reference; typedef cci_value_map_elem_ref reference; @@ -791,7 +791,7 @@ class cci_value_map_elem_ref { template friend class cci_impl::value_iterator_impl; typedef cci_impl::value_ptr proxy_ptr; - typedef void value_type; // TODO: add explicit value_type + using value_type = cci_value_map_elem_ref; public: typedef cci_value_map_elem_cref const_reference; typedef cci_value_map_elem_ref reference; diff --git a/third_party/cci-1.0.1/cci/core/cci_value_iterator.h b/third_party/cci-1.0.1/cci/core/cci_value_iterator.h index 56cf4602..b7ffacef 100644 --- a/third_party/cci-1.0.1/cci/core/cci_value_iterator.h +++ b/third_party/cci-1.0.1/cci/core/cci_value_iterator.h @@ -71,11 +71,11 @@ template class value_iterator_impl { public: // std::iterator_traits types - typedef T reference; // return by value! - typedef value_ptr pointer; // return proxy pointer - typedef typename T::value_type value_type; // "real" value type - typedef std::ptrdiff_t difference_type; - typedef std::random_access_iterator_tag iterator_category; + using reference = T; // return by value! + using pointer = value_ptr; // return proxy pointer + using value_type = typename T::value_type; // "real" value type + using difference_type = std::ptrdiff_t; + using iterator_category = std::random_access_iterator_tag; protected: typedef void* impl_type; // type-punned pointer for now @@ -130,11 +130,11 @@ class cci_value_iterator public: /// @name C++ standard iterator types ///@{ - typedef typename impl::value_type value_type; - typedef typename impl::pointer pointer; - typedef typename impl::reference reference; - typedef typename impl::difference_type difference_type; - typedef typename impl::iterator_category iterator_category; + using value_type = typename impl::value_type; + using pointer = typename impl::pointer; + using reference = typename impl::reference; + using difference_type = typename impl::difference_type; + using iterator_category = typename impl::iterator_category; ///@} /// constructs an invalid iterator (non-dereferencable, non-incrementable) From d893fc27acecd4f56359c0a92b31bf3965b85e30 Mon Sep 17 00:00:00 2001 From: ycc738 Date: Sun, 28 Sep 2025 16:08:56 +0800 Subject: [PATCH 5/5] Fix AXI4 write strobe handling and optimize byte enable Commit 4a6c2aa introduced a bug in write strobe handling. This change: - Reverts to the original correct strobe implementation - Disables byte_enable_len when not needed for better efficiency --- src/interfaces/axi/pin/axi4_target.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/interfaces/axi/pin/axi4_target.h b/src/interfaces/axi/pin/axi4_target.h index c7d6f9c2..11cf62da 100644 --- a/src/interfaces/axi/pin/axi4_target.h +++ b/src/interfaces/axi/pin/axi4_target.h @@ -431,10 +431,14 @@ template inline void axi::pin::axi4_target::wdata_t() { // TODO: assuming consecutive write (not scattered) auto strobe = strb.to_uint(); if(last) { - auto act_data_len = CFG::IS_LITE ? util::bit_count(strobe) : fsm_hndl->aux.i32.i0; + auto act_data_len = CFG::IS_LITE ? util::bit_count(strobe) : (beat_count + 1) * size; gp->set_data_length(act_data_len); - gp->set_byte_enable_length(act_data_len); gp->set_streaming_width(act_data_len); + if (fsm_hndl->aux.i32.i0 == act_data_len) { + gp->set_byte_enable_length(0); + } else { + gp->set_byte_enable_length(act_data_len); + } } auto tp = CFG::IS_LITE || this->w_last->read() ? axi::fsm::protocol_time_point_e::BegReqE : axi::fsm::protocol_time_point_e::BegPartReqE;