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

module core_control_exception
(
	input  logic clk,

	input  logic undefined,

	output word  vector,
	output logic exception
);

	logic high_vectors;
	logic[2:0] vector_offset;

	assign exception = undefined; //TODO
	assign high_vectors = 0; //TODO
	assign vector = {{16{high_vectors}}, 11'b0, vector_offset, 2'b00};

	always_comb
		vector_offset = 3'b001; //TODO

	//TODO: spsr_<mode> = cpsr
	//TODO: actualizar modo
	//TODO: deshabilitar IRQs/FIQs dependiendo de modo
	//TODO: Considerar que data abort usa + 8, no + 4

endmodule