Commit fe5058ed authored by Veronica.Quintuna's avatar Veronica.Quintuna

add cumulated time per subframe

parent e40f2532
......@@ -551,6 +551,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
eNB->proc.threadPool.doneRequests != NULL
)
LOG_E(PHY,"no finished = %d\n",eNB->proc.threadPool.notFinishedJobs);
uint64_t startTime=rdtsc();
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++)
{
dlsch0 = eNB->dlsch[(uint8_t)UE_id][0];
......@@ -614,6 +616,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
request_t* tmp;
while ((tmp=eNB->proc.threadPool.doneRequests)!=NULL) {
tmp->returnTime=rdtsc();
tmp->cumulSubframe=tmp->returnTime-startTime;
// Ignore write error (if no trace listner)
if (write(eNB->proc.threadPool.traceFd, tmp, sizeof(request_t)- 2*sizeof(void*))) {};
eNB->proc.threadPool.doneRequests=tmp->next;
......@@ -1504,6 +1507,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
eNB->proc.threadPool.doneRequests != NULL
)
LOG_E(PHY,"no finished = %d\n",eNB->proc.threadPool.notFinishedJobs);
uint64_t startTime=rdtsc();
for (int i=0; i<NUMBER_OF_UE_MAX; i++) {
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[i];
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
......@@ -1590,6 +1594,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
tmp->decodeIterations=rdata->decodeIterations;
post_decode(tmp);
tmp->returnTime=rdtsc();
tmp->cumulSubframe=tmp->returnTime-startTime;
// Ignore write error (if no trace listner)
if (write(eNB->proc.threadPool.traceFd, tmp, sizeof(request_t)- 2*sizeof(void*))) {};
eNB->proc.threadPool.doneRequests=tmp->next;
......
......@@ -32,8 +32,8 @@ int main(int argc, char* argv[]) {
printf("Cycles per µs: %lu\n",cpuCyclesMicroSec);
#define SEP "\t"
printf("Frame" SEP "SubFrame" SEP "CodeBlock" SEP "RNTI" SEP "Iterations" SEP
"StartTime" SEP "RunTime" SEP "ReturnTime" SEP
"CPUcore" SEP "ThreadID" "\n");
"StartTime" SEP "RunTime" SEP "ReturnTime" SEP "CumulSubFrame"
SEP "CPUcore" SEP "ThreadID" "\n");
mkfifo("/tmp/test-tcri",0666);
int fd=open("/tmp/test-tcri", O_RDONLY);
......@@ -49,7 +49,7 @@ int main(int argc, char* argv[]) {
doneRequest.processedBy[15]='\0';
printf("%u" SEP "%u" SEP "%u" SEP "%u" SEP "%lu" SEP
"%lu" SEP "%lu" SEP "%lu" SEP
"%u" SEP "%s" "\n",
"%lu" SEP "%u" SEP "%s" "\n",
id.s.frame,
id.s.subframe,
id.s.codeblock,
......@@ -58,6 +58,7 @@ int main(int argc, char* argv[]) {
(doneRequest.startProcessingTime-doneRequest.creationTime)/cpuCyclesMicroSec,
(doneRequest.endProcessingTime-doneRequest.startProcessingTime)/cpuCyclesMicroSec,
(doneRequest.returnTime-doneRequest.endProcessingTime)/cpuCyclesMicroSec,
doneRequest.cumulSubframe/cpuCyclesMicroSec,
doneRequest.coreId,
doneRequest.processedBy
);
......
......@@ -28,7 +28,8 @@ typedef struct request {
uint64_t creationTime;
uint64_t startProcessingTime;
uint64_t endProcessingTime;
uint64_t returnTime;
uint64_t returnTime;
uint64_t cumulSubframe;
uint64_t decodeIterations;
int coreId;
char processedBy[16];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment