Skip to content
Snippets Groups Projects
Commit 9ee6e47c authored by dam1n19's avatar dam1n19
Browse files

ATO2-24: Fixed 2 Dynamic Valid/Ready bugs in Message Builder - Accelerator Passes Basic Tests

parent c0fe0685
Branches
Tags
No related merge requests found
......@@ -123,12 +123,18 @@ module sha256_message_build (
end
// If there is no Valid data at the output or there is a valid transfer happening on this clock cycle
if (cfg_valid == 1'b1) begin
// Check for already existing valid data at output
if (data_out_valid && !data_out_ready) begin
next_data_in_ready = 1'b0;
end else begin
next_data_in_ready = 1'b1;
end
// Handshake to Acknowledge Config Has been Read
next_cfg_size = cfg_size;
next_cfg_ready = 1'b0;
next_data_in_ready = 1'b1;
next_data_word_count = word_extract + {53'd0, |rem_extract}; // Divide by 512 and round up
next_data_word_rem = rem_extract;
// Next State Logic
if (next_data_word_count > 1) begin
next_state = 3'd2;
end else begin
......@@ -152,6 +158,7 @@ module sha256_message_build (
if (data_in_valid && data_in_ready) begin
// Valid Handshake and data can be processed
// Data Processing Algorithm
next_data_in_ready = 1'b0;
next_data_word_count = data_word_count - 1;
// Write Input Data to Output
next_data_out = data_in;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment