Skip to content

Commit 6c25b65

Browse files
committed
Merge branch 'JingJerYen-main' into develop
2 parents 3b715da + 9cdcb70 commit 6c25b65

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI Transaction Recording
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.cpp'
7+
- '**.h'
8+
- '**CMakeLists.txt'
9+
- '.github/workflows/**'
10+
pull_request:
11+
paths:
12+
- '**.cpp'
13+
- '**.h'
14+
- '**CMakeLists.txt'
15+
- '.github/workflows/**'
16+
17+
jobs:
18+
build-and-test:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
cpp_std: [11, 14, 17, 20]
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Update submodules
27+
run: git submodule update --init --recursive
28+
29+
- name: Install dependencies
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y cmake g++ python3-pip
33+
pip3 install "conan<2.0"
34+
35+
- name: Configure
36+
run: >
37+
cmake -S . -B build
38+
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_std }}
39+
40+
- name: Build
41+
run: cmake --build build -j
42+
43+
- name: Run transaction_recording
44+
run: ./build/examples/transaction_recording/transaction_recording

src/interfaces/axi/pin/axi4_target.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,16 @@ template <typename CFG> inline void axi::pin::axi4_target<CFG>::wdata_t() {
437437
// TODO: assuming consecutive write (not scattered)
438438
auto strobe = strb.to_uint();
439439
if(last) {
440-
auto act_data_len = CFG::IS_LITE ? util::bit_count(strobe) : fsm_hndl->aux.i32.i0;
440+
// If it is axi lite, number of strobes define the size, for axi4 aligned accesses, axsize & axburst determine size,
441+
// for unaligned accesses strobe count determines size
442+
auto act_data_len = CFG::IS_LITE ? util::bit_count(strobe) : offset == 0 ? (beat_count + 1) * size : fsm_hndl->aux.i32.i0;
441443
gp->set_data_length(act_data_len);
442-
gp->set_byte_enable_length(act_data_len);
443444
gp->set_streaming_width(act_data_len);
445+
if(fsm_hndl->aux.i32.i0 == act_data_len) {
446+
gp->set_byte_enable_length(0);
447+
} else {
448+
gp->set_byte_enable_length(act_data_len);
449+
}
444450
}
445451
auto tp = CFG::IS_LITE || this->w_last->read() ? axi::fsm::protocol_time_point_e::BegReqE
446452
: axi::fsm::protocol_time_point_e::BegPartReqE;

0 commit comments

Comments
 (0)