Skip to content

Commit 95f6f72

Browse files
committed
Merge branch 'main' of https://github.com/JingJerYen/SystemC-Components into JingJerYen-main
2 parents 3b715da + d893fc2 commit 95f6f72

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,14 @@ 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+
auto act_data_len = CFG::IS_LITE ? util::bit_count(strobe) : (beat_count + 1) * size;
441441
gp->set_data_length(act_data_len);
442-
gp->set_byte_enable_length(act_data_len);
443442
gp->set_streaming_width(act_data_len);
443+
if (fsm_hndl->aux.i32.i0 == act_data_len) {
444+
gp->set_byte_enable_length(0);
445+
} else {
446+
gp->set_byte_enable_length(act_data_len);
447+
}
444448
}
445449
auto tp = CFG::IS_LITE || this->w_last->read() ? axi::fsm::protocol_time_point_e::BegReqE
446450
: axi::fsm::protocol_time_point_e::BegPartReqE;

0 commit comments

Comments
 (0)