Pages:
Author

Topic: Modular FPGA Miner Hardware Design Development - page 24. (Read 119276 times)

member
Activity: 70
Merit: 10
[...] I own an LX150 dev kit, and the necessary license to do compiles for it, so as long as the license allows me to distribute bitstreams everything should be fine. At the very least I can verify designs until someone is confident enough to fork out the cash for their own license.

Is that for an LX150 or for an LX150T? The cheapest devkit I found (AES-S6DEV-LX150T-G) seems to have the software device-locked for the LX150T. The price-difference between the chips at digikey is a bit over 17EUR, and just under 16EUR at avnet.
hero member
Activity: 560
Merit: 517
I go away for a few days and you guys make me read 5 more pages  Angry  Tongue

I am confirming makomk's work with the EP4CE75F23C7 chips ($227.46 USD); I just compiled his fully unrolled design and it fit into 73,400 LEs at the correct Fmax performance. That is with a JTAG interface, and 2K extra LEs for interface changes. JTAG is fairly area inefficient, so there is plenty of room for alternative interfaces like I2C or SPI. Personally I think the FPGA needs a small work queue anyway, regardless of the interface.

I will attempt a compile for the EP4CE75F23C8N ($181.97 USD) and EP4CGX150CF23C8N ($295.60 USD) some time later. I will probably run the 150 overnight, because I am sure that compile will take a very long time.

Quote
I'm sure that someone in the community would love to set up such a service, where you upload your design, get back the bitstream a couple of hours later if it succeeded, and pay per processing time.
I would be happy to compile FPGA mining designs for this platform, and others that people create. Luckily I have an extra machine to do the compiles on  Grin I own an LX150 dev kit, and the necessary license to do compiles for it, so as long as the license allows me to distribute bitstreams everything should be fine. At the very least I can verify designs until someone is confident enough to fork out the cash for their own license.
hero member
Activity: 720
Merit: 525
I'm finally out of the newbie purgatory, so I wanted to mention that I'm following this thread closely. I use FPGAs for medical imaging systems (also use GPUs for image reconstruction) so the applications in Bitcoin mining make for an interesting hobby for me. I'd like to contribute to this project if I can in any way.
legendary
Activity: 1270
Merit: 1000
Its common and good  practice to lay out the power (and ground) traces in a tree like fashion with the root at the output of the voltage regulator output so the RF ripple of large power drains doesnt affect the other devices. Having massive polygons is the right way, but if you have to to lay out some other traces this would make holes into this polygon. While the impact on the resistance will be low, i don't know if it's still true for the impendance. While learning by doing isn't a  bad idea, the cost per miss are substanaly in this case.

member
Activity: 70
Merit: 10
They may not be specified for 12V, because nobody in the memory industry would ever want to do that, but I'd expect them to be able to withstand 12V perfectly well. Some extra precautions (all 12V pins on one end, ending on a key, or something similar) can't hurt though.

But this would require massive power traces on the DIMM to the Voltage regulators, and massive power traces to the Vint Pins and the ground traces should be largish too ...

How is this related to putting the 12V on one side of the board? You have the same issue for the on-DIMM connectors. As for power traces: the 12V traces shouldn't be so bad (only a 10th of the current relative to Vint). And the Vint supply should probably be done as a large supply polygon, same as GND.
legendary
Activity: 1270
Merit: 1000
They may not be specified for 12V, because nobody in the memory industry would ever want to do that, but I'd expect them to be able to withstand 12V perfectly well. Some extra precautions (all 12V pins on one end, ending on a key, or something similar) can't hurt though.

But this would require massive power traces on the DIMM to the Voltage regulators, and massive power traces to the Vint Pins and the ground traces should be largish too ...
member
Activity: 70
Merit: 10
[...] there is a ton of free software to use the FT2232D as a JTAG interface. There seems to be little to none that uses the FT2232H, though. We couldn't use existing JTAG software with the FT2232H. [...]
You sure about that? I know off-hand that at least the Dangerous Prototypes Bus Blaster uses the FT2232H, and it can be wired up to act as one of several common JTAG interfaces.

