mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-12 06:02:01 +00:00
Perform remainder of hashfast_detect_common setup.
This commit is contained in:
parent
cbfa78eae4
commit
93d1f93fdd
@ -303,12 +303,24 @@ static bool hashfast_detect_common(struct cgpu_info *hashfast)
|
|||||||
ret = hashfast_reset(hashfast, info);
|
ret = hashfast_reset(hashfast, info);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
free(info);
|
free(info);
|
||||||
|
hashfast->device_data = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The per-die status array
|
||||||
|
info->die_status = calloc(info->asic_count, sizeof(struct hf_g1_die_data));
|
||||||
|
if (unlikely(!(info->die_status)))
|
||||||
|
quit(1, "Failed to calloc die_status");
|
||||||
|
|
||||||
|
// The per-die statistics array
|
||||||
|
info->die_statistics = calloc(info->asic_count, sizeof(struct hf_long_statistics));
|
||||||
|
if (unlikely(!(info->die_statistics)))
|
||||||
|
quit(1, "Failed to calloc die_statistics");
|
||||||
|
|
||||||
info->works = calloc(sizeof(struct work *), HF_NUM_SEQUENCE);
|
info->works = calloc(sizeof(struct work *), HF_NUM_SEQUENCE);
|
||||||
if (!info->works)
|
if (!info->works)
|
||||||
quit(1, "Failed to calloc info works in hashfast_detect_common");
|
quit(1, "Failed to calloc info works in hashfast_detect_common");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,17 @@
|
|||||||
#define HASHFAST_MINER_THREADS 1
|
#define HASHFAST_MINER_THREADS 1
|
||||||
#define HF_NUM_SEQUENCE 256
|
#define HF_NUM_SEQUENCE 256
|
||||||
|
|
||||||
|
// Matching fields for hf_statistics, but large #'s for local accumulation, per-die
|
||||||
|
struct hf_long_statistics {
|
||||||
|
uint64_t rx_header_crc; // Header CRC's
|
||||||
|
uint64_t rx_body_crc; // Data CRC's
|
||||||
|
uint64_t rx_header_timeouts; // Header timeouts
|
||||||
|
uint64_t rx_body_timeouts; // Data timeouts
|
||||||
|
uint64_t core_nonce_fifo_full; // Core nonce Q overrun events
|
||||||
|
uint64_t array_nonce_fifo_full; // System nonce Q overrun events
|
||||||
|
uint64_t stats_overrun; // Overrun in statistics reporting
|
||||||
|
} __attribute__((packed,aligned(4)));
|
||||||
|
|
||||||
struct hashfast_info {
|
struct hashfast_info {
|
||||||
int asic_count; // # of chips in the chain
|
int asic_count; // # of chips in the chain
|
||||||
int core_count; // # of cores per chip
|
int core_count; // # of cores per chip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user