Loading simulator…
1. Existing Template Logic
The predefined circuit already selects the start bit at count 0000 and D0 through D7 at counts 0001 through 1000.
Its fault is that count 1001 always follows the parity path and the completion logic always waits for count 1010.
This works only for parity-enabled frames.
2. Count-1001 Output Selection
Add a 2:1 MUX controlled by Parity_Enable. When parity is enabled, count 1001 outputs Parity.
When parity is disabled, the same count outputs logic 1, making it the stop bit.
The selection is
Count_9_Output = Parity_Enable·Parity + Parity_Enable'·1.
3. Final-Count Selection
Decode the two possible final positions with Count_9 = (Frame_Count = 1001) and Count_10 = (Frame_Count = 1010).
Select the correct final position using
Final_Count = Parity_Enable·Count_10 + Parity_Enable'·Count_9
This change makes count 1010 the final position only for parity-enabled frames.
For parity-disabled frames, count 1001 becomes both the stop-bit position and the final position.
4. Completion and Restart Logic
Replace the template's fixed count-1010 completion condition with Final_Count.
The existing completion/restart block must wait for the next complete Baud_Tick interval while Final_Count is active before asserting TX_Complete.
This preserves the full stop-bit duration in both parity modes.
The digital input nRESET remains connected to the active-LOW asynchronous reset inputs of the frame counter and completion-control flip-flops so the circuit initializes deterministically.