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

No proper testing task defined for icarus board #4

Open
marsohod4you opened this issue Jan 23, 2018 · 0 comments
Open

No proper testing task defined for icarus board #4

marsohod4you opened this issue Jan 23, 2018 · 0 comments

Comments

@marsohod4you
Copy link

There are 2 patches to cgminer of different versions.
They conflict to each other.
One patch to cgminer 3.1.1
FPGA-Blakecoin-Miner/cgminer/cgminer-3.1.1/driver-icarus.c says

`/* Blakecoin detection hash
N.B. golden_ob MUST take less time to calculate than the timeout set in icarus_open()
0000007002685447273026edebf62cf5e17454f35cc7b1f2da57caeb008cf4fb00000000dad683f2975c7e00a8088275099c69a3c589916aaa9c7c2501d136c1bf78422d5256fbaa1c01d9d1b48b4600000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000
{ midstate, data } = { 256'h553bf521cf6f816d21b2e3c660f29469f8b6ae935291176ef5dda6fe442ca6e4, 96'hd1d9011caafb56522d4278bf };
*/
const char golden_ob[] =
"553bf521cf6f816d21b2e3c660f29469"
"f8b6ae935291176ef5dda6fe442ca6e4"
"00000000000000000000000000000000"
"00000000d1d9011caafb56522d4278bf";

const char golden_nonce[] = "00468bb4";
const uint32_t golden_nonce_val = 0x00468bb4;

`
Another patch is for 3.4.3
FPGA-Blakecoin-Miner/cgminer/cgminer-3.4.3/driver-icarus.c

` /* Blakecoin detection hash
N.B. golden_ob MUST take less time to calculate than the timeout set in icarus_open()
0000007002685447273026edebf62cf5e17454f35cc7b1f2da57caeb008cf4fb00000000dad683f2975c7e00a8088275099c69a3c589916aaa9c7c2501d136c1bf78422d5256fbaa1c01d9d1b48b4600000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000
{ midstate, data } = { 256'h553bf521cf6f816d21b2e3c660f29469f8b6ae935291176ef5dda6fe442ca6e4, 96'hd1d9011caafb56522d4278bf };
*/
const char golden_ob[] =
"553bf521cf6f816d21b2e3c660f29469"
"f8b6ae935291176ef5dda6fe442ca6e4"
"00000000000000000000000000000000"
"00000000d1d9011caafb56522d4278bf";

const char golden_nonce[] = "000187a2";
const uint32_t golden_nonce_val = 0x000187a2;`

So SAME data in icarus detection code BUT DIFFERENT NONCES!!!!!!!
Which one is correct? Not clear.

MOST AWFUL that when those data are inserted into verilog testbench then board does not detect nonce!

LX150-Unrolled/test_blakeminer.v
Has a line for tested task
reg [415:0] data = 416'h000007ffffbd9207ffff001e11f35052d554469e3171e6831d493f45254964259bc31bade1b5bb1ae3c327bc54073d19f0ea633b;

And this task works properly in simulator ().
Also same line is used to set data directly into
FPGA-Blakecoin-Miner/experimental/LX150-Unrolled/serial.v

``ifdef SIM // Sane data for simulation - NB disable if simulating serial data loading
assign target = input_copy[415:384]; // Not needed since no RxD_data_ready strobe to load targetreg
assign data1 = 256'h3171e6831d493f45254964259bc31bade1b5bb1ae3c327bc54073d19f0ea633b; // midstate
assign data2 = 128'hffbd9207ffff001e11f35052d554469e; // NB ffbd9207 is loaded into nonce
// assign data2 = 128'hffbd9206ffff001e11f35052d554469e; // Test using prior nonce ffbd9206
else

BUT when midstate and data from cgminer C source inserted into testmench then simulator shows that board is not detected - NONCE NOT FOUND..

When midstate and data taken from generated FPGA-Blakecoin-Miner/MiningSoftware/testblakeminer.py
data - THEN verilog simulator shows that NONCE is FOUND properly.

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

1 participant