Didn't know what chip they used. I just found a lot of hits for the FT2232D when I searched for JTAG adapters and none for the FT2232H. The "little to none" in my second sentence was more a "(little to) none". Seems I was too hasty. And the third sentence is then clearly wrong.
hero member
Activity: 686
Merit: 564
The reason why I reneged on my original suggestion of using the FT2232H: there is a ton of free software to use the FT2232D as a JTAG interface. There seems to be little to none that uses the FT2232H, though. We couldn't use existing JTAG software with the FT2232H. At that time, other protocols in addition to JTAG were only being discussed as a way to read out the EEPROM, and I figured that could be done by bitbanging. But if you want to send workloads to the FPGA via I2C, then a dedicated MPSSE seems in order.
You sure about that? I know off-hand that at least the Dangerous Prototypes Bus Blaster uses the FT2232H, and it can be wired up to act as one of several common JTAG interfaces.
hero member
Activity: 504
Merit: 500
FPGA Mining LLC
[...]
I was under the impression that the use of DIMM sockets for power distribution wouldn't work well and that power connectors on each card are going to be used. Unless "power distribution" means power distribution for interface logic in this context.

No, you can nominally put 1A through each of the 240 pins of the thing. Even leaving a 50% safety margin, this equates to 720W per DIMM at 12V, which should be more than enough Smiley. I calculated only 120 pins because you need the same number for GND return. And with 720W provided and 10W needed, I think we can spare a few pins for other unnecessary things like communication and such...

Nevertheless, routing that much current on the PCB won't be trivial. You would basically have to place five 8-pin PCIe power connectors around the slot!

I'd say that a DIMM may draw up to 35 watts from the backplane. This should be sufficient for all 2-FPGA and some 4-FPGA cards. If a card needs more, it should use dedicated Molex/PCIe connectors. This allows for 2-card backplanes with just an ATX20 connector, 4-card with ATX24, or up to 7 cards with ATX20 + P4, up to 9 cards with ATX24 + P4, or up to 13 cards with ATX24 + EPS12V.

Are these DIMMS going to be keyed such that any memory chips placed in them won't get fried?

No. It would be nice to be able to do so, after all there are many different key positions. The problem is finding sockets that support a key position that is not used by a memory DIMM. So you are basically limited to the sizes given e.g. in this Micron TN-04-55. As for pinout: a memory DIMM has not a single pin that can stand 12-20V.

They may not be specified for 12V, because nobody in the memory industry would ever want to do that, but I'd expect them to be able to withstand 12V perfectly well. Some extra precautions (all 12V pins on one end, ending on a key, or something similar) can't hurt though.
member
Activity: 70
Merit: 10
[...]
I was under the impression that the use of DIMM sockets for power distribution wouldn't work well and that power connectors on each card are going to be used. Unless "power distribution" means power distribution for interface logic in this context.

No, you can nominally put 1A through each of the 240 pins of the thing. Even leaving a 50% safety margin, this equates to 720W per DIMM at 12V, which should be more than enough Smiley. I calculated only 120 pins because you need the same number for GND return. And with 720W provided and 10W needed, I think we can spare a few pins for other unnecessary things like communication and such...

Are these DIMMS going to be keyed such that any memory chips placed in them won't get fried?

No. It would be nice to be able to do so, after all there are many different key positions. The problem is finding sockets that support a key position that is not used by a memory DIMM. So you are basically limited to the sizes given e.g. in this Micron TN-04-55. As for pinout: a memory DIMM has not a single pin that can stand 12-20V.
legendary
Activity: 1270
Merit: 1000
I was under the impression that the use of DIMM sockets for power distribution wouldn't work well and that power connectors on each card are going to be used. Unless "power distribution" means power distribution for interface logic in this context.

Are these DIMMS going to be keyed such that any memory chips placed in them won't get fried?

This would be quite  cost demanding, since the 'normal' or even server DIMM-sockets are produced in bulk quantities and much cheaper. The dimm-pc concept solves this by placing the power and ground pins so that in a normal board  VCC and GND will be shorted and a good  power supply would detect this and will shut off.
legendary
Activity: 1008
Merit: 1001
Let the chips fall where they may.
I would expose the I2C, JTAG and USB interfaces on the DIMM, so that the backplane can decide which one it wants to use. Right now we'll probably go for USB-only, which greatly simplifies backplane complexity and cost (the backplane is basically just a USB hub with DIMM sockets and power distribution), but more intelligent backplanes (which might be designed later) might have a processor that talks I2C and JTAG natively, so there's no reason to add the USB overhead there.

I was under the impression that the use of DIMM sockets for power distribution wouldn't work well and that power connectors on each card are going to be used. Unless "power distribution" means power distribution for interface logic in this context.

Are these DIMMS going to be keyed such that any memory chips placed in them won't get fried?
member
Activity: 70
Merit: 10
[...]
Is there a sane way to drive 127 SPI slaves through an FTDI?

For the FT2232D: while you also have a JTAG interface, you cannot do this efficiently. There is only one MPSSE (generic serial engine) on there, and that is used up for JTAG. So I2C would have to be done by bitbanging GPIOs.

