Skip to content

Commit

Permalink
feat: correction of conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Elizabeth-0 committed Nov 1, 2024
1 parent c509911 commit 520d5ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tt_um_waves.v
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ module uart_receiver (

// Decode frequency selection
if (received_byte >= 8'h30 && received_byte <= 8'h39) begin
freq_select <= {(received_byte - 8'h30) & 6'b00111111}[5:0]; // Assuming '0'-'9'
freq_select <= (received_byte - 8'h30) & 6'b00111111; // Assuming '0'-'9'
end else if (received_byte >= 8'h41 && received_byte <= 8'h46) begin
freq_select <= {((received_byte - 8'h41 + 6'd10) & 6'b00111111)[5:0]}; // Assuming 'A'-'F'
freq_select <= ((received_byte - 8'h41 + 6'd10) & 6'b00111111); // Assuming 'A'-'F'
end else begin
freq_select <= 6'd0; // Default or error case
end
Expand Down

0 comments on commit 520d5ac

Please sign in to comment.