Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check for PL SysMon #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/xlnx_platformstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "utils.h"

#define MAX_FILENAME_LEN 500
#define INVALID_PL_TEMP -280226 // Temp reported by hwmon when PL SysMon not available

FILE *fp_out;

Expand Down Expand Up @@ -1135,11 +1136,11 @@ int print_sysmon_power_info(int verbose_flag, int sample_interval, int sample_wi
fprintf(fp_out, "VTT PS GTR voltage : %ld mV\t\t %ld mV\n\n",VTT_PS_GTR,VTT_PS_GTR_avg);

fprintf(fp_out, "PL Sysmon\n");
if (PL_TEMP_avg > 0) {
fprintf(fp_out, "PL temperature : %ld C\t\t %ld C\n\n",(PL_TEMP)/1000,(PL_TEMP_avg)/1000);
if (PL_TEMP_avg == INVALID_PL_TEMP) {
fprintf(fp_out, "PL Sysmon not available\n\n");
}
else {
fprintf(fp_out, "PL Sysmon not available\n\n");
fprintf(fp_out, "PL temperature : %ld C\t\t %ld C\n\n",(PL_TEMP)/1000,(PL_TEMP_avg)/1000);
}

}
Expand All @@ -1160,11 +1161,11 @@ int print_sysmon_power_info(int verbose_flag, int sample_interval, int sample_wi
fprintf(fp_out, "VTT PS GTR voltage : %ld mV\n\n",VTT_PS_GTR);

fprintf(fp_out, "PL Sysmon\n");
if (PL_TEMP > 0) {
fprintf(fp_out, "PL temperature : %ld C\n\n",(PL_TEMP)/1000);
if (PL_TEMP == INVALID_PL_TEMP) {
fprintf(fp_out, "PL Sysmon not available\n\n");
}
else {
fprintf(fp_out, "PL Sysmon not available\n\n");
fprintf(fp_out, "PL temperature : %ld C\n\n",(PL_TEMP)/1000);
}
}

Expand Down
Loading