Author

Topic: AntMiner S1 Underclocking, a thorough discussion (Read 8386 times)

legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
Someone linked this thread elsewhere so I thought I may as well add that I released a current master cgminer release 4.9.1a for the S1
https://github.com/kanoi/cgminer-binaries/tree/master/AntS1
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
If it's there I'll find it.

Also noteworthy, the BTCGarden AM-V1 blades use almost identical VRM circuitry but two chips per instead of three, so an optimal point on a Tube should result in a slightly more efficient point (reduced current means reduced resistive losses in the regulator) on one of them with the same hardware mod. I may do a full analysis of a Garden board for comparison, if I have time.
member
Activity: 119
Merit: 10
I'm looking forward to your ASICMiner results sidehack, I under & over volted Rockminers RK/R3 boards and could not find any significant gh/w benefit worth chasing.

Trends
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Just as a note, I'm starting an analysis on ASICMiner Tubes to see where they'll go. Our facility has hosted Tubes in the past, so I'm thinking about if the numbers look good, offering to undervolt for free any Tubes people want to send for hosting. They're getting to end-of-life definitely, but once we've completed our electrical upgrade and shift to the new rate schedule, all hardware will be $0.10/KWh flat. If I can get Tubes to put up decently in the 0.5-0.7W/GH area it might be worth looking into.

I should have results posted in a few days once I'm done running the jillion tests.
legendary
Activity: 2128
Merit: 1005
ASIC Wannabe
Huh  Shocked  Roll Eyes

Who is running at .75v?

Ive got decent stability around 0.75-0.77V / 200-206MHz / TO=55 works and 90-100% of chips run well to produce 95-105GH/S1

going any lower to 0.7-0.74V / 193-200MHz / TO=50-60    seems to produce mixed results, usually 50-80%  of the chips function and I have around 50-75GH/S1

going any higher to 0.78-0.82V / 200-215MHz / TO=50-60    seems to produce decent results, generally 70-90% of the chips function and I have around 95-115GH/S1


i think these dont necessarily run well at the same settings as the S2 for whatever reason. running around 0.75-0.78V and 200MHz is probably the sweet spot
legendary
Activity: 4256
Merit: 8551
'The right to privacy matters'
nice thread can't believe I have not read it until today.
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Sometime when I have time I might crank mine down around 0.8, but right now they're still coming out ahead.

Also, I'm hoping to do a full workup on AM Tubes next week.
newbie
Activity: 24
Merit: 0
 Huh  Shocked  Roll Eyes

Who is running at .75v?
hero member
Activity: 728
Merit: 500
I still got to get around to underclocking mine so I can turn them back on!
legendary
Activity: 1358
Merit: 1002
Looks like we're getting some BTCGarden blades in, and possibly a KnC Jupiter module, so I might have some underclock data on those things in a few weeks. Depends on when (and if) stuff arrives, and what kind of time I have between jobs and holidays.

looking forward to it :-)
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Looks like we're getting some BTCGarden blades in, and possibly a KnC Jupiter module, so I might have some underclock data on those things in a few weeks. Depends on when (and if) stuff arrives, and what kind of time I have between jobs and holidays.
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
I have exactly one AM-V1, but we just got it in for the museum and I don't really feel like messing with it. I have nothing at all from RockMiner. If anyone's got either to sell at reasonable prices I can look 'em over.
legendary
Activity: 2128
Merit: 1005
ASIC Wannabe
It probably won't be quite as straightforward to run as an S1, but... actually, I bet it will be if I can cgminer it. The VRMs are the same 53355DQP as the S1, S2, Cube, AM-V1 and a bunch of other hardware use, so I already know everything required to do the work. Just gotta find the time.

I would be inteested to know if the AM-V1 can undervolt, same with rockminer gear.

MY EXPERIENCE WITH ROCKMINER VOLTAGE (relevant to rk-box and r3):
The regulator on these boards is not marked, but looks just like a TPS53355 seen on Antminer S1/S2 and Bitfury boards. However, it is arranged differently, without the same placement of R1/R2 that are used for raising/lowering voltage. (aplying pencil to R1 raises voltage, R2 decreases voltage). In the case of rockminer, no resistors were acessible that would reduce the voltage when resistance was reduced. only the oposite was seen - increase in voltage when R1 and R2 were simultaneously modded. physical replacement of the resistors would be the only solution i think


looks a lot like the TPS53355 regulator in this picture, with two resisters right by it - if so should be quite easy to pencil mod

http://www.ti.com/lit/ds/symlink/tps53355.pdf   - look at the bottom image on page 7, the reference on page 20, and figure 38.
TLDR; Pin 1 has two resistors on it, R2 goes to ground and R1 goes through a small circuit. The choice of values for these gives the output voltage. This is how the Bitfury overvolts, and how the S1 can over/undervolt. looking at the rockminer PCB (would love a high-def image of the section), this is the solution to undervolt for efficiency:

some pencil lead on R2 increases the output voltage, while lead on R1 would decrease it. Presumably the efficiency could be brought closer to the 0.7w/GH achieved by the prisma this way

*note*: Im basing this on a blurry image and dont have a PCB in front of me to confirm that Pin 1 is the right corner of the chip, but the positionng of the two resistors like that seems logical. hopefully ill try myself on monday evening

update: I brought a unit home, and am unable to determine any markings on the regulator component. looks an awful lot like the TPS5355 though, and as there arent many >20A alternatives I would assume that it is.

however, my expectations were not correct. pencil modding either R1 or R2 (or any other resitor in the vicinity of the regulator) has no visible effect. It appears that R1 and R2 in my above image are both brought to ground together.

HOWEVER - I made an interesting discovery - pencil modding BOTH R1 and R2 results in the output voltage increasing, with 1.15V achieved quite easily using a 2B pencil (stock is 0.75V). Obviously this is the opposite of my intentions though.

UPDATE 2: Partial destruction of R1 and R2 (chipping the sides of the resitors with a sharp tool) so that each is roughly 3.3kOhm when measured in circuit results in a regulator output voltage of 0.6V Testing now -> preliminary results are mediocre at best - 16GH. However, its worth noting that this unit has always been a source of problems, and that two other boards in it report 25GH and 58GH, neither of which were modified in anyway. Not sure if its a USB hub issue, RPI, or maybe even something to do with the server PSU (providing 12.03V)

UPDATE 3: replaced a controller on a different board that was causing reboots and often not functional -> 110GH,90GH, 105GH, 70GH. Obviously there is quite a spread here but it seems like the modified board is functional. Because of difficulties operating (or lack of) at 0.6V, pencil mod was added to increase the voltage to 0.7V on the modified (70GH) board. Reject rate is 6.5% at 300MHz

UPDATE 4: 12hr stats: 112,112,111,66 GHash across the 4 boards, with the 65GH board being the one i modified. Total reject % is 4.3.

TLDR; Pencil mod is not easily implemented on the RK-Box. reduction of chip voltage to 0.7V significantly impacts hashrate, and voltage below 0.65V is often non-functional. No efficiency numbers available yet
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
That's how I did the first, with a pot on a big ol' knob for super fine adjustments (I could tune it to 1mV easily). I've got resistors premade now to parallel on the existing 8200s that make 10mV increments, and I've been setting one bank, running for a few minutes, then moving up or down as necessary until the error rate hit threshold. I've a parts order coming Monday with the actual SMD resistors to do the swaps proper, instead of having through-hole resistors hanging off the boards.

I definitely need to read that external-controller thread for these guys and see what work y'all have done.
legendary
Activity: 1358
Merit: 1002

Also, if you have the time to tune instead of setting all banks to the same stock value, I've been finding some banks that worked at voltages lower than my test data. I have one S1 that's pulling 140GH at 152WDC including fan and controller. I think every bank is at 830mV or better with ~1% HW though my test board did that at 850mV. Course one I did today had a few banks that required 860mV to stay clean.

I'm seriously impressed with their chips. 0.8W/GH is pretty good for year-old hardware that shipped at 2W/GH and was already ahead of the curve. I've got 12xS1 on a single DPS2K with power to spare. Figure in four or six months I'll take 'em to the lowerbound and keep 'em going for a while. They're helping fund the museum right now.

Here in another month or so (if I get time; we're starting to get some real work coming in) I plan on doing the same in-depth analysis on AM Tubes.

i have brought a bunch of potentometers that im adding to each blade (4 per section) and i plan on using that to fine tune each section, and adding them all together on the same controller (1 rasbpi) currently i have 5 done (those are pencil modded) so waiting for the last cp2102s to arrive to get the rest done, and waiting for those potentometers to arrive from china...

its amazing how much these chips can be pushed, but then, it just shows the craftmanship of these chips.
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
That is also an excellent point. I've got twelve running at the shop right now (underclocking is a work in progress) and it's a bit of a pain to reconfigure them when necessary.
hero member
Activity: 650
Merit: 500
Pick and place? I need more coffee.
I wanted to do it more from a "manageability" perspective.  Having so many individual controllers is a bit of a pain.  Right now I use a proxy for all my S1's.  Would be nice to

have one Cgminer instance for all of them.
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
The stock S1 controller, by my measures, only draws about 1W. Not too worried about that power overhead. But it would be nice to rig up something with more space-efficient cooling. Might as well use a single combined controller if you can get them stripped down and lumped into a more compact unit.


Oh, if anyone feels sufficiently benefitted by this work to toss donations, use the BTCMuseum address in my sig. We're buying up old hardware to put together a display of mining history, right now it's all funded by Novak and I's donations and mining on the stuff we're collecting.
hero member
Activity: 650
Merit: 500
Pick and place? I need more coffee.
I did the block erupter to uart adapter thing too.  Love breathing new life (or repurposing) old hardware.  I am thinking about making a high density miner based on the

S1 hardware.  Would like to get about 20 S1 blades running on one controller.
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Right, I've got a handful of machines in hosting using Crazyguy's image for Pi and Cubie running Prismas. It's handy, but the interface (at least what little I've seen) doesn't provide near as much information as I would require to do the job right. I'd rather use a standalone (AM-specific) cgminer instance I can get full data from on the fly. I've never really been a fan of RPi myself, rather use a real computer if I can.

Regarding that adapter, Novak and I work together (GekkoScience is the business we started together) so I already know about 'em. He used one of my old Block Erupters to prototype on. I'll probably use one of the adapters he's gonna be batching (https://bitcointalksearch.org/topic/unofficial-usb-adapters-for-asicminer-tubeprisma-882348, I think about half of them are sold already) to do the testing, if he has any left by then. Pretty handy stuff that guy does.
hero member
Activity: 650
Merit: 500
Pick and place? I need more coffee.
It probably won't be quite as straightforward to run as an S1, but... actually, I bet it will be if I can cgminer it. The VRMs are the same 53355DQP as the S1, S2, Cube, AM-V1 and a bunch of other hardware use, so I already know everything required to do the work. Just gotta find the time.

Actually Crazyguy released a modified version of Cgminer with Minera for the Raspberry pi.  I use it to run one of my tubes.  I bought a generic cp2102 adapter on Amazon

to use with it.  Works really well with any pool.  Had to install a 1K pull-up resistor on the cp2102 adapter.  Here is the original post:

https://bitcointalksearch.org/topic/prismatube-cp2102-mod-working-865503
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
It probably won't be quite as straightforward to run as an S1, but... actually, I bet it will be if I can cgminer it. The VRMs are the same 53355DQP as the S1, S2, Cube, AM-V1 and a bunch of other hardware use, so I already know everything required to do the work. Just gotta find the time.
hero member
Activity: 650
Merit: 500
Pick and place? I need more coffee.
I would be interested in the tube experimenting.  I have three I run at around 0.75V that do 730Gh.  This dropped their power consumption by 50W per board.  Heat is much

more manageable as well.  No longer have to use two or more fans. Wink
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Yes, something quite a bit like that. Did you backsolve the hex values to make sure they all made sense? My only concern is if the code spits out anything with an OD=3, which can only be valid for frequencies at or below 125MHz. I only check and correct one depth of OD overshoot right now, which would correct OD=2 for frequencies between 250 and 500MHz.

Also, if you have the time to tune instead of setting all banks to the same stock value, I've been finding some banks that worked at voltages lower than my test data. I have one S1 that's pulling 140GH at 152WDC including fan and controller. I think every bank is at 830mV or better with ~1% HW though my test board did that at 850mV. Course one I did today had a few banks that required 860mV to stay clean.

I'm seriously impressed with their chips. 0.8W/GH is pretty good for year-old hardware that shipped at 2W/GH and was already ahead of the curve. I've got 12xS1 on a single DPS2K with power to spare. Figure in four or six months I'll take 'em to the lowerbound and keep 'em going for a while. They're helping fund the museum right now.

Here in another month or so (if I get time; we're starting to get some real work coming in) I plan on doing the same in-depth analysis on AM Tubes.
legendary
Activity: 1358
Merit: 1002
I may have to read that thread sometime. I've been avoiding it for a while, though I think Novak was paying some attention. In any case, yes I don't mind you using that code. I like commenting the heck out of stuff in case someone else picks it up, and I hope it's actually good enough. There may still be some cases that break it; I should probably write a testbench at some point that feeds it every value from 1 to about 400 and backsolves the output for correctness.

Or I was thinking earlier, an easy way to do it would be to iteratively generate a list of all valid hex codes and then check for the real frequency closest to the desired. But that's kinda cheating. But it'd guarantee the solution.

something like this? :-p

Code:
chip_freq timeout freq_value(s)
37.50 373 0583,0b87
39.06 358 0c07
40.62 344 0603,0c87
42.19 331 0d07
43.75 320 0683,0d87
45.31 308 0e07
46.88 298 0703,0e87
48.44 289 0f07
50.00 280 0783,0f87
51.56 271 1007
53.12 263 0803,1087
54.69 256 1107
56.25 248 0883,1187
57.81 242 1207
59.38 235 0903,1287
60.94 229 1307
62.50 224 0983,1387,4983,5387
64.06 218 1407,5407
65.62 213 0a03,1487,4a03,5487
67.19 208 1507,5507
68.75 203 0a83,1587,4a83,5587
70.31 199 1607,5607
71.88 194 0b03,1687,4b03,5687
73.44 190 1707,5707
75.00 186 0582,0b83,0b86,1787,4b83,5787
76.56 182 5807
78.12 179 0c06,4c03,5887
79.69 175 5907
81.25 172 0602,0c86,4c83,5987
82.81 169 5a07
84.38 165 0d06,4d03,5a87
85.94 162 5b07
87.50 160 0682,0d86,4d83,5b87
89.06 157 5c07
90.62 154 0e06,4e03,5c87
92.19 151 5d07
93.75 149 0702,0e86,4e83,5d87
95.31 146 5e07
96.88 144 0f06,4f03,5e87
98.44 142 5f07
100.00 140 0782,0f86,4f83,5f87
101.56 137 6007
103.12 135 1006,5003,6087
104.69 133 6107
106.25 131 0802,1086,5083,6187
107.81 129 6207
109.38 128 1106,5103,6287
110.94 126 6307
112.50 124 0882,1186,5183,6387
114.06 122 6407
115.62 121 1206,5203,6487
117.19 119 6507
118.75 117 0902,1286,5283,6587
120.31 116 6607
121.88 114 1306,5303,6687
123.44 113 6707
125.00 112 0982,1386,4982,5383,5386,6787
128.12 109 1406,5406
131.25 106 0a02,1486,4a02,5486
134.38 104 1506,5506
137.50 101 0a82,1586,4a82,5586
140.62 99 1606,5606
143.75 97 0b02,1686,4b02,5686
146.88 95 1706,5706
150.00 93 0581,0b82,0b85,1786,4b82,5786
153.12 91 5806
156.25 89 0c05,4c02,5886
159.38 87 5906
162.50 86 0601,0c85,4c82,5986
165.62 84 5a06
168.75 82 0d05,4d02,5a86
171.88 81 5b06
175.00 80 0681,0d85,4d82,5b86
178.12 78 5c06
181.25 77 0e05,4e02,5c86
184.38 75 5d06
187.50 74 0701,0e85,4e82,5d86
190.62 73 5e06
193.75 72 0f05,4f02,5e86
196.88 71 5f06
200.00 70 0781,0f85,4f82,5f86
203.12 68 6006
206.25 67 1005,5002,6086
209.38 66 6106
212.50 65 0801,1085,5082,6186
215.62 64 6206
218.75 64 1105,5102,6286
221.88 63 6306
225.00 62 0881,1185,5182,6386
228.12 61 6406
231.25 60 1205,5202,6486
234.38 59 6506
237.50 58 0901,1285,5282,6586
240.62 58 6606
243.75 57 1305,5302,6686
246.88 56 6706
250.00 56 0981,1385,4981,5382,5385,6786
256.25 54 1405,5405
262.50 53 0a01,1485,4a01,5485
268.75 52 1505,5505
275.00 50 0a81,1585,4a81,5585
281.25 49 1605,5605
287.50 48 0b01,1685,4b01,5685
293.75 47 1705,5705
300.00 46 0580,0b81,0b84,1785,4b81,5785
306.25 45 5805
312.50 44 0c04,4c01,5885
318.75 43 5905
325.00 43 0600,0c84,4c81,5985
331.25 42 5a05
337.50 41 0d04,4d01,5a85
343.75 40 5b05
350.00 40 0680,0d84,4d81,5b85
356.25 39 5c05
362.50 38 0e04,4e01,5c85
368.75 37 5d05
375.00 37 0700,0e84,4e81,5d85
381.25 36 5e05
387.50 36 0f04,4f01,5e85
393.75 35 5f05
400.00 35 0780,0f84,4f81,5f85
406.25 34 6005
412.50 33 1004,5001,6085
418.75 33 6105
425.00 32 0800,1084,5081,6185
431.25 32 6205
437.50 32 1104,5101,6285
443.75 31 6305
450.00 31 0880,1184,5181,6385


thanks to your efforts with testing different voltage settings on the s1, i now know exactly what to set my s1 boards at ( i have 20 ) should give me aprox 900 GHS for aprox same level as S3s :-p
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
I may have to read that thread sometime. I've been avoiding it for a while, though I think Novak was paying some attention. In any case, yes I don't mind you using that code. I like commenting the heck out of stuff in case someone else picks it up, and I hope it's actually good enough. There may still be some cases that break it; I should probably write a testbench at some point that feeds it every value from 1 to about 400 and backsolves the output for correctness.

Or I was thinking earlier, an easy way to do it would be to iteratively generate a list of all valid hex codes and then check for the real frequency closest to the desired. But that's kinda cheating. But it'd guarantee the solution.
legendary
Activity: 1358
Merit: 1002
Alrighty, try it now. The problem was it had a check for lowerbound BS criteria (2^OD < 300) but not upperbound (2^OD > 1000) and somehow every test case I gave it didn't violate that. It checks for that condition now, and if it's met it halves the numerator (M+1) and halves the denominator (2^OD, by decrementing OD). The problem there is, if M+1 is an odd number, the halving automatically truncates to M/2 so it rechecks the M/2 and M+2/2 conditions (for the case of f=384MHz, M+1=123 so (M+1)/2=61.5 which truncates to 61 but rounds up to 62) for which one is closer and sticks with the M+1 with the least error. I don't guarantee it works for everything now, but it should work for every frequency for which the initial algorithm calculates an OD of 0, 1 or 2?

fantastic, now it works with my odd test cases :-)

i tried myself to get the calculations to work about a month ago, and got stumped on the same, and had given up on it..

(well, im not the best cpp programmer in the world, but i can read the code, and do a little here and there..)

is it ok with you if i implement it into the cgminer i hacked for connecting s1 blades to cp2102s?

thread: https://bitcointalksearch.org/topic/diy-reward-100-antminer-s1s3-blade-on-raspberry-pi-671128
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Alrighty, try it now. The problem was it had a check for lowerbound BS criteria (2^OD < 300) but not upperbound (2^OD > 1000) and somehow every test case I gave it didn't violate that. It checks for that condition now, and if it's met it halves the numerator (M+1) and halves the denominator (2^OD, by decrementing OD). The problem there is, if M+1 is an odd number, the halving automatically truncates to M/2 so it rechecks the M/2 and M+2/2 conditions (for the case of f=384MHz, M+1=123 so (M+1)/2=61.5 which truncates to 61 but rounds up to 62) for which one is closer and sticks with the M+1 with the least error. I don't guarantee it works for everything now, but it should work for every frequency for which the initial algorithm calculates an OD of 0, 1 or 2?
legendary
Activity: 1358
Merit: 1002
I'm thinking it's something with values over 300, because I've put in an aslo of numbers between 200 and 275 and it gave good data on all them.

Additionally, ignore that thing I said about 768.75MHz. I had transcribed the binary wrong; it does actually come out to the correct frequency. But an OD of 2 is impossible for frequencies above 250MHz. I reckon that's where the issues lies; I need to put in an extra check for that condition.

hmm, 268.75 returns 1502, but should be 1505..

but yeah everything up to 250 is correct, above, everything which is divideable with 12.5 is correct
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
I'm thinking it's something with values over 300, because I've put in an aslo of numbers between 200 and 275 and it gave good data on all them.

Additionally, ignore that thing I said about 768.75MHz. I had transcribed the binary wrong; it does actually come out to the correct frequency. But an OD of 2 is impossible for frequencies above 250MHz. I reckon that's where the issues lies; I need to put in an extra check for that condition.
legendary
Activity: 1358
Merit: 1002
I think you're right though, that the hex value isn't right. 3d06 comes out to 768.75 which is 384.375 * 2

It's somehow giving an OD of 2, which would actually make 3d07 I think, and actually get you 384.375MHz. But that violates BS constraints, because (2^2)*385 is not between 300 and 1000. I'll have to check over the parts that narrow the criteria.

the "funny" thing is, if you but in values that are divideable with 25 you do get the correct value in hex

legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
I think you're right though, that the hex value isn't right. 3d06 comes out to 768.75 which is 384.375 * 2

It's somehow giving an OD of 2, which would actually make 3d07 I think, and actually get you 384.375MHz. But that violates BS constraints, because (2^2)*385 is not between 300 and 1000. I'll have to check over the parts that narrow the criteria.
legendary
Activity: 1358
Merit: 1002
Well dangit, quit finding test cases that break the code! You know I gotta solve problems when they're put in front of me.

Also, that's funny... just ran it three times, and I get:

desired setpoint frequency? 385
BS: 0 M: 122 N: 1 OD: 2
Hex value: 3d06
 Resulting actual clock: 384.375000
 Error from desired clock: -0.162339 %
 Expected hashrate output: 196.800000 GH/s
 Best estimate timeout: 35

option 'freq_value'   '3d06'
option 'chip_freq'    '385'
option 'timeout'      '35'


Looks like it might be an issue with the BS; I'll see if there's an initialization thing that my system doesn't mind.

hmm interresting, might be my g++... what version are you running?

hmm:
Code:
desired setpoint frequency? 406
BS: 4198398 M: 64 N: 0 OD: 2
Hex value: 3ffa002
 Resulting actual clock: 406.250000
 Error from desired clock: 0.061572 %
 Expected hashrate output: 208.000000 GH/s
 Best estimate timeout: 35

option 'freq_value'   '3ffa002'
option 'chip_freq'    '406'
option 'timeout'      '35'


seems like its adding ffa to edge cases
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Well dangit, quit finding test cases that break the code! You know I gotta solve problems when they're put in front of me.

Also, that's funny... just ran it three times, and I get:

desired setpoint frequency? 385
BS: 0 M: 122 N: 1 OD: 2
Hex value: 3d06
 Resulting actual clock: 384.375000
 Error from desired clock: -0.162339 %
 Expected hashrate output: 196.800000 GH/s
 Best estimate timeout: 35

option 'freq_value'   '3d06'
option 'chip_freq'    '385'
option 'timeout'      '35'


Looks like it might be an issue with the BS; I'll see if there's an initialization thing that my system doesn't mind.
legendary
Activity: 1358
Merit: 1002
Yep, looks like I forgot to specify initial min=1 for the case initial i=1, which wasn't a problem with any of the test cases I gave it. Should be working now.

the hex value is also off :-p

tried with your new code:
Code:
desired setpoint frequency? 385
BS: 4198398 M: 122 N: 1 OD: 2
Hex value: 3ffbd06
 Resulting actual clock: 384.375000
 Error from desired clock: -0.162339 %
 Expected hashrate output: 196.800000 GH/s
 Best estimate timeout: 35

option 'freq_value'   '3ffbd06'
option 'chip_freq'    '385'
option 'timeout'      '35'

legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Yep, looks like I forgot to specify initial min=1 for the case initial i=1, which wasn't a problem with any of the test cases I gave it. Should be working now.
legendary
Activity: 1358
Merit: 1002
seems like there is an error in your program :-p

Code:
desired setpoint frequency? 368
BS: 0 M: 4198495 N: 0 OD: 0
Hex value: 20082f80
 Resulting actual clock: 104962400.000000
 Error from desired clock: 28522290.000000 %
 Expected hashrate output: 53740748.800000 GH/s
 Best estimate timeout: 0

option 'freq_value'   '20082f80'
option 'chip_freq'    '368'
option 'timeout'      '0'
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Regarding hashrates for a given frequency.

It appears that each chip is capable of 8MH per 1MHz clock rate. What this means is, per chip, the gigahashrate is f*.008

Each bank of an S1 board has 8 chips, so the per-bank gigahashrate is f*.008*8 or f*.064
A full S1 has 8 banks of 8 chips, so 64 chips; the gigahashrate per frequency for the whole machine is f*0.512

Individual VRMs output voltage to only their 8 ASICs. I have observed no problems from setting adjacent VRMs to different voltages. This may come in handy if one bank has a weak chip that can't run at the same point as the rest of the banks; the voltage for that bank can be turned up slightly without any issue.

To disable a VRM, tie a 1K resistor between GND and the end of R5/R68/R40/R54 closest to the inductor. The respective resistor for each given bank ties the buck controller's EN pin high by connecting it to the tap of a 3:1 voltage divider (200K+100K) on the 12V input. A 1K will pull this low and disable the VRM. I haven't tested extensively but it appears that disabling a VRM will cut communications with all downstream banks (comms, clock, something is down), meaning that you can't disable a VRM in the middle and leave the ones on the end functional. I can do some more testing sometime and see if there's a way around this, or if I'm mistaken.
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
If anyone doesn't know how to change clocks, it's pretty straightforward if you know SSH.

If you're on linux, just SSH into the miner's IP address. Windows users, I recommend a program called puTTy

The default user and password are the same as the config page - root/root

You'll be looking for the file '/etc/config/asic-freq', which is a text file used as a config for setting the ASIC frequency. Pretty easy to follow that nomenclature. The fun part of editing the text file is, as far as I know, the only available editor is 'vi' - which was written back in the day when terminal connections ran on morse-code speeds and keystrokes were precious commodities. To edit text in the file, first press 'i' (or 'I", whatever - I don't think it's case-sensetive) to drop into "insert" mode. Add your values, comment out unused lines, whatever needs to be done.
Hitting ESC will take you back out of "insert" mode. The ":" character is used for commands in vi; entering ':wq!' will save and force a quit. 'reboot' will restart your miner with the new frequency settings applied.

'freq_value' - the hex number used to calculate the frequency
'chip_freq' - the frequency displayed by cgminer
'timeout' - used by cgminer for ASIC communication timing

Calculating the hex value for a given frequency is kind of a pain. Basically, the hex value needs to be backtraced to binary, and then divided into about five pieces. Starting from the MSB (most significant bit, usually the leftmost):

15 - 0
14 - BS
13:7 - M
6:2 - N
1:0 - OD

To calculate the frequency, the above-mentioned variables are tossed into an equation:

f = 25(M+1) / (N+1)(2^OD)

There are, of course, constraints to this. For one, N is a 5-bit value but can only equal 0 or 1. Additionally, the following must be true:

For BS=1, 62.5<= f <= 1000
                 500 <= f(2^OD) <= 1000
For BS=0, 37.5<= f <= 600
                 300 <= f(2^OD) <= 600

This limits the effective precision, because your denominator can now range only within {1,2,4,8} and your OD is limited based on BS and f. It usually doesn't have much effect on the end result, and frequencies can generaly be calculated within 1%.

hexdecbin
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111

Binary is fairly easy to parse once you get the hang of it. At the rightmost bit (the Least Significant Bit, or LSB) you assign a value of 1. Moving left, the values double - to 2, 4, 8 and so on. It's the same as the tens places in decimal counting, except instead of increasing powers of ten (1, 10, 100) you have increasing powers of 2. If there's a '1' at any place, its associated 'place value' is added to the total. So the hex value D, or in decimal 13, is in binary '1101' - which means 1x1 + 0x2 + 1x4 + 1x8, so 1+4+8 = 13. Simple as that. Hex is just a single-digit way of expressing values between 0 and 15. Hex actually is short for "hexadecimal", in which you can see "hex" 6 and "deci" 10, so 16 total. Just as decimal runs on tens, with values being 0-9, and binary runs on twos, with values being 0-1, hexadecimal runs on 16s with values 0-15 (represented as 0-F).

For an example, say f=300. The stock config file tells us the hex for this is 0b81, so the binary version is 0000 1011 1000 0001
If we break that down into our frequency formula, we get:

0|0|0010111|00000|01

15 - 0 - 0 - 0
14 - BS - 0 - 0
13:7 - M - 0010111 - 23
6:2 - N - 00000 - 0
1:0 - OD - 01 - 1

So now we have f = 25(23+1) / (0+1)(2^1) = (25)(24)/(1)(2) = (600)/(2) = 300
f(2^OD) = (300)(2^1) = (300)(2)=600, so BS=0 applies.


I'm not entirely sure how timeouts should best be calculated, but after a bit of statistics on some working values, I figure timeout=13800/frequency - rounded to the nearest 5 - works pretty well.

I wrote up some quick code that, given a clock speed, generates the best BS, M, N, OD, and timeout and prints the data. The code is at www.gekkoscience.com/misc/set_freq.cpp if anyone's interested. Sample output for f=300:

#./set_freq
desired setpoint frequency? 300
BS: 0 M: 23 N: 0 OD: 1
Hex value: 0b81
 Resulting actual clock: 300.000000
 Error from desired clock: 0.000000 %
 Expected hashrate output: 153.600000 GH/s
 Best estimate timeout: 45

option 'freq_value'   '0b81'
option 'chip_freq'    '300'
option 'timeout'      '45'



You should be able to copy-paste the config outputs at the end directly into /etc/config/asic-freq and let it rip.
full member
Activity: 177
Merit: 100
Oh I like that chart!

Thanks sidehack!

8 )
member
Activity: 119
Merit: 10
I honestly think that the way you have detailed your results and posted them will entice others to mod their gear and
Keep them S1's running.

Great job sidehack, truly appreciated

Trends
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Others might like the info. I like to be thorough, after all. Really I should have done this a couple months ago, but I didn't worry a lot about messing with S1 because I've only had two since about June and, here at the shop, power is cheap enough that they're still slightly profitable at stock settings (about a nickel a day, but still).

Maybe in the next few weeks I'll do the same for a Tube. Novak's already posted instructions on hacking a USB BE into a USB serial adapter for them, after all.
member
Activity: 119
Merit: 10
No I'm fine with the info sidehack.
I've done several resistor change outs on the S1's I just thought you had done something a little different.
thanks

Trends
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
That is correct. The divider pair on mine was 8200/9760. As an example, on mine I used a 5K6 resistor across the 8200 which (for ease of installation and because I had a through-hole resistor) I tied between the junction of the two adjacent resistors and the high side of a nearby output cap. That requires much less precision than attaching leads directly to the pads of a 0603 SMD component. I measured between 0.815 and 0.825 in a quick check of VRMs on the board after modification, variance mostly due to the 5% tolerance of the 5K6 resistor.
On one VRM I did replace the 8200 with a 3K3 5% and got the same results. I can post pictures of some things later on if desired. It probably wouldn't hurt to put up information about changing clock speeds as well, as that requires SSH and config file editing. I'll also include info on calculating the hex values for various frequency setpoints and the expected hashrate calculations.
member
Activity: 119
Merit: 10

So just to be clear
 "Parallel R: The resistor value required in parallel with the VRM feedback resistor, to achieve Vset" is the value of the resistor (calculated?) to add to R3, R66, R38 or R52 if R3, R66, R38, R52 are left in place.

Correct
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
I'm not entirely sure. The only problem I had with timeout settings was at the 200MHz neighborhood (200, 196, 193). At timeout 70, the draw current would bounce between about 0.8A and 0.2A (idle) as chips would start to hash, and then all drop out. I'm assuming something in the communication between controller and ASICs was hosing it; once I set timeout to 80 everything worked wonderfully.

The only thing I really saw affecting the HW rate was a Vcore too low at a particular frequency. It makes sense, as in CMOS ICs all the switching is done by charge displacements; higher voltages are required to push a given charge through a given impedance faster, and higher gate charges are required to meet source-drain impedance thresholds for switching. Setting the voltages too low will keep the weakest transistors in the IC from switching effectively, introducing bit errors in the pipeline and returning bad data.

Someone with more software knowledge of Bitmain hardware can probably tell you more about what the timeout setting actually does. I've focused so far on the hardware.
member
Activity: 119
Merit: 10
sidehack

how would the T/O settings affect the HW error rate?
legendary
Activity: 2128
Merit: 1005
ASIC Wannabe
very nice overview! Im picking up some s1 units this weekend to undervolt a little bit and now i think i know where to aim for if i want 1w/GH Smiley
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Having recently acquired some AntMiner S1 that another miner in my acquaintance was disposing of for the cost of shipping, I decided to see just how efficiently these little guys could run. With that in mind I set up a test to measure the board-level DC power draw of the mining hardware at various parameter setpoints of core voltage and clock speed.

I connected a controller to a single hashing board with three VRMs disabled. The fourth VRM was wired for precise manual output voltage adjustments in the range of 1.20-0.60V. The controller and fan were powered separately, so only the power required by the single enabled VRM and its bank of 8 ASICs was measured (the idle current from the controller-powering 3.3V buck is  considered negligible).

I used a 12V server PSU as the power source, delivered through a 0.1ohm 1% shunt resistor across which I measured the voltage drop, for input current calculations. I used an oscilloscope for the DC power input (measured at the board's connector, below the shunt) and the VRM output voltage (measured at the output capacitors). It was observed that the fan would pull 12V 1A at maximum speed, and the controller (managing 64 ASICs at 250MHz) consumed 0.34A at 3.3VDC; the maximum additional power draw past board draw, then, is expected to be around 13W. At lower board power consumption, the fan requires much less power; assuming half power for the fan, additional power draw would be around 7W.

I included stable voltage ranges for every 25MHz from 400MHz down to 150MHz, and included the stock setpoint ([email protected]) and the AntMiner S2 stock setpoint ([email protected]) for references. The durations of tests varied, most being between 8 and 20 minutes before sample data was recorded. I tried to run up at least a DiffA of 3000, but sometimes I got distracted and ran more; other times, I got impatient (especially during slow-clock tests) and cut it off at less (typically the 20-minute point). For the first batch of samples (400MHz) I reset the voltage after each dataset was recorded, but did not reboot the device. The calculated error data for each sample at 400MHz is based off the DiffA and HW deltas from the previous sample. For all other samples, the machine was rebooted after setting Vcore.

All measurements were taken on an AntMiner S1 with a build date of 2013/11/18, with a VRM feedback resistor pair R3/R12 of 8200 ohms and 9760 ohms, respectively. All resistor modification calculations are based on this pairing.

GH Expected: Expected gigahashrate for a bank of 8 chips at the setpoint frequency
GH Total: The total expected hashrate for a 64-chip S1 at the setpoint frequency
GH Measured: Reported average hashrate during the measurement period
DiffA: Reported DiffA by the end of the measurement period
HW: Reported HW (hardware errors) by the end of the measurement period
Volts in: DC line voltage into the hashboard, measured at the board terminals
Current in: DC line current into the hashboard, measured across the input shunt (see above)
Power in: DC line power into the hashboard ( Vin*Iin )
Vcore: Measured average VRM output voltage during the sample time
W/GH: The power per measured gigahash-per-second ( Pin/GHM )
HWE Percent: Percentage of hardware errors for the sample period ( HW/[DiffA + HW] )
W/GHE: Watts per expected gigahash-per-second ( Pin/GHE )
Vset: The VRM desired-setpoint voltage, to 0.01V
Replacement R: The resistor value required to replace the VRM feedback resistor (R3, R66, R38, R52), to achieve Vset
Parallel R: The resistor value required in parallel with the VRM feedback resistor, to achieve Vset

Setpoint MHzGH ExpectedGH TotalGH MeasuredDiffAHWVolts inCurrent inPower inVcoreW/GHHWE PercentW/GH ExpectedVsetReplacement RParallel R
40025.6204.825.44351011.603.9145.361.1251.790.00%1.771.130
25.56783111.613.8144.231.1121.730.04%1.731.1108052446124
25.695992111.633.7143.151.1001.690.71%1.691.1007889208238
25.31292720811.643.6041.901.0831.665.32%1.641.080756497523
24.91663958111.653.5140.891.0681.649.13%1.601.070740175990
37524.0192.023.83014011.653.4940.661.1101.710.00%1.691.1108052446124
24.33711011.663.4139.761.0881.640.00%1.661.0907727133856
24.03089011.673.3639.211.0791.630.00%1.631.080756497523
24.23327011.673.2938.391.0691.590.00%1.601.070740175990
26.63199011.683.2337.731.0601.420.00%1.571.060723961745
24.133272911.683.1837.141.0491.540.86%1.551.050707651622
23.530716511.693.1236.471.0401.552.07%1.521.040691344059
22.9371121211.703.0435.571.0291.555.40%1.481.030675138194
35022.4179.224.43839011.712.9734.781.0491.430.00%1.551.050707651622
22.93327011.712.9234.191.0401.490.00%1.531.040691344059
22.43199011.722.8533.401.0291.490.00%1.491.030675138194
22.13327011.732.8032.841.0191.490.00%1.471.020658833512
23.85119011.732.7532.261.0091.360.00%1.441.010642529689
22.43071611.732.6931.550.9991.410.19%1.411.000626326508
22.030716911.742.6430.990.9901.412.20%1.380.990610023819
21.5406722911.752.5830.320.9791.415.33%1.350.980593721517
22.04735011.663.4139.761.1201.800.00%1.781.1208215
32520.8166.420.63583011.752.5630.081.0101.460.00%1.451.010642529689
21.23071011.762.5229.641.0001.400.00%1.421.000626326508
20.83071011.762.4628.930.9891.390.00%1.390.990610023819
21.03071011.772.4228.480.9801.360.00%1.370.980593721517
21.43071011.772.3627.780.9681.300.00%1.340.970577519524
21.23455011.782.3227.330.9601.290.00%1.310.960561217781
20.83071211.782.2726.740.9501.290.07%1.290.950544916245
21.548634511.792.2226.170.9391.220.92%1.260.940528714880
19.8435117211.792.1725.580.9281.293.80%1.230.930512413660
30019.2153.619.015743011.802.1124.900.9511.310.00%1.300.950544916245
18.73199011.812.0524.210.9381.290.00%1.260.940528714880
19.13071011.812.0223.860.9311.250.00%1.240.930512413660
19.02687011.821.9723.290.9201.230.00%1.210.920496112562
19.22431011.821.9222.690.9091.180.00%1.180.910479911569
18.72687211.831.8922.360.9011.200.07%1.160.900463610666
18.726873211.831.8521.890.8901.171.18%1.140.89044739843
18.2255912111.841.8121.430.8811.184.51%1.120.88043119088
27517.6140.817.43199011.861.6719.810.8801.140.00%1.130.88043119088
17.74351011.861.6319.330.8701.090.00%1.100.87041488394
17.84479011.861.5918.860.8601.060.00%1.070.86039857754
18.434552111.871.5518.400.8501.000.60%1.050.85038237161
17.0358311011.871.5218.040.8411.062.98%1.030.84036606611
25016.0128.016.23583011.891.3916.530.8401.020.00%1.030.84036606611
16.42559011.891.3616.170.8300.990.00%1.010.83034976098
16.13327011.891.3315.810.8200.980.00%0.990.82033355620
16.03071411.901.2915.350.8100.960.13%0.960.81031725173
15.233274611.901.2614.990.8020.991.36%0.940.80030094754
15.2383924011.901.2314.640.7910.965.88%0.910.79028474360
22514.4115.214.33199011.911.1213.340.7890.930.00%0.930.79028474360
15.02815011.911.0912.980.7800.870.00%0.900.78026843990
15.33071011.911.0612.620.7700.830.00%0.880.77025213641
14.331995611.921.0312.280.7590.861.72%0.850.76023593311
15.1307112111.921.0112.040.7500.803.79%0.840.75021962999
20012.8102.412.63199011.930.9511.330.7680.900.00%0.890.77025213641
12.74351011.930.9311.090.7590.870.00%0.870.76023593311
13.13967011.940.9110.870.7490.830.00%0.850.75021962999
12.54479011.940.8810.510.7390.840.00%0.820.74020332704
14.03583011.940.8610.270.7290.730.00%0.800.73018712424
12.73583811.940.8510.150.7210.800.22%0.790.72017082157
19612.5100.012.83199011.930.9411.210.7700.880.00%0.900.77025213641
13.13199211.950.829.800.7200.750.06%0.780.72017082157
17511.289.611.63071011.960.748.850.7190.760.00%0.790.72017082157
11.22559011.970.728.620.7090.770.00%0.770.71015451904
12.13327111.970.708.380.6970.690.03%0.750.70013831663
9.73199211.970.627.420.6910.770.06%0.660.69012201433
1509.676.89.63199111.980.607.190.6900.750.03%0.750.69012201433

Noteworthy data points:
- 350MHz @ 1.12Vcore, stock S1 setpoint
- 196MHz @ 0.77Vcore, stock S2 setpoint
- 225MHz @ 0.77Vcore, maximum S2 stability point at stock Vcore
- 200MHz @ 0.72Vcore, minimum stability point at 200MHz - some ASICs were unstable below this voltage, causing resets
- 175MHz @ 0.69Vcore, hashrate reports low due to one chip dropping out entirely; remaining 7 hashed well (average 1.39GH, expected 1.20)
- 150MHz @ 0.69Vcore, minimum stable at 150MHz. At 0.68Vcore all chips dropped out and reported 'X' in ASIC status

I currently have a full machine modified for operation at [email protected] (using a 5k6 5% parallel resistor), for which the expected output is 128.0GH at a total power draw (including half-power 6W fan and 1W controller) of about 133W. I measured the power draw at 11.34V 11.52A (using a 1% 0.05ohm shunt; the PSU interface board's 5% shunt measurement reported 11.43A), for 130.6W DC power consumption. The current stats, at 0h 31m 53s operation, are 128.61GH, 59HW, 56191DiffA
This equates to a DC efficiency of 1.02W/GH with a hardware error rate of 0.1%
The fan is reporting 1020RPM, temps 41/43C in a ~65F ambient environment

A note on the maximum S2 stability point at stock Vcore: the S2 uses the same VRM hardware ( 53355DQP monolithic synchronous buck driver ) as in the S1 (and also ASICMiner Cubes and Tubes). Because the S2 is clocked and volt-set to a lower operating point, each ASIC draws far less current than the ASICs in a stock-set S1. The S1 allocates 8 ASICs per VRM; the S2 allocates 16. Therefore, at any particular setpoint on the S1, the power draw per VRM for the same setpoint on the S2 is doubled. If an S1 is stable at 0.77Vcore 225MHz, it is logical to think the S2 would be also. However, the power draw from the S2's VRMs would be twice the 12.62W seen by the S1, at 25.24W. Assuming a 90% efficient regulator (which efficiency typically drops as current increases, due to parasitic resistances in the inductor and drive FETs), that's an estimated output power of 22.72W; as we're outputting 0.77V the current draw is then 29.5A. The 53355DQP is rated for 30A, which means that you're stressing it to 98% capacity continuously. With a best-case efficiency of 95% (and a few other assumptions, to make the comparison easier), the output power is 23.98W, with an output current of 31.1A, a good 3% past rating. With this in mind, it is probably a terrible idea to try and clock an S2 up to 225MHz even if ASIC cooling was adequate.
Jump to: