titan-asic.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __TITAN_ASIC_H
  2. #define __TITAN_ASIC_H
  3. #include "knc-asic.h"
  4. #include "knc-transport.h"
  5. #define KNC_TITAN_MAX_ASICS 6
  6. #define KNC_TITAN_DIES_PER_ASIC 4
  7. #define KNC_TITAN_CORES_PER_DIE 571
  8. #define KNC_TITAN_CORES_PER_ASIC (KNC_TITAN_CORES_PER_DIE * KNC_TITAN_DIES_PER_ASIC)
  9. #define KNC_TITAN_WORKSLOTS_PER_CORE 2
  10. #define KNC_TITAN_THREADS_PER_CORE 8
  11. #define KNC_TITAN_NONCES_PER_REPORT 5
  12. struct nonce_report {
  13. uint32_t nonce;
  14. uint8_t slot;
  15. };
  16. struct titan_setup_core_params {
  17. uint16_t bad_address_mask[2];
  18. uint16_t bad_address_match[2];
  19. uint8_t difficulty;
  20. uint8_t thread_enable;
  21. uint16_t thread_base_address[KNC_TITAN_THREADS_PER_CORE];
  22. uint16_t lookup_gap_mask[KNC_TITAN_THREADS_PER_CORE];
  23. uint16_t N_mask[KNC_TITAN_THREADS_PER_CORE];
  24. uint8_t N_shift[KNC_TITAN_THREADS_PER_CORE];
  25. uint32_t nonce_top;
  26. uint32_t nonce_bottom;
  27. };
  28. bool knc_titan_get_info(const char *repr, void * const ctx, int channel, int die, struct knc_die_info *die_info);
  29. bool knc_titan_set_work(const char *repr, void * const ctx, int channel, int die, int core, int slot, struct work *work, bool urgent, bool *work_accepted, struct knc_report *report);
  30. bool knc_titan_get_report(const char *repr, void * const ctx, int channel, int die, int core, struct knc_report *report);
  31. bool knc_titan_setup_core(const char *repr, void * const ctx, int channel, int die, int core, struct titan_setup_core_params *params);
  32. #endif /* __TITAN_ASIC_H */