Skip to content

Commit

Permalink
commentaries were removed
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilLord666 committed Mar 9, 2024
1 parent 297b736 commit 8b27567
Showing 1 changed file with 28 additions and 37 deletions.
65 changes: 28 additions & 37 deletions SerialPortEcho/lib/quick_rs232.v
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ begin
if (tx_bit_counter >= TICKS_PER_UART_BIT)
begin
tx_bit_counter <= 0;
tx_data_bit_counter <= 0;
tx_data_bit_counter <= 0;
tx_state <= DATA_BITS_EXCHANGE_STATE;
end
end
Expand All @@ -439,14 +439,14 @@ begin
begin
tx_bit_counter <= 0;
tx_data_bit_counter <= tx_data_bit_counter + 4'b0001;
if (tx_data_bit_counter == 0)
begin
tx_data_parity <= tx_buffer[0];
end
else
begin
tx_data_parity <= tx_data_parity ^ tx_buffer[tx_data_bit_counter];
end
if (tx_data_bit_counter == 0)
begin
tx_data_parity <= tx_buffer[0];
end
else
begin
tx_data_parity <= tx_data_parity ^ tx_buffer[tx_data_bit_counter];
end
end
end
end
Expand All @@ -467,37 +467,28 @@ begin
begin
tx <= 1'b0;
end
`EVEN_PARITY:
begin
if (tx_data_parity == 1'b1)
begin
tx <= 1'b1;
end
else
begin
tx <= 1'b0;
end
end
`ODD_PARITY:
begin
if (tx_data_parity == 1'b1)
begin
tx <= 1'b0;
end
else
begin
tx <= 1'b1;
end
end
/*default:
`EVEN_PARITY:
begin
if (tx_data_parity == 1'b1)
begin
tx <= 1'b1;
end
else
begin
tx <= 1'b0;
end
end
`ODD_PARITY:
begin
tx_data_parity <= tx_buffer[0];
for (i = 1; i < DEFAULT_BYTE_LEN; i = i + 1)
if (tx_data_parity == 1'b1)
begin
tx_data_parity <= tx_data_parity ^ tx_buffer[i];
tx <= 1'b0;
end
// todo(UMV): NOT separated Even && Odd
end*/
else
begin
tx <= 1'b1;
end
end
endcase
end

Expand Down

0 comments on commit 8b27567

Please sign in to comment.