forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rv_dm,lc_ctrl,darjeeling] Convert DMI to real TL-UL interface
Change DMI implementation to TL-UL, and rework rv_dm and lc_ctrl to match. Ensure rv_dm continues to respond with zeroes when the DM is not present / inaccessible. Rewire JTAG to place lc_ctrl and rv_dm on the same TAP, and use dedicated DIOs for JTAG at the top. Generate a RAL model for the new TL-UL interconnect, and use it in DV. Also fix up macro names in software for the new lc_ctrl named register interfaces. Finally, eliminate the TAP and DFT straps and related tests, as they are now unused. rv_dm is located at address 0 in the map. This is required by the RISC-V Debug specification, as it is the first Debug Module. If other Debug Modules are to be used, they could be placed elsewhere on the TL-UL network, and the nextdm CSR for the first DM would point to the base address of the next. lc_ctrl is currently located at 0x20000 in the map. This may be changed to match data sheet and/or flexibility preferences. This address currently must be hard-coded (or chained to the number of DMI abits), as there is no method specified for probing this address. Only the IDCODE and what can be read from the DTMCS register are currently usable keys for finding out the DMI addresses. Alternative mechanisms are left for future discussions. Signed-off-by: Alexander Williams <awill@opentitan.org> Co-authored-by: Michael Schaffner <msf@opentitan.org>
- Loading branch information
1 parent
109afef
commit 87d5764
Showing
82 changed files
with
1,410 additions
and
1,459 deletions.
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
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
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
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
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
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,66 @@ | ||
// Copyright lowRISC contributors. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// Register Top module auto-generated by `reggen` | ||
|
||
`include "prim_assert.sv" | ||
|
||
module lc_ctrl_dmi_reg_top ( | ||
input clk_i, | ||
input rst_ni, | ||
input tlul_pkg::tl_h2d_t tl_i, | ||
output tlul_pkg::tl_d2h_t tl_o, | ||
|
||
// Output port for window | ||
output tlul_pkg::tl_h2d_t tl_win_o, | ||
input tlul_pkg::tl_d2h_t tl_win_i, | ||
|
||
// To HW | ||
|
||
// Integrity check errors | ||
output logic intg_err_o, | ||
|
||
// Config | ||
input devmode_i // If 1, explicit error return for unmapped register access | ||
); | ||
|
||
import lc_ctrl_reg_pkg::* ; | ||
|
||
|
||
// Add an unloaded flop to make use of clock / reset | ||
// This is done to specifically address lint complaints of unused clocks/resets | ||
// Since the flop is unloaded it will be removed during synthesis | ||
logic unused_reg; | ||
always_ff @(posedge clk_i or negedge rst_ni) begin | ||
if (!rst_ni) begin | ||
unused_reg <= '0; | ||
end else begin | ||
unused_reg <= tl_i.a_valid; | ||
end | ||
end | ||
|
||
|
||
|
||
// Since there are no registers in this block, commands are routed through to windows which | ||
// can report their own integrity errors. | ||
assign intg_err_o = 1'b0; | ||
|
||
// outgoing integrity generation | ||
tlul_pkg::tl_d2h_t tl_o_pre; | ||
tlul_rsp_intg_gen #( | ||
.EnableRspIntgGen(1), | ||
.EnableDataIntgGen(0) | ||
) u_rsp_intg_gen ( | ||
.tl_i(tl_o_pre), | ||
.tl_o(tl_o) | ||
); | ||
|
||
assign tl_win_o = tl_i; | ||
assign tl_o_pre = tl_win_i; | ||
|
||
// Unused signal tieoff | ||
// devmode_i is not used if there are no registers | ||
logic unused_devmode; | ||
assign unused_devmode = ^devmode_i; | ||
endmodule |
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
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
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
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
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
Oops, something went wrong.