Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case formatting improvement #586

Closed
dalance opened this issue Mar 21, 2024 · 0 comments · Fixed by #587
Closed

Case formatting improvement #586

dalance opened this issue Mar 21, 2024 · 0 comments · Fixed by #587

Comments

@dalance
Copy link
Collaborator

dalance commented Mar 21, 2024

Case formatting improvement suggested at #580.

    always_ff @ (posedge clock) begin
        case (state)
            rx_IDLE :  sample_counter <= CLOCKS_PER_BAUD / 2;
            rx_SHIFT:  if ((sample_counter > 0)) begin
                           sample_counter <= sample_counter - 1;
                       end else begin
                           sample_counter <= CLOCKS_PER_BAUD - 1;
                       end
            rx_LOAD:   sample_counter <= 0;
            rx_DONE:   sample_counter <= 0;
        endcase
    end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant