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