summaryrefslogtreecommitdiff
path: root/rtl/smp/pe.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-11-15 19:10:34 -0600
committerAlejandro Soto <alejandro@34project.org>2023-11-16 16:43:59 -0600
commit87a42e555bf952047e287f4c7810cd538595d5af (patch)
treed08db58fc3484bae6d63e5b2d69e66bf8c11cf95 /rtl/smp/pe.sv
parentba803067cb54edece9ffa8b92f9bb97317d082e5 (diff)
rtl/smp: implement SMP dead/alive handling
Diffstat (limited to 'rtl/smp/pe.sv')
-rw-r--r--rtl/smp/pe.sv14
1 files changed, 10 insertions, 4 deletions
diff --git a/rtl/smp/pe.sv b/rtl/smp/pe.sv
index 212ce5a..5c675ee 100644
--- a/rtl/smp/pe.sv
+++ b/rtl/smp/pe.sv
@@ -8,7 +8,8 @@ module smp_pe
input logic[7:0] writedata,
output logic[7:0] readdata,
- input logic cpu_halted,
+ input logic cpu_alive,
+ cpu_halted,
breakpoint,
output logic halt,
@@ -22,11 +23,16 @@ module smp_pe
struct packed
{
- logic breakpoint, cpu_halted;
- } status;
+ logic alive, breakpoint, cpu_halted;
+ } status, status_out;
assign req = writedata[$bits(req) - 1:0];
- assign readdata = {{(8 - $bits(status)){1'b0}}, status};
+ assign readdata = {{(8 - $bits(status_out)){1'b0}}, status_out};
+
+ always_comb begin
+ status_out = status;
+ status_out.alive = cpu_alive;
+ end
always @(posedge clk or negedge rst_n)
if (!rst_n) begin