blob: 36e76dba46998f2fadfc095275625d1173f40d74 (
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
29
30
31
|
`include "core/uarch.sv"
`include "core/cp15/map.sv"
module core_cp15_far
(
input logic clk,
rst_n,
input logic load,
transfer,
input word write,
input logic fault_register,
input ptr fault_addr,
output word read /*verilator public*/
);
word far;
assign read = far;
always @(posedge clk or negedge rst_n)
if(!rst_n)
far <= 0;
else if(fault_register)
far <= {fault_addr, 2'b00};
else if(transfer && !load)
far <= write;
endmodule
|