summaryrefslogtreecommitdiff
path: root/rtl/core/control/coproc.sv
blob: a457b0f45b5df562d6676c2d8b18efc113170408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
`include "core/uarch.sv"

module core_control_coproc
(
	input  logic       clk,
	                   rst_n,

	input  insn_decode dec,

	input  ctrl_cycle  next_cycle,
	input  logic       issue,

	output logic       coproc
);

	always_ff @(posedge clk or negedge rst_n)
		if(!rst_n)
			coproc <= 0;
		else if(next_cycle == ISSUE && issue)
			coproc <= dec.ctrl.coproc;

endmodule