summaryrefslogtreecommitdiff
path: root/rtl/core/control/coproc.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-11-06 15:51:39 -0600
committerAlejandro Soto <alejandro@34project.org>2022-11-06 15:51:39 -0600
commit6e6e7a1add425af55f2f64f84cc312c231f9db45 (patch)
tree116eb40e037b54cf06f5c04b2205953c883a852b /rtl/core/control/coproc.sv
parent887d3872491fd80da9ec1c6963e5c2809fe3522c (diff)
Move CP15 logic out of control.sv
Diffstat (limited to 'rtl/core/control/coproc.sv')
-rw-r--r--rtl/core/control/coproc.sv22
1 files changed, 22 insertions, 0 deletions
diff --git a/rtl/core/control/coproc.sv b/rtl/core/control/coproc.sv
new file mode 100644
index 0000000..f0b4169
--- /dev/null
+++ b/rtl/core/control/coproc.sv
@@ -0,0 +1,22 @@
+`include "core/uarch.sv"
+
+module core_control_coproc
+(
+ input logic clk,
+
+ input datapath_decode dec,
+
+ input ctrl_cycle next_cycle,
+ input logic issue,
+
+ output logic coproc
+);
+
+ always_ff @(posedge clk)
+ if(next_cycle == ISSUE && issue)
+ coproc <= dec.coproc;
+
+ initial
+ coproc = 0;
+
+endmodule