OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [rtl/] [ao486/] [autogen/] [exception.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
//======================================================== conditions
2
wire cond_0 = exception_init || wr_debug_init;
3
wire cond_1 = ~(class_trap) && ~(class_abort);
4
wire cond_2 = wr_is_esp_speculative;
5
wire cond_3 = vector != `EXCEPTION_DB;
6
wire cond_4 = vector == `EXCEPTION_DB;
7
wire cond_5 = wr_debug_init && ~(wr_string_in_progress_final);
8
wire cond_6 = wr_debug_init && wr_string_in_progress_final;
9
wire cond_7 = shutdown_start == `FALSE && count > 2'd0 && exception_type != `EXCEPTION_TYPE_DOUBLE_FAULT && (
10
        (last_type == `EXCEPTION_TYPE_CONTRIBUTORY && exception_type == `EXCEPTION_TYPE_CONTRIBUTORY) ||
11
        (last_type == `EXCEPTION_TYPE_PAGE_FAULT   && exception_type == `EXCEPTION_TYPE_CONTRIBUTORY) ||
12
        (last_type == `EXCEPTION_TYPE_PAGE_FAULT   && exception_type == `EXCEPTION_TYPE_PAGE_FAULT));
13
wire cond_8 = shutdown_start == `FALSE;
14
wire cond_9 = shutdown_start;
15
wire cond_10 = shutdown;
16
wire cond_11 = interrupt_done;
17
//======================================================== saves
18
wire  exc_soft_int_to_reg =
19
    (cond_0 && ~cond_7 && cond_8)? (    `FALSE) :
20
    (cond_11)? (    `FALSE) :
21
    exc_soft_int;
22
wire  exc_push_error_to_reg =
23
    (cond_0 && ~cond_7 && cond_8)? ( push_error) :
24
    (cond_11)? ( `FALSE) :
25
    exc_push_error;
26
wire [1:0] count_to_reg =
27
    (cond_0 && ~cond_7 && cond_8)? (     count + 2'd1) :
28
    count;
29
wire [31:0] exc_eip_to_reg =
30
    (cond_0 && ~cond_1)? ( trap_eip) :
31
    (cond_0 && cond_4 && cond_5)? ( wr_eip) :
32
    (cond_0 && cond_4 && cond_6)? ( exception_eip_from_wr) :
33
    (cond_11)? ( (interrupt_string_in_progress)? exception_eip_from_wr : wr_eip) :
34
    exc_eip;
35
wire  external_to_reg =
36
    (cond_0)? ( `TRUE) :
37
    (cond_11)? ( `TRUE) :
38
    external;
39
wire [1:0] last_type_to_reg =
40
    (cond_0 && ~cond_7 && cond_8)? ( exception_type) :
41
    last_type;
42
wire [8:0] exc_vector_full_to_reg =
43
    (cond_0 && cond_7)? ( { 1'b1, `EXCEPTION_DF }) :
44
    (cond_0 && ~cond_7 && cond_8)? ( { 1'b0, vector }) :
45
    (cond_0 && cond_9)? ( { 1'b0, vector }) :
46
    (cond_11)? ( { 1'b0, interrupt_vector }) :
47
    exc_vector_full;
48
wire [15:0] exc_error_code_to_reg =
49
    (cond_0 && cond_7)? ( 16'd0) :
50
    (cond_0 && ~cond_7 && cond_8)? ( error_code) :
51
    (cond_11)? ( 16'd0) :
52
    exc_error_code;
53
wire  exc_soft_int_ib_to_reg =
54
    (cond_0 && ~cond_7 && cond_8)? ( `FALSE) :
55
    (cond_11)? ( `FALSE) :
56
    exc_soft_int_ib;
57
wire  shutdown_to_reg =
58
    (cond_0 && cond_9)? ( `TRUE) :
59
    shutdown;
60
//======================================================== always
61
//======================================================== sets
62
assign exc_set_rflag =
63
    (cond_0 && cond_1 && cond_3)? (`TRUE) :
64
    1'd0;
65
assign exc_dec_reset =
66
    (cond_0)? (`TRUE) :
67
    (cond_10)? (`TRUE) :
68
    (cond_11)? (`TRUE) :
69
    1'd0;
70
assign exc_restore_esp =
71
    (cond_0 && cond_1 && cond_2)? (`TRUE) :
72
    1'd0;
73
assign exc_micro_reset =
74
    (cond_0)? (`TRUE) :
75
    (cond_10)? (`TRUE) :
76
    (cond_11)? (`TRUE) :
77
    1'd0;
78
assign exc_wr_reset =
79
    (cond_0)? (`TRUE) :
80
    (cond_10)? (`TRUE) :
81
    (cond_11)? (`TRUE) :
82
    1'd0;
83
assign exc_rd_reset =
84
    (cond_0)? (`TRUE) :
85
    (cond_10)? (`TRUE) :
86
    (cond_11)? (`TRUE) :
87
    1'd0;
88
assign exc_exe_reset =
89
    (cond_0)? (`TRUE) :
90
    (cond_10)? (`TRUE) :
91
    (cond_11)? (`TRUE) :
92
    1'd0;
93
assign exception_start =
94
    (cond_0 && ~cond_7 && cond_8)? (`TRUE) :
95
    1'd0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.