Add core_sleep_o to ibex interface

Signals the core is totally idle (WFI with no outstanding memory
transactions).  Fixes #258
This commit is contained in:
Greg Chadwick 2019-09-05 12:56:57 +01:00
parent 36db104160
commit bec84ca2b1
6 changed files with 21 additions and 8 deletions

View file

@ -60,8 +60,9 @@ Instantiation Template
// Debug interface
.debug_req_i (),
// Special control signal
.fetch_enable_i ()
// Special control signals
.fetch_enable_i (),
.core_sleep_o ()
);
Parameters
@ -118,3 +119,8 @@ Interfaces
+-------------------------+-------------------------+-----+----------------------------------------+
| ``fetch_enable_i`` | 1 | in | Enable the core, won't fetch when 0 |
+-------------------------+-------------------------+-----+----------------------------------------+
| ``core_sleep_o`` | 1 | out | Core in WFI with no outstanding data |
| | | | or instruction accesses. Deasserts |
| | | | if an external event (interrupt or |
| | | | debug req) wakes the core up |
+-------------------------+-------------------------+-----+----------------------------------------+

View file

@ -139,7 +139,8 @@ module ibex_riscv_compliance (
.debug_req_i ('b0),
.fetch_enable_i ('b1)
.fetch_enable_i ('b1),
.core_sleep_o ()
);
// SRAM block for instruction and data storage

View file

@ -78,7 +78,8 @@ module top_artya7_100 (
.debug_req_i ('b0),
.fetch_enable_i ('b1)
.fetch_enable_i ('b1),
.core_sleep_o ()
);
// Connect Ibex to SRAM

View file

@ -110,7 +110,8 @@ module ibex_tracing_tb;
.debug_req_i (1'b0),
// CPU Control Signals
.fetch_enable_i (1'b1)
.fetch_enable_i (1'b1),
.core_sleep_o ()
);
endmodule

View file

@ -87,8 +87,8 @@ module ibex_core #(
`endif
// CPU Control Signals
input logic fetch_enable_i
input logic fetch_enable_i,
output logic core_sleep_o
);
import ibex_pkg::*;
@ -272,6 +272,8 @@ module ibex_core #(
assign core_busy = core_ctrl_firstfetch ? 1'b1 : core_busy_q;
assign core_sleep_o = ~clock_en;
assign clock_en = core_busy | debug_req_i | irq_pending | irq_nm_i;
// main clock gate of the core

View file

@ -53,7 +53,8 @@ module ibex_core_tracing #(
input logic debug_req_i,
// CPU Control Signals
input logic fetch_enable_i
input logic fetch_enable_i,
output logic core_sleep_o
);
@ -150,6 +151,7 @@ module ibex_core_tracing #(
.rvfi_mem_wdata,
.fetch_enable_i
.core_sleep_o
);