For the FT2232H: this has two MPSSEs, so you can have both an efficient I2C and JTAG bus.

The reason why I reneged on my original suggestion of using the FT2232H: there is a ton of free software to use the FT2232D as a JTAG interface. There seems to be little to none that uses the FT2232H, though. We couldn't use existing JTAG software with the FT2232H. At that time, other protocols in addition to JTAG were only being discussed as a way to read out the EEPROM, and I figured that could be done by bitbanging. But if you want to send workloads to the FPGA via I2C, then a dedicated MPSSE seems in order.
hero member
Activity: 504
Merit: 500
FPGA Mining LLC
Of course you are right that every  spi slave needs an CE input, but on the polling host side, this could be solved with a lvttl 4:16 decoder that would be enough for 15 chips plus one 'no chip' selected. But with I2C you would have to implement 7 pins for the  FPGA adress, and have to think over mixed schemes with Dimm cards containing 1,2 ... 4 Chips, and some pins routed through to the dimm connector which would provide additional address select pins. Of course you could provide separate bitstream files for every FPGA in your box. I would consider this a bad idea, except you have a commercial license with incremental compilation or find a way to manipulate the bitstream.

Ok, writing this - there is a possibility to have a preset register that could be configured via jtag but there could be some other pitfalls with that, maybe for INT pin assignment or so.

And as you write, I2C is multimaster via a  open collector bus. Maybe you could  calculate the capacitive load of a system and if this will work out. If yes, you should calculate a second time, there is  also a 11 bit  adressing scheme in I2C but ... i would not recomment I2C.

That's why I was talking about one I2C bus per card. I'm fairly sure that the bus can handle quite a bunch of FPGAs on one card, at that couple of kilohertz the capacitive load isn't all that critical.

The address selection issue is fairly easy to solve as well: Just have 7 address selection pins on each FPGA, with appropriate Vcc/GND connections on the PCB, so that the FPGA position on the board determines its address.
The EEPROM on each card will have the same address on all boards anyway, so doing this for the FPGAs as well shouldn't hurt.

Feel free to come up with something better, but SPI currently doesn't seem to be much better to me.
Is there a sane way to drive 127 SPI slaves through an FTDI?
legendary
Activity: 1270
Merit: 1000
Of course you are right that every  spi slave needs an CE input, but on the polling host side, this could be solved with a lvttl 4:16 decoder that would be enough for 15 chips plus one 'no chip' selected. But with I2C you would have to implement 7 pins for the  FPGA adress, and have to think over mixed schemes with Dimm cards containing 1,2 ... 4 Chips, and some pins routed through to the dimm connector which would provide additional address select pins. Of course you could provide separate bitstream files for every FPGA in your box. I would consider this a bad idea, except you have a commercial license with incremental compilation or find a way to manipulate the bitstream.

Ok, writing this - there is a possibility to have a preset register that could be configured via jtag but there could be some other pitfalls with that, maybe for INT pin assignment or so.

And as you write, I2C is multimaster via a  open collector bus. Maybe you could  calculate the capacitive load of a system and if this will work out. If yes, you should calculate a second time, there is  also a 11 bit  adressing scheme in I2C but ... i would not recomment I2C.
hero member
Activity: 504
Merit: 500
FPGA Mining LLC
[...]
Each board will need its dedicated I2C bus anyway, so why not have a dedicated JTAG bus as well?

We only need one I2C bus, it just needs to be fragmented into different partitions by a switch. I mentioned one example for such a switch before, the NXP PCA9547PW. The reason why I2C needs to be partitioned is the limited availability of addresses on the bus. That is not a problem for the JTAG bus, though. Logically, you can make it as long as you like. Electrically, you need drivers in the TCK and TMS lines for a design with many chips.

Given that there wasn't more than one I2C bus planned and that no more than one JTAG chain are needed, can you clarify why you think more JTAG chains are needed?

Very long JTAG scan chains won't perform well. Boot up time will be huge, and if you use JTAG for data communication, the overhead will greatly increase on a long scan chain. This probably isn't an issue with like 4 FPGAs in the system, but it is one with 100 FPGAs. While we probably won't build such boards right now, we might want to do this at some point, so I'm just proposing to design the interface in away that allows for separate I2C buses and JTAG chains on each card, as the additional cost will not be an issue.

For the cheap boards, you could just connect to the USB pins via the DIMM connector, and basically just have a hub and power supply on the backplane. The more expensive boards might have an ARM and ethernet.

