Skip to content

Commit

Permalink
[ibex] Add reset bypass controls
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Chen <[email protected]>
  • Loading branch information
Timothy Chen authored and tomeroberts committed Apr 21, 2021
1 parent 6c04708 commit 33cca5e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
7 changes: 6 additions & 1 deletion doc/02_user/integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Instantiation Template
.clk_i (),
.rst_ni (),
.test_en_i (),
.scan_rst_ni (),
.ram_cfg_i (),
// Configuration
Expand Down Expand Up @@ -160,7 +161,11 @@ Interfaces
+-------------------------+-------------------------+-----+----------------------------------------+
| ``rst_ni`` | 1 | in | Active-low asynchronous reset |
+-------------------------+-------------------------+-----+----------------------------------------+
| ``test_en_i`` | 1 | in | Test input, enables clock |
| ``test_en_i`` | 1 | in | Test input, enables clock and allows |
| | | | test control of reset. |
+-------------------------+-------------------------+-----+----------------------------------------+
| ``scan_rst_ni`` | 1 | in | Test controlled reset. If DFT not |
| | | | used, tie off to 0. |
+-------------------------+-------------------------+-----+----------------------------------------+
| ``ram_cfg_i`` | 10 | in | RAM configuration inputs, routed to |
| | | | the icache RAMs |
Expand Down
6 changes: 4 additions & 2 deletions rtl/ibex_lockstep.sv
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ module ibex_lockstep import ibex_pkg::*; #(

output logic alert_minor_o,
output logic alert_major_o,
input logic core_busy_i
input logic core_busy_i,
input logic test_en_i,
input logic scan_rst_ni
);

localparam int unsigned LockstepOffsetW = $clog2(LockstepOffset);
Expand Down Expand Up @@ -118,7 +120,7 @@ module ibex_lockstep import ibex_pkg::*; #(
end
end

assign rst_shadow_n = rst_shadow_set_q;
assign rst_shadow_n = test_en_i ? scan_rst_ni : rst_shadow_set_q;

//////////////////
// Input delays //
Expand Down
11 changes: 9 additions & 2 deletions rtl/ibex_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ module ibex_top #(
input logic fetch_enable_i,
output logic alert_minor_o,
output logic alert_major_o,
output logic core_sleep_o
output logic core_sleep_o,

// DFT bypass controls
input logic scan_rst_ni
);

import ibex_pkg::*;
Expand Down Expand Up @@ -716,7 +719,9 @@ module ibex_top #(

.alert_minor_o (lockstep_alert_minor_local),
.alert_major_o (lockstep_alert_major_local),
.core_busy_i (core_busy_local)
.core_busy_i (core_busy_local),
.test_en_i (test_en_i),
.scan_rst_ni (scan_rst_ni)
);

// Manually buffer the output signals.
Expand All @@ -733,6 +738,8 @@ module ibex_top #(
end else begin : gen_no_lockstep
assign lockstep_alert_major = 1'b0;
assign lockstep_alert_minor = 1'b0;
logic unused_scan;
assign unused_scan = scan_rst_ni;
end

// TODO - need a config to reset all registers before the lockstep alert can be used
Expand Down
1 change: 1 addition & 0 deletions rtl/ibex_top_tracing.sv
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ module ibex_top_tracing #(
.rst_ni,

.test_en_i,
.scan_rst_ni('0),
.ram_cfg_i,

.hart_id_i,
Expand Down

0 comments on commit 33cca5e

Please sign in to comment.