diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-06 15:16:13 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-06 15:18:47 -0600 |
| commit | beebe7c376b329ec5c084aedd6d726378d742a77 (patch) | |
| tree | ddbe6b626e59014bb5a1e896970802a0a18c5e51 /rtl/core/control/exception.sv | |
| parent | 5c73dd29b6629a37539ccb638a62d0a376f15bcb (diff) | |
Move exception logic out of control.sv
Diffstat (limited to '')
| -rw-r--r-- | rtl/core/control/exception.sv | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rtl/core/control/exception.sv b/rtl/core/control/exception.sv new file mode 100644 index 0000000..9a64cd5 --- /dev/null +++ b/rtl/core/control/exception.sv @@ -0,0 +1,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 |
