File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -401,30 +401,27 @@ begin
401401 begin
402402 tx <= 1'b0 ;
403403 end
404- `EVEN_PARITY:
405- begin
406- tx_data_parity <= tx_buffer[0 ];
407- for (i = 1 ; i < DEFAULT_BYTE_LEN; i = i + 1 )
408- begin
409- tx_data_parity <= tx_data_parity ^ tx_buffer[i];
410- end
411- tx <= tx_data_parity == 1'b0 ? 1'b0 : 1'b1 ;
412- end
413- `ODD_PARITY:
404+ default :
414405 begin
415406 tx_data_parity <= tx_buffer[0 ];
416407 for (i = 1 ; i < DEFAULT_BYTE_LEN; i = i + 1 )
417408 begin
418409 tx_data_parity <= tx_data_parity ^ tx_buffer[i];
419410 end
420- tx <= tx_data_parity == 1'b0 ? 1'b1 : 1'b0 ;
421411 end
422412 endcase
423413 end
424414
425415 if (DEFAULT_PARITY != `NO_PARITY)
426416 begin
427417 tx_bit_counter <= tx_bit_counter + 1 ;
418+ if (tx_bit_counter == 1 )
419+ begin
420+ if (DEFAULT_PARITY == `EVEN_PARITY)
421+ tx <= tx_data_parity == 1'b0 ? 1'b0 : 1'b1 ;
422+ if (DEFAULT_PARITY == `ODD_PARITY)
423+ tx <= tx_data_parity == 1'b0 ? 1'b1 : 1'b0 ;
424+ end
428425 if (tx_bit_counter == TICKS_PER_UART_BIT)
429426 begin
430427 tx_bit_counter <= 0 ;
You can’t perform that action at this time.
0 commit comments