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

introduce clock_* and reset_* types #701

Merged

Conversation

taichi-ishitani
Copy link
Contributor

@taichi-ishitani taichi-ishitani commented May 7, 2024

Migration guide

Change type of clock and reset variables from logic to clock / reset.

  • From
module ModuleA (
    i_clk: input logic,
    i_rst: input logic,
) {}
  • To
module ModuleA (
    i_clk: input clock,
    i_rst: input reset,
) {}

Description

refs #622

This PR is to introduce special types below instead of posedge, negedge, async_high, async_low, sync_high and sync_low keywords.

  • clock
    • clock type of which polarity is specified by the build option
  • clock_posedge
    • clock type of which polarity is positive
  • clock_negedge
    • clock type of which polarity is negative
  • reset
    • reset type of which polarity and synchronicity are specified by the build option
  • reset_async_high
    • async/high active reset type
  • reset_async_low
    • async/low active reset type
  • reset_sync_high
    • sync/active high reset type
  • reset_sync_low
    • sync/active low reset type

The clock/reset type cast and port connection type check features (refs: #622 (comment)) are not implemented yet because the expression resolver is needed to implement these features.

@taichi-ishitani taichi-ishitani marked this pull request as ready for review May 8, 2024 06:00
@dalance dalance linked an issue May 8, 2024 that may be closed by this pull request
@dalance
Copy link
Collaborator

dalance commented May 8, 2024

Looks good!
I'll merge this PR and close #622.
Please open an issue for the remaining features like connection check.

@dalance dalance merged commit 5d8e4ba into veryl-lang:master May 8, 2024
6 checks passed
@taichi-ishitani taichi-ishitani deleted the introduce_clock_reset_types branch May 9, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Introduce clock/reset types
2 participants