aboutsummaryrefslogtreecommitdiff
path: root/rtl/modexpng_uop_rom.v
blob: 016b1b038a8d79c1c3c5ca0f65dde2e6cfd6afe3 (plain) (blame)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
module modexpng_uop_rom
(
    clk,
    addr,
    data
);

    `include "modexpng_parameters.vh"
    `include "modexpng_microcode.vh"

    input  wire 	              clk;
    input  wire [UOP_ADDR_W -1:0] addr;
    output reg  [UOP_W      -1:0] data;    

    always @(posedge clk)
        //
        case (addr)
            6'd00:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_X,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_N,        BANK_WIDE_N,    BANK_DNC         }; //
            6'd01:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_Y,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_N,        BANK_WIDE_N,    BANK_DNC         }; //
            6'd02:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_X,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_X,        BANK_WIDE_A,    BANK_DNC         }; //
            6'd03:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_Y,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_Y,        BANK_WIDE_A,    BANK_DNC         }; //
            6'd04:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_X,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_M,        BANK_WIDE_E,    BANK_DNC         }; //
            6'd05:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_Y,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_M,        BANK_WIDE_E,    BANK_DNC         }; //
                                                                                                                                                                                         //
            6'd06:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_X,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_N_COEFF,  BANK_DNC,       BANK_NARROW_COEFF}; //
            6'd07:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_Y,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_N_COEFF,  BANK_DNC,       BANK_NARROW_COEFF}; //
            6'd08:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_X,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_N_FACTOR, BANK_DNC,       BANK_NARROW_A    }; //
            6'd09:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_Y,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_N_FACTOR, BANK_DNC,       BANK_NARROW_A    }; //
            6'd10:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_X,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_M,        BANK_DNC,       BANK_NARROW_E    }; //
            6'd11:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_Y,   UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_1_M,        BANK_DNC,       BANK_NARROW_E    }; //
                                                                                                                                                                                         //
            6'd12:   data <= {UOP_OPCODE_MODULAR_MULTIPLY,   UOP_CRT_DNC, UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_11,  BANK_WIDE_A, BANK_NARROW_A,      BANK_WIDE_B,    BANK_NARROW_B    }; //
            6'd13:   data <= {UOP_OPCODE_MODULAR_MULTIPLY,   UOP_CRT_DNC, UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_11,  BANK_WIDE_B, BANK_NARROW_B,      BANK_WIDE_C,    BANK_NARROW_C    }; //
            6'd14:   data <= {UOP_OPCODE_MODULAR_MULTIPLY,   UOP_CRT_DNC, UOP_NPQ_N,   UOP_AUX_2,   UOP_LADDER_11,  BANK_WIDE_C, BANK_DNC,           BANK_WIDE_D,    BANK_NARROW_D    }; //
                                                                                                                                                                                         //
            6'd15:   data <= {UOP_OPCODE_PROPAGATE_CARRIES,  UOP_CRT_DNC, UOP_NPQ_N,   UOP_AUX_DNC, UOP_LADDER_DNC, BANK_DNC,    BANK_NARROW_D,      BANK_DNC,       BANK_NARROW_D    }; //
                                                                                                                                                                                         //
            6'd16:   data <= {UOP_OPCODE_OUTPUT_FROM_NARROW, UOP_CRT_X,   UOP_NPQ_N,   UOP_AUX_DNC, UOP_LADDER_DNC, BANK_DNC,    BANK_NARROW_D,      BANK_DNC,       BANK_OUT_XM      }; //
            6'd17:   data <= {UOP_OPCODE_OUTPUT_FROM_NARROW, UOP_CRT_Y,   UOP_NPQ_N,   UOP_AUX_DNC, UOP_LADDER_DNC, BANK_DNC,    BANK_NARROW_D,      BANK_DNC,       BANK_OUT_YM      }; //
                                                                                                                                                                                         //            
            6'd18:   data <= {UOP_OPCODE_MODULAR_MULTIPLY,   UOP_CRT_DNC, UOP_NPQ_N,   UOP_AUX_1,   UOP_LADDER_11,  BANK_WIDE_E, BANK_NARROW_B,      BANK_WIDE_C,    BANK_NARROW_C    }; //
                                                                                                                                                                                         //
            6'd19:   data <= {UOP_OPCODE_PROPAGATE_CARRIES,  UOP_CRT_DNC, UOP_NPQ_N,   UOP_AUX_DNC, UOP_LADDER_DNC, BANK_DNC,    BANK_NARROW_C,      BANK_DNC,       BANK_NARROW_C    }; //
                                                                                                                                                                                         //            
            6'd20:   data <= {UOP_OPCODE_COPY_CRT_Y2X,       UOP_CRT_DNC, UOP_NPQ_N,   UOP_AUX_DNC, UOP_LADDER_DNC, BANK_WIDE_C, BANK_NARROW_C,      BANK_WIDE_C,    BANK_NARROW_C    }; //
                                                                                                                                                                                         //
            6'd21:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_X,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_P,        BANK_WIDE_N,    BANK_DNC         }; //
            6'd22:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_Y,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_Q,        BANK_WIDE_N,    BANK_DNC         }; //
            6'd23:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_X,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_P_FACTOR, BANK_WIDE_A,    BANK_DNC         }; //
            6'd24:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_Y,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_Q_FACTOR, BANK_WIDE_A,    BANK_DNC         }; //
            6'd25:   data <= {UOP_OPCODE_INPUT_TO_WIDE,      UOP_CRT_X,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_QINV,     BANK_WIDE_E,    BANK_DNC         }; //
                                                                                                                                                                                         //
            6'd26:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_X,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_P_COEFF,  BANK_DNC,       BANK_NARROW_COEFF}; //
            6'd27:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_Y,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_Q_COEFF,  BANK_DNC,       BANK_NARROW_COEFF}; //
            6'd28:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_X,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_P_FACTOR, BANK_DNC,       BANK_NARROW_A    }; //
            6'd29:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_Y,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_Q_FACTOR, BANK_DNC,       BANK_NARROW_A    }; //
            6'd30:   data <= {UOP_OPCODE_INPUT_TO_NARROW,    UOP_CRT_X,   UOP_NPQ_PQ,  UOP_AUX_2,   UOP_LADDER_DNC, BANK_DNC,    BANK_IN_2_QINV,     BANK_DNC,       BANK_NARROW_E    }; //
                                                                                                                                                                                         //
            default: data <= {UOP_OPCODE_STOP,               UOP_CRT_DNC, UOP_NPQ_DNC, UOP_AUX_DNC, UOP_LADDER_DNC, UOP_SEL_DNC_ALL                                                   }; //                                            
        endcase

endmodule