Pages:
Author

Topic: Official Open Source FPGA Bitcoin Miner (Last Update: April 14th, 2013) - page 24. (Read 432891 times)

newbie
Activity: 54
Merit: 0
OK, I'm now mining on an Altera FPGA with poclbm. (Well, some heavily hacked-together Python code based on poclbm to be exact.) You can find the code in question on Git here but it's a bit of a pain to use right now; you have to create a new BSDL directory, obtain the BSDL file for the FPGA you're using and copy it to the directory, edit the source to use the correct directory, and then run it and hope it finds the correct USB Blaster and works. Oh, and it needs UrJTAG installed.

In theory this means that you can now mine using fpgaminer's code for Altera FPGAs that communicates over JTAG without having any Altera software installed. (It also has long polling support obviously.)

Edit: Now has a bsdl/ directory in the source tree to place the bsdl files in.

Uhh, why?Huh

I guess there is some appeal to not needing the FPGA software, but JTAG is ungodly slow.  It's not an appropriate means of communication between a mining host and the FPGA at all.  I don't think this idea is wise nor useful (except to save the step of FPGA programming I guess).
inh
full member
Activity: 155
Merit: 100
Mining through JTAG is pretty sweet Smiley

Would any of you mind breaking down exactly what data is fed to the FPGA for number crunching? I've seen the wiki that says what goes in to a block header hash but I still have no idea what work a pool/bitcoind instance hands out after a getwork request.
hero member
Activity: 686
Merit: 564
My god makomk, how did you work out how to talk to altsource_probes? Debug the protocol? I will certainly be reading over that code today  Grin Fantastic work.
Via somewhat dubious methods that I'm really hoping won't get me in trouble with Altera legal - you might want to hold off on that. It's actually an incredibly straightforward bit of functionality on top of the rather hairier - but documented - virtual JTAG layer. Thankfully someone else had already written code for talking to UrJTAG and enumerating virtual JTAG nodes, even if they did foolishly believe the documentation (which someone else had fortunately already discovered was wrong.)

I'll have to see if Altera provides something similar to BSCAN_SPARTAN6, though, which should make the whole thing a lot easier.
I don't think they do. According to the virtual JTAG documentation, their approach is really complicated and involves duplicating the entire JTAG state machine in LUTs using code that we don't have access to at a low enough level.

Edit: The closest equivalent is their virtual JTAG layer; you should be able to do pretty much all of the same things with that as you can with BSCAN_SPARTAN6, but talking to it involves most of the same complications as talking to altsource_probes. At least virtual JTAG is documented I guess.

Only problem with the UrJTAG Python code is that pexpect is UNIX specific. There's a Windows port called wexpect I have been playing with. Its project on Google Code is inaccessible at the moment, for reasons unknown. The random wexpect.py file I found lying around some dusty corner of the internet works, but has a few bugs I had to work around.

It's a real shame. UrJTAG is a nice program. Perhaps it would be worthwhile to write a SWIG based wrapper around all of its (apparently undocumented) C API.
I didn't notice that issue...
hero member
Activity: 560
Merit: 517
My god makomk, how did you work out how to talk to altsource_probes? Debug the protocol? I will certainly be reading over that code today  Grin Fantastic work. I'll have to see if Altera provides something similar to BSCAN_SPARTAN6, though, which should make the whole thing a lot easier.

Only problem with the UrJTAG Python code is that pexpect is UNIX specific. There's a Windows port called wexpect I have been playing with. Its project on Google Code is inaccessible at the moment, for reasons unknown. The random wexpect.py file I found lying around some dusty corner of the internet works, but has a few bugs I had to work around.

It's a real shame. UrJTAG is a nice program. Perhaps it would be worthwhile to write a SWIG based wrapper around all of its (apparently undocumented) C API.
hero member
Activity: 686
Merit: 564
OK, I'm now mining on an Altera FPGA with poclbm. (Well, some heavily hacked-together Python code based on poclbm to be exact.) You can find the code in question on Git here but it's a bit of a pain to use right now; you have to create a new BSDL directory, obtain the BSDL file for the FPGA you're using and copy it to the directory, edit the source to use the correct directory, and then run it and hope it finds the correct USB Blaster and works. Oh, and it needs UrJTAG installed.

In theory this means that you can now mine using fpgaminer's code for Altera FPGAs that communicates over JTAG without having any Altera software installed. (It also has long polling support obviously.)

Edit: Now has a bsdl/ directory in the source tree to place the bsdl files in.
hero member
Activity: 686
Merit: 564
I take exception to that! Especially if you get the dual FPGA board, it's quite a bit cheaper than any commercial dev board. I mean, you get two Spartan 6 LX150's for the same price as a dev board with just one
I have to admit that the dual FPGA board is looking rather better price-wise.

Even if you get the single FPGA board, it's about 2/3 the cost of any commercial dev board
Presumably it has less flexibility too, though I'm not sure precisely what you're planning...

(Edit: On an unrelated note, #*!$ing Altera and their undocumented altsource_probe JTAG protocol...

Edit 2, hours later: Here, have a incredibly ugly Python hack to speak to FPGAs running fpgaminer's virtual_wire-based code over USB Blaster. It won't bite much.)

full member
Activity: 210
Merit: 100
Quote
Yeah, they're not actually that much cheaper than the equivalent full dev boards

I take exception to that! Especially if you get the dual FPGA board, it's quite a bit cheaper than any commercial dev board. I mean, you get two Spartan 6 LX150's for the same price as a dev board with just one

Even if you get the single FPGA board, it's about 2/3 the cost of any commercial dev board
hero member
Activity: 686
Merit: 564
That is very misleading.  That is only a pre-order.  These boards won't be available for at least a month or so yet, and the price IIRC is around $400.
Yeah, they're not actually that much cheaper than the equivalent full dev boards and your ability to develop other stuff for them is vey constrained.

I'd suggest buying a DE0-nano if it wasn't for the fact that they've cheaped out on the power circuitry to the point it's very difficult to get reliable mining at any speed, let alone max the chip out. If they'd used more efficient power regulation circuitry it ought to top out at about 25 MHash/sec, probably even with just USB power, which isn't bad for the price.
newbie
Activity: 54
Merit: 0
check cablesaurus.com they have a pre order going for fpga miner boards that do 100-200 mh/s for cheaper than most dev fpgas.

That is very misleading.  That is only a pre-order.  These boards won't be available for at least a month or so yet, and the price IIRC is around $400.
hero member
Activity: 556
Merit: 500
Guys, I would like to buy a fpga board for testing and learning the fpga basics.
Do you think this will be ok ?
http://www.ebay.com/itm/Spartan-6-LX25-FPGA-Board-USB-2-0-64MB-RAM-XC6SLX25-/270790142932?pt=LH_DefaultDomain_0&hash=item3f0c59abd4#ht_3103wt_952

What hash rate would I get from it?
Will your miner work with this chip (XC6SLX25)?
Will I run it via usb or jtag ?

Off topic:
http://www.xilinx.com/publications/prod_mktg/Spartan6_Product_Table.pdf

Thanks !



check cablesaurus.com they have a pre order going for fpga miner boards that do 100-200 mh/s for cheaper than most dev fpgas.
Crs
member
Activity: 107
Merit: 10
Guys, I would like to buy a fpga board for testing and learning the fpga basics.
Do you think this will be ok ?
http://www.ebay.com/itm/Spartan-6-LX25-FPGA-Board-USB-2-0-64MB-RAM-XC6SLX25-/270790142932?pt=LH_DefaultDomain_0&hash=item3f0c59abd4#ht_3103wt_952

What hash rate would I get from it?
Will your miner work with this chip (XC6SLX25)?
Will I run it via usb or jtag ?

Off topic:
http://www.xilinx.com/publications/prod_mktg/Spartan6_Product_Table.pdf

Thanks !

hero member
Activity: 720
Merit: 525
I don't know if there's any interest in it, but I created a wiki at fpgamining.com. It might be a good place for gathering documentation about your development here. Feel free to make use of it!
inh
full member
Activity: 155
Merit: 100
Could improvements on LUT usage (or routing, or both?) be made based on which pins were being used for IO? I'd imagine if the pin was physically far from where the end of the logic was, it would make routing harder. Shorter paths == happier routing? Just a thought.
rph
full member
Activity: 176
Merit: 100
For anyone who has run this design on the LX9 microboard, what sort of hashrate did you get? And how many slices were used (and at what unrolling level?).

200MHz
5034 FF [44%]
3247 LUT6 [56%]
0 BRAM
0 DSP48A1
3.125MH/s

in xc6slx9-2. It finishes 1 SHA256(SHA256(x)) every 64 clocks.
With a few tricks it could probably fit 2 engines, for 6.25 MH/s total.

Not exactly going to beat an ATI GPU, but it's a fun toy.  Grin

-rph
rph
full member
Activity: 176
Merit: 100
You want 3-input adders on 6 series Spartans, not 2-input. And yes, of course you can reduce the critical path to a single adder, but it requires an immense quantity of registers.

On S3E I've had slightly better results with 2-input (reaching 200MHz comfortably in -5).
The SRL16s implement multi-stage delays really efficiently.

My strategy is to optimize for area until it's clear that I can't possibly fit another engine,
then optimize for speed until the device is full.

-rph
legendary
Activity: 1260
Merit: 1000
Drunk Posts
Has anyone looked into the Achronix Speedster22i FPGA?

700k LUTs (I assume are the same as logic-cells) at 1.5GHz for the 22i-HP

I can't find much about pricing, only one article mentions it, but

Pricing for a 1M LUT Speedster22i-HD will be under $400.
http://electronicdesign.com/article/digital/Speedy-22nm-FPGA-Packs-PicoPIPEs.aspx

Edit: Heres another one,

Pricing for the Speedster starts at $200. The SPD60 will be the first one available. A development kit provides access to the platform.
http://electronicdesign.com/article/digital/1-5-ghz-fpga-takes-clock-gating-to-the-max19952.aspx
newbie
Activity: 18
Merit: 0
For anyone who has run this design on the LX9 microboard, what sort of hashrate did you get? And how many slices were used (and at what unrolling level?).

Thanks,
-- vs
hero member
Activity: 560
Merit: 517
Quote
There are ways to get the critical path down to a single 2-input 32 bit adder.
If you think carefully about what you're building.
You want 3-input adders on 6 series Spartans, not 2-input. And yes, of course you can reduce the critical path to a single adder, but it requires an immense quantity of registers.

And before you suggest it, don't tell me to run the FPGA faster to avoid extra pipeline registers Tongue. Spartan-6 isn't designed to run faster than ~250MHz. The memory doesn't run faster than that, and I think even the DSPs top out at that level.
full member
Activity: 210
Merit: 100
I sure hope you're right!
rph
full member
Activity: 176
Merit: 100
There are ways to get the critical path down to a single 2-input 32 bit adder.
If you think carefully about what you're building.

-rph
Pages:
Jump to: