Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbounded frequency regulation #4

Open
kmitz opened this issue Mar 16, 2016 · 4 comments
Open

Unbounded frequency regulation #4

kmitz opened this issue Mar 16, 2016 · 4 comments

Comments

@kmitz
Copy link
Owner

kmitz commented Mar 16, 2016

'newFreq' value can be incorrect when downclocking below 100MHz or when overclocking above 500MHz.

The issue is caused by these two lines:
newFreq=$(cat freqList | grep -A "$FREQ_STEP" "$freq:" | tail -n 1)
newFreq=$(cat freqList | grep -B "$FREQ_STEP" "$freq:" | head -n 1)

newFreq values shall be limited to the valid frequencies contained in Freqlist file.

I don't have my Antminer anymore so I won't issue the fix myself.

@davidshumway
Copy link
Contributor

Yes. Noticed this before... This has worked thus far (has not been extensively tested).
For min:
if [ $maxtemp -gt $TMAX ] && [ $freq'' != "100" ]
For max:
elif [ $maxtemp -lt $TMIN ] && [ $freq'' != "500" ]

@kmitz
Copy link
Owner Author

kmitz commented Mar 16, 2016

Actually I just noticed that grep -B (resp. grep -A) will return the first (resp. last) line of freqList when looking for "out of boundaries" values.

For instance:
*input:
FREQ_STEP=4; freq=100; newFreq=$(cat freqList | grep -A "$FREQ_STEP" "$freq:" | tail -n 1); echo $newFreq;

*output:
10 : 100 : 0783

It seems that the issue was (unintentionally) already taken care of! What do you think about it?

@davidshumway
Copy link
Contributor

Looks correct. But won't it restart cgminer unnecessarily at this point?

@kmitz
Copy link
Owner Author

kmitz commented Mar 17, 2016

That's right, I missed that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants