Update: Preliminary Findings relevant for DIY Designs
What were the hidden features, which you managed to reverse engineer?
Well, it was more an inspect-and-guess than a reverse-engineering
- outcome is already included in the driver and described below.
Getting and building the A1 driver branchI was approached by users having problems accessing the driver sources, since I wrongly assumed everybody is used to work with git. Here are the steps required to get and build the A1 SPI driver on a Linux host:
# 1) checkout our repository
git clone https://github.com/bitmine-ch/cgminer.git
# 2) in cgminer/ switch to our branch
cd cgminer
git checkout -t origin/bitmine-A1-scratchpad
# 3) run autogen and make
./autogen.sh --enable-bitmine_A1
make
Known limitationsThis is what I got from the FPGA emulator and therefore preliminary, but assuming the chip behaves the same, it is essential for HW designs out there: the
BIST_START command that runs the auto-addressing process and enumerates the chips in a chain seems to work only once after chip reset. In subsequent calls it returns zero number of chips. The
RESET command does not help here, therefore to start from a defined state you should
provide means to HW-reset the chip in your design.
Undocumented featuresSome bits in the register[23:8] range (tagged as reserved in section 3 of current spec doc) seem to have the following functionality:
register[17]: 2nd job active - if 0, host can feed another job to input queue
register[16]: 1st job active - if 0, chip is job-less and not hashing any more
register[15:12]: job_id of 2nd input item
register[11:8]: job_id of 1st input itemAgain, these are preliminary assumptions that need to be confirmed by chip designing company. But since this bits are used in the current driver to greatly improve the feeding of input queues, assume them to be final.
These updates will be added to the chip specification document as soon as we double-check with real chips and get confirmation from chip manufacturer - which I expect to happen by end of this week.
Partitioning chip chainAs you can read from the driver sources, the working units visible to cgminer are chip-chains. Instead of having long chains exposed to the risk of a single chip bricking the chain, Bitmine follows a modular concept with one STM32F1x controlling sub-chains on its SPI interfaces and transparently behaving like a chip-chain to the host as SPI-slave. I started working on this FW, which will be made open source as soon as it passes testing. If you are following the same concept with your design and are interested in working together on the SW side, please PM me.
That's for this year. I have some feeling that next year will be a good one for the DIY scene.
Cheers,
zefir