Browse Source

Add die temperatures and voltages to hashfast api output.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
eb1f54fbf2
  1. 16
      driver-hashfast.c

16
driver-hashfast.c

@ -429,14 +429,14 @@ static void hfa_update_die_status(struct cgpu_info *hashfast, struct hashfast_in @@ -429,14 +429,14 @@ static void hfa_update_die_status(struct cgpu_info *hashfast, struct hashfast_in
// Copy in the data. They're numbered sequentially from the starting point
ds = info->die_status + h->chip_address;
for (i = 0; i < num_included; i++)
memcpy(ds++, d++, sizeof(struct hf_g1_die_data));
memcpy(ds++, d++, sizeof(struct hf_g1_die_data));
for (i = 0, d = &info->die_status[h->chip_address]; i < num_included; i++, d++) {
die_temperature = GN_DIE_TEMPERATURE(d->die.die_temperature);
for (j = 0; j < 6; j++)
core_voltage[j] = GN_CORE_VOLTAGE(d->die.core_voltage[j]);
applog(LOG_DEBUG, "HF%d: die %2d: OP_DIE_STATUS Die temp %.2fC vdd's %.2f %.2f %.2f %.2f %.2f %.2f",
applog(LOG_DEBUG, "HFA %d: die %2d: OP_DIE_STATUS Die temp %.2fC vdd's %.2f %.2f %.2f %.2f %.2f %.2f",
hashfast->device_id, h->chip_address + i, die_temperature,
core_voltage[0], core_voltage[1], core_voltage[2],
core_voltage[3], core_voltage[4], core_voltage[5]);
@ -787,9 +787,19 @@ static struct api_data *hfa_api_stats(struct cgpu_info *cgpu) @@ -787,9 +787,19 @@ static struct api_data *hfa_api_stats(struct cgpu_info *cgpu)
root = api_add_int(root, "max rx buf", &varint, true);
for (i = 0; i < info->asic_count; i++) {
struct hf_long_statistics *l = info->die_statistics + i;
struct hf_long_statistics *l = &info->die_statistics[i];
struct hf_g1_die_data *d = &info->die_status[i];
double die_temp, core_voltage;
int j;
root = api_add_int(root, "Core", &i, true);
die_temp = GN_DIE_TEMPERATURE(d->die.die_temperature);
root = api_add_double(root, "die temperature", &die_temp, true);
for (j = 0; j < 6; j++) {
core_voltage = GN_CORE_VOLTAGE(d->die.core_voltage[j]);
sprintf(buf, "%d: %.2f", j, core_voltage);
root = api_add_string(root, "core voltage", buf, true);
}
root = api_add_uint64(root, "rx header crc", &l->rx_header_crc, false);
root = api_add_uint64(root, "rx body crc", &l->rx_body_crc, false);
root = api_add_uint64(root, "rx header to", &l->rx_header_timeouts, false);

Loading…
Cancel
Save