Author

Topic: FPGA project assistance with old source code (Read 3030 times)

full member
Activity: 196
Merit: 100
January 02, 2013, 09:16:38 PM
#13
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.

legendary
Activity: 4466
Merit: 1798
Linux since 1997 RedHat 4
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.
legendary
Activity: 1792
Merit: 1008
/dev/null
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  Roll Eyes
hero member
Activity: 742
Merit: 500
Its as easy as 0, 1, 1, 2, 3
Thank you much! Learning as I go, so just needed info.
legendary
Activity: 2576
Merit: 1186
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.
legendary
Activity: 1792
Merit: 1008
/dev/null
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.
hero member
Activity: 742
Merit: 500
Its as easy as 0, 1, 1, 2, 3
December 31, 2012, 11:56:32 PM
#7
lol
hero member
Activity: 504
Merit: 500
December 31, 2012, 10:53:53 PM
#6
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.
full member
Activity: 196
Merit: 100
December 31, 2012, 10:33:33 PM
#5
I am just having trouble finding the spot in the source where you choose the implementation.

Exactly WHICH source are you talking about?
legendary
Activity: 2576
Merit: 1186
December 31, 2012, 07:57:02 AM
#4
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's device API is pretty straightforward.
hero member
Activity: 742
Merit: 500
Its as easy as 0, 1, 1, 2, 3
December 30, 2012, 11:06:21 PM
#3
Thanks I will poke through it Smiley
full member
Activity: 196
Merit: 100
December 30, 2012, 08:40:18 PM
#2
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.
hero member
Activity: 742
Merit: 500
Its as easy as 0, 1, 1, 2, 3
December 29, 2012, 01:56:07 PM
#1
Where can I locate the function information for the older miners?
Jump to: