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

Error divide by zero on Cyclone V Starter Board #16

Open
everestultimate opened this issue Sep 30, 2016 · 4 comments
Open

Error divide by zero on Cyclone V Starter Board #16

everestultimate opened this issue Sep 30, 2016 · 4 comments

Comments

@everestultimate
Copy link

everestultimate commented Sep 30, 2016

My config.tcl
set url "http://XX.XX.XX.XX:8332"
set userpass "myuser.myworker:mypass"

I downloaded mining_proxy.exe from https://github.com/slush0/stratum-mining-proxy. then run cmd.exe
mining_proxy -o litecoinpool.org -p 3333

I get this error when i run mine.bat

error

@asovetov
Copy link

asovetov commented Jul 1, 2021

same error =(

@tgbilder
Copy link

Me too. This miner needs a Tcl stratum support. I think it is possible with pure Tcl.

@burntCherryCake
Copy link

This error seems like it's not heavily device dependent. I've tracked down where in the tcl script this is happening, but don't know the expected behavior of the variables. I was reconfiguring this project for a Cyclone II (just for fun) when I hit this.

The error happens when mine.tcl calls push_work_to_fpga in jtag_command.tcl. The case I hit was where the target threshold received from the mining pool (Nov 13, 2022) is

$work(target) -> 0000000000000000000000000000000000000000000000000000ffff00000000
but then the script does this to the target:
set target [string range [reverseHex $work(target)] 0 7]
which results in
$target -> 00000000
because the previous line essentially grabs the first 8 characters of the $work(target) value.

Then, in the block of code quoted at runtime, this happens
# Only write target the first time (and if it subsequently changes) if { $prevtarget != $target } { write_instance "TARG" $target set diff [expr 0x0000ffff / 0x$target ] puts "new target $target diff $diff" }

which attempts to divide 0x0000ffff by 0x00000000, which is indeed, a divide by 0.

@burntCherryCake
Copy link

By the way, getwork <-> stratum conversion seems to be doable via a proxy (https://github.com/slush0/stratum-mining-proxy).
The Proxy seems to work, I don't get errors when connecting to a pool, and mine.bat seems to be getting some non-garbage values.

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

4 participants