Skip to content

Commit

Permalink
Added more registers to the golden ticket path.
Browse files Browse the repository at this point in the history
  • Loading branch information
fpgaminer committed Feb 18, 2012
1 parent 097b101 commit f0309ee
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
24 changes: 19 additions & 5 deletions projects/LX150_comm_tweaks/hdl/fpgaminer_top.v
Expand Up @@ -41,6 +41,7 @@ module fpgaminer_top (
localparam MAXIMUM_FREQUENCY = 200;

// ONLY FOR DEV TESTING:
//`define DUMMY_ADDER
//`define DUMMY_HASHER


Expand Down Expand Up @@ -76,6 +77,17 @@ module fpgaminer_top (

//// ZTEX Hashers
`ifdef DUMMY_HASHER
wire [31:0] hash2_w;

dummy_pipe130 p1 (
.clk (hash_clk),
.state (midstate),
.state2 (midstate),
.data ({384'h000002800000000000000000000000000000000000000000000000000000000000000000000000000000000080000000, nonce, data}),
.hash (hash2_w)
);
`else
`ifdef DUMMY_ADDR
reg [31:0] hash2_w;
reg [31:0] stage1, stage2, stage3, stage4, stage5;

Expand Down Expand Up @@ -106,6 +118,7 @@ module fpgaminer_top (
.hash (hash2_w)
);
`endif
`endif


//// Communication Module
Expand All @@ -114,8 +127,8 @@ module fpgaminer_top (
wire [95:0] comm_data;
reg is_golden_ticket = 1'b0;
reg [31:0] golden_nonce;
reg golden_ticket_buf = 1'b0;
reg [31:0] golden_nonce_buf;
reg [3:0] golden_ticket_buf = 4'b0;
reg [127:0] golden_nonce_buf;

`ifndef SIM
jtag_comm # (
Expand All @@ -124,8 +137,8 @@ module fpgaminer_top (
.INITIAL_FREQUENCY (BOOTUP_FREQUENCY)
) comm_blk (
.rx_hash_clk (hash_clk),
.rx_new_nonce (golden_ticket_buf),
.rx_golden_nonce (golden_nonce_buf),
.rx_new_nonce (golden_ticket_buf[3]),
.rx_golden_nonce (golden_nonce_buf[127:96]),

.tx_new_work (comm_new_work),
.tx_midstate (comm_midstate),
Expand Down Expand Up @@ -177,7 +190,8 @@ module fpgaminer_top (
is_golden_ticket <= hash2_w == 32'hA41F32E7;
golden_nonce <= nonce2;

{golden_ticket_buf, golden_nonce_buf} <= {is_golden_ticket, golden_nonce};
golden_ticket_buf <= {golden_ticket_buf[2:0], is_golden_ticket};
golden_nonce_buf <= {golden_nonce_buf[95:0], golden_nonce};
end

endmodule
Expand Down
10 changes: 7 additions & 3 deletions projects/LX150_comm_tweaks/xilinx_fpgaminer.xise
Expand Up @@ -21,18 +21,18 @@
</file>
<file xil_pn:name="hdl/sha256_pipes2.v" xil_pn:type="FILE_VERILOG">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="4"/>
<association xil_pn:name="Implementation" xil_pn:seqID="3"/>
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
</file>
<file xil_pn:name="constraints/fpgaminer_top.ucf" xil_pn:type="FILE_UCF">
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
</file>
<file xil_pn:name="hdl/dynamic_clock.v" xil_pn:type="FILE_VERILOG">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="27"/>
<association xil_pn:name="Implementation" xil_pn:seqID="5"/>
<association xil_pn:name="Implementation" xil_pn:seqID="4"/>
</file>
<file xil_pn:name="hdl/jtag_comm.v" xil_pn:type="FILE_VERILOG">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="56"/>
<association xil_pn:name="Implementation" xil_pn:seqID="4"/>
<association xil_pn:name="Implementation" xil_pn:seqID="3"/>
</file>
<file xil_pn:name="hdl/golden_nonce_fifo.ngc" xil_pn:type="FILE_NGC">
<association xil_pn:name="Implementation" xil_pn:seqID="2"/>
Expand All @@ -41,6 +41,10 @@
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="57"/>
<association xil_pn:name="Implementation" xil_pn:seqID="1"/>
</file>
<file xil_pn:name="hdl/dummy_pipes2.v" xil_pn:type="FILE_VERILOG">
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="62"/>
<association xil_pn:name="Implementation" xil_pn:seqID="5"/>
</file>
</files>

<properties>
Expand Down

0 comments on commit f0309ee

Please sign in to comment.