help regarding an open source

K

koyel.aphy

Hi,

Can someone tell what top.vhd is doing, which can be found in the list of vhdl codes in the following link

https://github.com/progranism/Open-Source-FPGA-Bitcoin-Miner/tree/master/projects/VHDL_Xilinx_Port

It appears to me that load always contain some undefined bits as it is undefined initially and rxdata fills only 8 bits (0 to 7) of load and further these 8 bits are transferred to the bits from 8 to 15 so ultimately only 0 to 15 will contain 1s or 0s and the rest will be undefined. If this happens state and data will contain undefined values and then how the code will work?

Thanks,
Regards
 
P

Paul Uiterlinden

Hi,

Can someone tell what top.vhd is doing, which can be found in the list of
vhdl codes in the following link

https://github.com/progranism/Open-Source-FPGA-Bitcoin-Miner/tree/master/projects/VHDL_Xilinx_Port

It appears to me that load always contain some undefined bits as it is
undefined initially and rxdata fills only 8 bits (0 to 7) of load and
further these 8 bits are transferred to the bits from 8 to 15 so
ultimately only 0 to 15 will contain 1s or 0s and the rest will be
undefined. If this happens state and data will contain undefined values
and then how the code will work?

I do not know where you get the idea from that only 8 bits are transferred
to bits 8 to 15.

Lines 180 and 181 form a 344 bit shift register, where one byte of data is
shifted in at a time:

180: load(343 downto 8) <= load(335 downto 0);
181: load(7 downto 0) <= rxdata;

The upper eight bits are shifted out, to lower eight bits receive the data.

The two lines just as well could have been written as one line:

load <= load(335 downto 0) & rxdata;

For the rest of the functionality of top.vhd: no idea, if have not looked
into it any further.
 
K

koyel.aphy

got it.

Thank you very much! Further information on top.vhd is welcome.

Best Regards,
 
K

koyel.aphy

Hi,

I am unable to understand in top.vhd why the condition rxstrobe =1 is kept while using the condition hit =1 as it may happen that rxstrobe =0 and hit =1 and then the statements under hit =1 will not be executed. It is needed to detect hits and if a hit occurs (hit = 1) and rxstrobe is 0 then the hit will not be detected but it needs to be in bitcoins. Please help if possible.

Regards
 
K

koyel.aphy

one further question is: 'nonce' is being fed to the input in miner.vhd and'hit' is an output, which is obtained as

hit <= '1' when outerhash(255 downto 224) = x"00000000" and step = "000000" else '0';(taken from miner.vhd)

'outerhash' depends on the value of 'nonce' somehow but the 'nonce' for which I get the hit (hit means 'hit'=1) is not the one that appears (in 'nonce' signal) when 'hit' hits (gets the value of 1) as 'nonce' keep on incrementing every clock pulse and by the time a 'nonce' gives rise to a hit, thevalue of 'nonce' has incremented and changed to some other value. So in top.vhd under the if condition (if hit ='1') txdata gets the value of that nonce that appears when 'hit' hits but not of that nonce that causes the hit. But in bitcoin mining as far as I understood we need to find the nonce that causes the hit ('hit' gets a value of 1). I am unable to find out whereI am wrong. Please point that out and clarify.

Many thanks,
regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top