So not use the JTAG or I2C signals on the bus connector at all, just the USB D+ and D- lines? That is a very interesting idea: it simplifies the design a lot if it works: none of the non-supply signals I mentioned in my last post are needed in that case, as the backplane can detect the presence of a DIMM the "USB" way. So a simple backplane contains wires and a couple of mini-USB connectors? Or it contains a home-grown USB-hub? (I am limiting myself to a cheap backplane in this discussion because the intelligent one with a CPU can be build on top of the cheap design in a second step).

This is basically shifting the interface chip completely on the DIMM, removing (by design, not material cost) the overhead of supporting hybrid DIMMs. Of the different options, it is not the cheapest, but certainly elegant:

  • slave-only DIMMs, USB-chip only on backplane: cheapest, JTAG and I2C on bus
  • hybrid DIMMs, USB-chip only on DIMMs: mid price, simple bus with only USB, but needs hub somewhere
  • hybrid DIMMs, USB-chip both on DIMMs and backplane: most expensive, JTAG and I2C on bus

I would expose the I2C, JTAG and USB interfaces on the DIMM, so that the backplane can decide which one it wants to use. Right now we'll probably go for USB-only, which greatly simplifies backplane complexity and cost (the backplane is basically just a USB hub with DIMM sockets and power distribution), but more intelligent backplanes (which might be designed later) might have a processor that talks I2C and JTAG natively, so there's no reason to add the USB overhead there.

[...]
Oh, and don't forget to add a means for boards to interrupt the backplane, e.g. when a share was found or keyspace was exhausted.

Is that actually needed? I agree that a later backplane that contains a CPU may make good use of the interrupt, but for the USB based devices it is only a question of how much data to transmit: you still need to use polling because USB does not have a direct IRQ. I admit that reading the GPIO value of an FT2232 connected to the IRQ signal is quicker than reading the JTAG chain. But how bad is that for even 10 boards each with 16 FPGAs?

I'm talking about a dedicated IRQ line on each board, that can be triggered by all of the FPGAs. Depending on the number of available GPIOs, we might want to have one IRQ line per FPGA that connects to the FTDI, and or them together to some pin on the DIMM, which the backplane can then use to determine whether the card needs to be polled. While this exposed IRQ pin is probably worthless for a USB-based backplane, it can possibly increase efficiency for more intelligent backplanes, and it adds virtually no cost. We should really design the interface with flexibility and future expansion in mind.

In case you meant adding the USB signals of the hybrid DIMM to the JTAG and I2C bus as a third connection protocol: isn't this getting more complicated than it needs to be? You truly need only the JTAG connection or the USB connection. Adding I2C to JTAG makes sense because it allows you to read the description and serial number data of the DIMM. Adding I2C to USB makes no sense: the USB chip on the DIMM contains the I2C master for the local I2C bus that does not go beyond a single DIMM. The same for JTAG: if there is USB on the backplane connector, what is the point of adding JTAG to it? You would have to pay attention to who drives the individual signals, preventing burning out the interface chips if both try to send data at the same time.

I2C is a multi-master bus, so we can easily expose this one to the DIMM. Level shifters might get a bit complicated though because it has a bidirectional data line. We can possibly get around this by just using 2.5V or 3.3V for the FPGA's I/O bank that the bus is connected to.
For JTAG, I'd hope that the FTDI or whichever chip we'll use has a way to signal it that it should tristate its outputs.
This is a point that will need further investigation.

The bandwith requirement for the hashing is not the point, you need ca. 800 bit! for the data, and receive 32bits , both with severe protocol overhead, this is not the limiting factor i think. but its quite complicated to implement. i am workling on this since i have a card with 2 largish stratix and no documentation, so jtag is probably the easiest way to get the card running. But you have to trace which workload  is running on which fpga and to associate the returning nonce. Unfortunately my jtagd oder quartus_stp tends to produce errors which would render the whole systems workload useless (except you have a persistent database of course).

So i would prefer a serial connection per FPGA or SPI, with SPI as the  more adequate solution. But there is a serial solution that works already.

I2C, well it could be implemented with FPGA too, but i think spi is a better was due to the clock, which omits the need for clock recovery and so on plus the higher speed of spi.

I2C is specified for up to 400 kbit/s, including protocol overhead. I really wouldn't like to go for more than 10% bus utilization on average, to keep latencies low. This means that there should be no more than about 140GH/s per bus, which seems to be a ridiculously high number even for ASICs. So I2C should be suitable for this Smiley
Nevertheless I'd let the backplane choose whether to join the I2C buses of the cards with address space extenders, or whether to use dedicated I2C masters per card. This seems to not need any additional effort.

I don't see how SPI is any better than I2C. It will need a dedicated CE signal for each and every chip, limiting the number of chips per card to less than the 127 limit imposed by I2C (which could be worked around with address space extenders), and its clock recovery works basically the same way as I2Cs. It might be designed for higher clock speeds, but does neither support multiple masters, nor is it really a flexible bus system.
legendary
Activity: 1270
Merit: 1000
The bandwith requirement for the hashing is not the point, you need ca. 800 bit! for the data, and receive 32bits , both with severe protocol overhead, this is not the limiting factor i think. but its quite complicated to implement. i am workling on this since i have a card with 2 largish stratix and no documentation, so jtag is probably the easiest way to get the card running. But you have to trace which workload  is running on which fpga and to associate the returning nonce. Unfortunately my jtagd oder quartus_stp tends to produce errors which would render the whole systems workload useless (except you have a persistent database of course).

So i would prefer a serial connection per FPGA or SPI, with SPI as the  more adequate solution. But there is a serial solution that works already.

I2C, well it could be implemented with FPGA too, but i think spi is a better was due to the clock, which omits the need for clock recovery and so on plus the higher speed of spi.
sr. member
Activity: 410
Merit: 252
Watercooling the world of mining
I hope i could clarify my opinion.

One interesting point for me would also be:

How much bandwith would be needed for a certain Mhash rate and might that become a problem for future faster FPGA's with I2C and JTAG ?

I promise i will read further into the specification of I2C as im not fully aware of its capabilitys yet.
member
Activity: 70
Merit: 10
[...]
  • slave-only DIMMs, USB-chip only on backplane: cheapest, JTAG and I2C on bus
  • hybrid DIMMs, USB-chip only on DIMMs: mid price, simple bus with only USB, but needs hub somewhere
  • hybrid DIMMs, USB-chip both on DIMMs and backplane: most expensive, JTAG and I2C on bus

I would prefere the last of you options as the backplane containing the hub and the DIMM containing the USB and the i2c+jtag.

This would offer the maximum flexebilitiy and i asume the additional hardware cost to be marginal compared to the FPGA and the power supply,

Can you reformulate your first sentence? It doesn't make sense to me. The last option in the above list is not about having a hub on the backplane but a JTAG + I2C bus. The hub is needed for the middle option.

In case you meant adding the USB signals of the hybrid DIMM to the JTAG and I2C bus as a third connection protocol: isn't this getting more complicated than it needs to be? You truly need only the JTAG connection or the USB connection. Adding I2C to JTAG makes sense because it allows you to read the description and serial number data of the DIMM. Adding I2C to USB makes no sense: the USB chip on the DIMM contains the I2C master for the local I2C bus that does not go beyond a single DIMM. The same for JTAG: if there is USB on the backplane connector, what is the point of adding JTAG to it? You would have to pay attention to who drives the individual signals, preventing burning out the interface chips if both try to send data at the same time.
sr. member
Activity: 410
Merit: 252
Watercooling the world of mining
While the poll for which FPGA to use is running, we can already decide on the specifics of the DIMM connector.
Thanks to you Olaf for starting the further disscussion in my case. Smiley


For the cheap boards, you could just connect to the USB pins via the DIMM connector, and basically just have a hub and power supply on the backplane. The more expensive boards might have an ARM and ethernet.

So not use the JTAG or I2C signals on the bus connector at all, just the USB D+ and D- lines? That is a very interesting idea: it simplifies the design a lot if it works: none of the non-supply signals I mentioned in my last post are needed in that case, as the backplane can detect the presence of a DIMM the "USB" way. So a simple backplane contains wires and a couple of mini-USB connectors? Or it contains a home-grown USB-hub? (I am limiting myself to a cheap backplane in this discussion because the intelligent one with a CPU can be build on top of the cheap design in a second step).

This is basically shifting the interface chip completely on the DIMM, removing (by design, not material cost) the overhead of supporting hybrid DIMMs. Of the different options, it is not the cheapest, but certainly elegant:

  • slave-only DIMMs, USB-chip only on backplane: cheapest, JTAG and I2C on bus
  • hybrid DIMMs, USB-chip only on DIMMs: mid price, simple bus with only USB, but needs hub somewhere
  • hybrid DIMMs, USB-chip both on DIMMs and backplane: most expensive, JTAG and I2C on bus
Edited
I would prefere the last of you options: the DIMM and the backplane containing the i2c and the jtag.

This would offer the maximum flexebilitiy and i asume the additional hardware cost to be marginal compared to the FPGA and the power supply,
 
Pages:
Jump to: