Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: jasinlee on December 29, 2012, 05:56:07 PM



Title: FPGA project assistance with old source code
Post by: jasinlee on December 29, 2012, 05:56:07 PM
Where can I locate the function information for the older miners?


Title: Re: FPGA project assistance with old source code
Post by: hardcore-fs on December 31, 2012, 12:40:18 AM
Take a look at  "the seven"'s code

https://github.com/TheSeven/Modular-Python-Bitcoin-Miner

It is fine to get started and it is broken down into manageable sections.


Title: Re: FPGA project assistance with old source code
Post by: jasinlee on December 31, 2012, 03:06:21 AM
Thanks I will poke through it :)


Title: Re: FPGA project assistance with old source code
Post by: Luke-Jr on December 31, 2012, 11:57:02 AM
Where can I locate the function in one of the old miners source code to add interface to fpga processing? Or which mining software is the easiest to use as reference design (learning purposes)?
BFGMiner (https://github.com/luke-jr/bfgminer)'s device API is pretty straightforward.


Title: Re: FPGA project assistance with old source code
Post by: hardcore-fs on January 01, 2013, 02:33:33 AM
I am just having trouble finding the spot in the source where you choose the implementation.

Exactly WHICH source are you talking about?


Title: Re: FPGA project assistance with old source code
Post by: purelithium on January 01, 2013, 02:53:53 AM
I dunno, kano, I prefer BFGMiner. I find your need for attention to be off-putting. Luke was just trying to give a community member something to look at for his project and you turned it into a ridiculous trainwreck of a thread. Stop trolling and live your life.


Title: Re: FPGA project assistance with old source code
Post by: jasinlee on January 01, 2013, 03:56:32 AM
lol


Title: Re: FPGA project assistance with old source code
Post by: K1773R on January 01, 2013, 04:03:18 AM
Time out: Can anyone point me to the section of code I am looking for on ANY of the miners so I dont have to reverse engineer the whole thing?
just take a look at FPGA miners, cgminer or BTCMiner(http://www.ztex.de/btcminer/) for example.


Title: Re: FPGA project assistance with old source code
Post by: Luke-Jr on January 01, 2013, 04:31:22 AM
Time out: Can anyone point me to the section of code I am looking for on ANY of the miners so I dont have to reverse engineer the whole thing?
https://github.com/luke-jr/bfgminer/blob/bfgminer/miner.c#L7889 is where the device detection is called from... not really sure what you're looking for.


Title: Re: FPGA project assistance with old source code
Post by: jasinlee on January 01, 2013, 04:37:17 AM
Thank you much! Learning as I go, so just needed info.


Title: Re: FPGA project assistance with old source code
Post by: K1773R on January 01, 2013, 04:38:36 AM
Time out: Can anyone point me to the section of code I am looking for on ANY of the miners so I dont have to reverse engineer the whole thing?
https://github.com/luke-jr/bfgminer/blob/bfgminer/miner.c#L7889 is where the device detection is called from... not really sure what you're looking for.
same as cgminer, same story again, so bad/sad  ::)


Title: Re: FPGA project assistance with old source code
Post by: kano on January 01, 2013, 04:43:37 AM
Time out: Can anyone point me to the section of code I am looking for on ANY of the miners so I dont have to reverse engineer the whole thing?
What you need to know are a few things, e.g.
1) What the commands and or data requirements are to talk to the FPGA (often called the protocol)
2) The libraries to use to talk to the FPGA (USB or the crappy serial-USB ... or some other)

Each of the driver-*.c files in cgminer will include the commands to talk to each FPGA.
In my case I've named them rather than just put random short strings splattered about in each one.
e.g. look at the top of the driver-modminer.c code where I put them.

cgminer is moving to only using libusb to talk to FPGAs
(I've completed MMQ, and have BFL working but want to do more testing)

The old code uses serial-USB which will be problematic for ASICs so I've been rewriting it all to spend the effort to find some of the problems involved and solve them before the ASICs turn up.


Title: Re: FPGA project assistance with old source code
Post by: hardcore-fs on January 03, 2013, 01:16:38 AM
Time out: Can anyone point me to the section of code I am looking for on ANY of the miners so I dont have to reverse engineer the whole thing?
What you need to know are a few things, e.g.
1) What the commands and or data requirements are to talk to the FPGA (often called the protocol)
2) The libraries to use to talk to the FPGA (USB or the crappy serial-USB ... or some other)

Each of the driver-*.c files in cgminer will include the commands to talk to each FPGA.
In my case I've named them rather than just put random short strings splattered about in each one.
e.g. look at the top of the driver-modminer.c code where I put them.

cgminer is moving to only using libusb to talk to FPGAs
(I've completed MMQ, and have BFL working but want to do more testing)

The old code uses serial-USB which will be problematic for ASICs so I've been rewriting it all to spend the effort to find some of the problems involved and solve them before the ASICs turn up.

I have to say Kano, I was looking at porting cgminer to an arm linux 2.9x-3.x platform and found it bloody confusing......
 ESP. as regards the dependancies.
The only requirements  would be Serial & usb, its not like I'd need CPU or GPU mining on an arm development board.