Skip to content
Snippets Groups Projects
Commit 248221ef authored by dam1n19's avatar dam1n19
Browse files

fixed last bug and fixed message end pointer bug

parent 8c36b79e
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ module message_build (
// Create Position Marker to show end of data message (place a "1")
// - only if not a multiple of 512
assign end_marker = |data_word_rem ? 1 << (512 - data_word_rem - 1) : 512'd0;
assign end_marker = |data_word_rem ? 1 << (512 - data_word_rem) : 512'd0;
// Combine Last Data (after being masked) with end marker and size
assign last_data_word = (data_in & last_word_mask) | end_marker;
......@@ -107,7 +107,6 @@ module message_build (
if (!(data_out_valid && !data_out_ready)) begin
// If data out handshake has been seen, drop valid
next_data_out_valid = 1'b0;
next_data_out_last = 1'b0;
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
......@@ -144,6 +143,7 @@ module message_build (
// Write Input Data to Output
next_data_out = data_in;
next_data_out_valid = 1'b1;
next_data_out_last = 1'b0;
if (next_data_word_count == 1) begin
// Last Input Data Word
next_state = 3'd3;
......
......@@ -47,6 +47,7 @@ def main(argv):
out_data_words = chunked_data_words.copy()
out_data_words_last = []
last_len = len(chunked_data_words[-1])
# print(chunked_data_words[-1])
if (last_len == 512):
out_data_words.append("1" + "0"*447 + cfg_size_str)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment