-
Notifications
You must be signed in to change notification settings - Fork 804
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
[hw,prim alert,rtl] Add flop repeater for alert signals #26022
Open
Razer6
wants to merge
1
commit into
lowRISC:master
Choose a base branch
from
Razer6:alert-flop-repeater
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CAPI=2: | ||
# Copyright lowRISC contributors (OpenTitan project). | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: "lowrisc:prim:alert_repeater" | ||
description: "Flopped Alert repeater" | ||
filesets: | ||
files_rtl: | ||
depend: | ||
- lowrisc:prim:alert | ||
- lowrisc:prim:flop | ||
files: | ||
- rtl/prim_alert_repeater.sv | ||
file_type: systemVerilogSource | ||
|
||
files_verilator_waiver: | ||
depend: | ||
# common waivers | ||
- lowrisc:lint:common | ||
|
||
files_ascentlint_waiver: | ||
depend: | ||
# common waivers | ||
- lowrisc:lint:common | ||
|
||
files_veriblelint_waiver: | ||
depend: | ||
# common waivers | ||
- lowrisc:lint:common | ||
|
||
targets: | ||
default: | ||
filesets: | ||
- tool_verilator ? (files_verilator_waiver) | ||
- tool_ascentlint ? (files_ascentlint_waiver) | ||
- tool_veriblelint ? (files_veriblelint_waiver) | ||
- files_rtl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// Copyright lowRISC contributors (OpenTitan project). | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// Staged flop repeater to cut the crirtical path on alert signals when travelling | ||
// in the larger SoC. Both TX and RX are staged with a single flop stage. | ||
|
||
module prim_alert_repeater | ||
import prim_alert_pkg::*; | ||
( | ||
input clk_i, | ||
input rst_ni, | ||
// Input interface | ||
input prim_alert_pkg::alert_tx_t alert_tx_i | ||
output prim_alert_pkg::alert_rx_t alert_rx_o, | ||
// Flopped output interface | ||
output prim_alert_pkg::alert_tx_t alert_staged_tx_o, | ||
input prim_alert_pkg::alert_rx_t alert_staged_rx_i | ||
); | ||
prim_flop #( | ||
.ResetValue(0) | ||
) u_tx_p ( | ||
.clk_i, | ||
.rst_ni, | ||
.d_i (alert_tx_i.alert_p), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these need prim_sec_anchor_buf to protect from optimizations that eliminate the second wire, as in prim_alert_receiver? |
||
.q_o (alert_staged_tx_o.alert_p) | ||
); | ||
|
||
prim_flop #( | ||
.ResetValue(1) | ||
) u_tx_n ( | ||
.clk_i, | ||
.rst_ni, | ||
.d_i (alert_tx_i.alert_n), | ||
.q_o (alert_staged_tx_o.alert_n) | ||
); | ||
|
||
prim_flop #( | ||
.ResetValue(0) | ||
) u_rx_ping_p ( | ||
.clk_i, | ||
.rst_ni, | ||
.d_i (alert_staged_rx_i.ping_p), | ||
.q_o (alert_rx_o.ping_p) | ||
); | ||
|
||
prim_flop #( | ||
.ResetValue(1) | ||
) u_rx_ping_n ( | ||
.clk_i, | ||
.rst_ni, | ||
.d_i (alert_staged_rx_i.ping_n), | ||
.q_o (alert_rx_o.ping_n) | ||
); | ||
|
||
prim_flop #( | ||
.ResetValue(0) | ||
) u_rx_ack_p ( | ||
.clk_i, | ||
.rst_ni, | ||
.d_i (alert_staged_rx_i.ack_p), | ||
.q_o (alert_rx_o.ack_p) | ||
); | ||
|
||
prim_flop #( | ||
.ResetValue(1) | ||
) u_rx_ack_n ( | ||
.clk_i, | ||
.rst_ni, | ||
.d_i (alert_staged_rx_i.ack_n), | ||
.q_o (alert_rx_o.ack_n) | ||
); | ||
endmodule : prim_alert_repeater |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this module be generally discouraged for use with alerts on asynchronous clock domains? Given all the individual flops and the single domain used for both directions, the module doesn't give me the impression that it was intended for async use.