SHMAC User's Manual - skordal/tdt4900-master GitHub Wiki

The SHMAC User's Guide

This is a simple guide to how to synthesize the SHMAC hardware, compiling the bitcoin miner software and running the whole thing on a Versatile Express box.

Synthesizing, Implementing and Booting

Check out the SHMAC source code from the Mercurial repository. Switch to the bitcoin branch (if it exists) or the skordal branch if it doesn't. Enter the hardware/ directory and run

make shmac_ve.bit

A long while later, a file called shmac_ve.bit will be created in your directory. Copy this to the Versatile Express box and place it into /fpga/SITE2/HBI0247C/shmac. Then reboot the thing, sudo reboot. 5 to 10 minutes later (it's a pretty slow machine) it will be ready.

Compiling the bitcoin miner

Make sure you have an arm-none-eabi compiler. If you don't, and you are connected to moog, add /home/kskordal/arm-toolchain/bin to your PATH, with

export PATH=/home/kskordal/arm-toolchain/bin:$PATH

Then, cd into the bitcoin-software directory and type

make

Yay, it worked! Or not, in which case you will have to fix it.

Transfer the bitcoin.bin file to the Versatile Express box if it worked.

Programming SHMAC

First, place SHMAC into reset,

shmac_reset on

Then, program the bitcoin programme into SHMAC memory using

shmac_program 0 bitcoin.bin

Now, before releasing SHMAC from reset, start minicom (in another terminal window or tab) so you can see (and possibly also interact with) the bitcoin miner's serial interface:

sudo minicom -D /dev/ttySHMAC0

Set minicom to 9600 baud using CTRL+A then P the C. Then exit the menus.

Now you can release SHMAC from reset. If you didn't open minicom in another window or tab, you can now regret it. Release SHMAC from reset with

shmac_reset off

If everything works, you should see text appearing in minicom. If that is the case, rejoice, for it worked! If not, you have some debugging to do...