Skip to content

adjust consumer and producer#12

Open
zouguoqi wants to merge 4 commits into
pulp-platform:mainfrom
zouguoqi:testbranch
Open

adjust consumer and producer#12
zouguoqi wants to merge 4 commits into
pulp-platform:mainfrom
zouguoqi:testbranch

Conversation

@zouguoqi
Copy link
Copy Markdown

No description provided.

@DiyouS DiyouS requested a review from Aquaticfuller February 10, 2026 09:13
@DiyouS
Copy link
Copy Markdown
Collaborator

DiyouS commented Mar 26, 2026

Can we rebase it to latest main so that the actual CI can get running?

@zouguoqi
Copy link
Copy Markdown
Author

Can we rebase it to latest main so that the actual CI can get running?

I have pulled from main, it shows everything up-to-date.

@DiyouS
Copy link
Copy Markdown
Collaborator

DiyouS commented Mar 27, 2026

I have linked this PR also to this branch for internal CI checking

Copy link
Copy Markdown
Member

@Aquaticfuller Aquaticfuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the kernel! With the latest commit, the kernel can now compile and run in RTL simulation.
Four clarifying questions inline, mostly about design intent. Happy to discuss further.

#include "benchmark.h"

DlschInd dlsch_ind __attribute__((section(".data")));
UeStateRpt ue_status_rpt_content __attribute__((section(".data")));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some structures, such as dlsch_ind and ue_status_rpt_content, are mainly used to model memory accesses. Since their loaded values are not really used later, the compiler may optimize these loads away. Should we mark them as volatile, or is there another preferred way to preserve this memory traffic?

uint32_t total_cycle = CONSUMER_CORE_NUM * PDU_SIZE * CPU_FREQENCY / OUTPUT_DATARATE;
while (1) {
uint32_t start_timecycle = benchmark_get_cycle();
TestDataStru dfx = {0};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestDataStru dfx is filled inside rlc_send_pkt(), but it is not read after the function returns. I would like to confirm whether this structure is only used to model per-packet temporary data movement, or whether it should be consumed by later logic.

// pdcp_src_data[NUM_SRC_SLOTS-1][PDU_SIZE-1],
// benchmark_get_cycle());
// DEBUG_PRINTF_LOCK_RELEASE(&printf_lock);
rlc_ctx.firstSduPktRxCycle = benchmark_get_cycle();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intended meaning of firstSduPktRxCycle?​ Currently, it is reset on every producer call, so it behaves more like a per-packet start timestamp rather than the first receive timestamp of the whole RLC flow. We should confirm whether this is intended.​

RcvPktHeader tmp = *(RcvPktHeader *)node->data;
/* write 64B to node mem */
vector_memcpy32_m4_opt(((RcvPktHeader *)node->data + 1), &tmp, sizeof(RcvPktHeader));
rlc_ctx.pdcpcount++;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fields such as pktdelay, pdcpcount, and rlcOm[] may be written by multiple threads. This is fine for the current default test, but if we want to use more consumer cores, we may need to make these fields per-core, atomic, or protected by a lock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants