-
Notifications
You must be signed in to change notification settings - Fork 802
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
[pinmux/tops] Move JTAG mux logic into pinmux strap logic #5486
Conversation
7ee4aff
to
e91f9b0
Compare
b8ce7cd
to
5e05701
Compare
// TODO: this is currently not supported. | ||
// connect this to the correct pins once pinout is final and once the | ||
// verilator testbench supports DFT/Debug strap sampling. | ||
// See also #5221. |
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.
This is a temporary fix, and I believe it does not affect our CI at this point, since we're not using the JTAG DPI there.
The issue is that the JTAG signals are still mapped onto the SPI signals due to the FTDI chip being used on the nexysvideo board. So now that we move the JTAG mux into the pinmux, the verilator testbench does not have access to the JTAG signals at the top level anymore.
However, in the final ASIC pinout the JTAG will be mapped to a different location (just regular MIOs). Hence, once that new pinout is in, I will uncomment this and remap the JTAG signals appropriately.
3a24baf
to
8db9a89
Compare
Signed-off-by: Michael Schaffner <[email protected]>
Signed-off-by: Michael Schaffner <[email protected]>
b714afe
to
0d319c9
Compare
@@ -119,6 +115,11 @@ module pinmux_strap_sampling | |||
continue_sampling_d = lc_ctrl_pkg::On; | |||
end | |||
end | |||
// TODO: this can currently be overridden with a parameter for legacy reasons. |
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.
can you remind me why this has to be kept for now? is it because of fpga..?
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.
yes this is because FPGA and Verilator do not know anything about the discrete strap sampling event.
eventually this should be removed.
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.
i thought the discrete vs continuously sampling was mostly an internally controlled thing though
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.
it is meant to be internally controlled, that's right - however the continuous sampling mode is currently only available in the TEST life cycle states, and only activates if the straps are nonzero upon the first sample event.
at the moment, the FPGA tests run in DEV state and switch between JTAG and SPI at runtime, which would not be compatible with the internally timed, discrete strap sampling that is enabled in DEV.
assign tap_strap = tap_strap_t'(tap_strap_q); | ||
`ASSERT_KNOWN(TapStrapKnown_A, tap_strap) | ||
|
||
always_comb begin : p_tap_mux | ||
jtag_rsp = '0; | ||
// Note that this holds the JTAGs in reset |
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.
just to confirm, this is the area we discussed where after a change, we recommend the system level issue a jtag reset to make sure the switch didn't cause any issues right?
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.
yeah that's right!
k == TargetCfg.trst_idx || | ||
k == TargetCfg.tdi_idx || | ||
k == TargetCfg.tdo_idx) begin : gen_jtag_signal | ||
assign in_core_o[k] = (jtag_en) ? TargetCfg.tie_offs[k] : in_padring_i[k]; |
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.
is the idea here we want the pinmux side to see a fixed value when this pin is in use by jtag?
This is not a great example in this case..but you could technically imagine a case...where jtag might be used as a wakeup source (doesn't apply to us..so just humor me).
In that case, we probably would want the signal to feed through and actuate the downstream logic. Is there any harm in relying on downstream pinmux logic to just disable the input or maybe mux away? Maybe things are a bit more complicated if the backing pin is dedicated.
I dont think this is something that needs to be addressed in this PR yet, but might be worth filing an issue to look at waaaaaaaay 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.
Indeed, the pinmux side is tied off to a fixed value in this case.
However, what you mention regarding the wakeup detectors is already possible.
I.e., the wakeup taps are taken directly from the pad inputs, hence the JTAG mux does not affect them.
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.
ah excellent, if wakeups are handled, there really isn't much of a problem then.
@@ -204,7 +204,17 @@ | |||
}, | |||
], | |||
} | |||
|
|||
{ name: "rv_dm", |
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.
ah! glad someone one is using the "host" structure!
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.
we are only....a few PRs away from fully automating the host instantiation! probably another day...
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.
jep ;)
localparam logic [pinmux_pkg::NumIOs-1:0] TieOffValues = pinmux_pkg::NumIOs'(1'b1 << ( | ||
pinmux_reg_pkg::NMioPads + top_earlgrey_pkg::TopEarlgreyDioPinSpiDeviceCsb)); | ||
|
||
// DFT and Debug signal positions in the pinout. |
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.
do you think in the future it makes sense to generate this from the new pinmux parsing structure you had in mind? Maybe that's exactly where you're headed?
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.
this is exactly where I am headed - I just need a way to pass this in in a manual way for now
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.
LGTM with a few clarifying questions.
Signed-off-by: Michael Schaffner <[email protected]>
Signed-off-by: Michael Schaffner <[email protected]>
ahhh okay, the FPGA is in DEV state, that makes sense.
…On Wed, Mar 10, 2021 at 4:51 PM Michael Schaffner ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In hw/ip/pinmux/rtl/pinmux_strap_sampling.sv
<#5486 (comment)>:
> @@ -119,6 +115,11 @@ module pinmux_strap_sampling
continue_sampling_d = lc_ctrl_pkg::On;
end
end
+ // TODO: this can currently be overridden with a parameter for legacy reasons.
it is meant to be internally controlled, that's right - however the
continuous sampling mode is currently only available in the TEST life cycle
states, and only activates if the straps are nonzero upon the first sample
event.
at the moment, the FPGA tests run in DEV state and switch between JTAG and
SPI at runtime, which would not be compatible with the internally timed,
discrete strap sampling that is enabled in DEV.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#5486 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH2RSXHVF7R6IUISWV2LFDTDAAXZANCNFSM4YWGLG4Q>
.
|
The pads of the dedicated IOs and the capture trigger got accidentally disconnected with lowRISC#5486. Signed-off-by: Pirmin Vogel <[email protected]>
The pads of the dedicated IOs and the capture trigger got accidentally disconnected with #5486. Signed-off-by: Pirmin Vogel <[email protected]>
This is a continuation of the pinmux alignments tracked in #5221.
In particular, this moves moves the temporary JTAG mux logic into the pinmux, and removes the
jtag_mux
module, which was more sort of a helper for Bronze.This PR is still WIP - I will ping you once this is ready to review.