Decode instruction and addressing mode. More...
Inputs | |
clock | |
reset_n | |
supervisor | |
ir | [15:0] |
ea_type | [3:0] |
ea_mod | [2:0] |
ea_reg | [2:0] |
Outputs | |
decoder_trap | [7:0] |
decoder_micropc | [8:0] |
decoder_alu | [17:0] |
save_ea | [8:0] |
perform_ea_write | [8:0] |
perform_ea_read | [8:0] |
load_ea | [8:0] |
Parameters | |
NO_TRAP | [7:0] 8'd0 |
ILLEGAL_INSTRUCTION_TRAP | 8'd4 |
PRIVILEGE_VIOLATION_TRAP | 8'd8 |
ILLEGAL_1010_INSTRUCTION_TRAP | 8'd10 |
ILLEGAL_1111_INSTRUCTION_TRAP | 8'd11 |
UNUSED_MICROPC | [8:0] 9'd0 |
Decode instruction and addressing mode.
The decoder is an instruction and addressing mode decoder. For instructions it takes as input the ir register from the registers module. The output of the decoder, in this case, is a microcode address of the first microcode word that performs the instruction.
In case of addressing mode decoding, the output is the address of the first microcode word that performs the operand loading or saving. This address is obtained from the currently selected addressing mode saved in the ea_mod and ea_type registers in the registers module.
Definition at line 2159 of file ao68000.v.
supervisor [Input] |
decoder_trap [7:0] [Output] |
decoder_micropc [8:0] [Output] |
decoder_alu [17:0] [Output] |
perform_ea_write [8:0] [Output] |
perform_ea_read [8:0] [Output] |
ILLEGAL_INSTRUCTION_TRAP 8'd4 [Parameter] |
PRIVILEGE_VIOLATION_TRAP 8'd8 [Parameter] |
ILLEGAL_1010_INSTRUCTION_TRAP 8'd10 [Parameter] |
ILLEGAL_1111_INSTRUCTION_TRAP 8'd11 [Parameter] |
UNUSED_MICROPC [8:0] 9'd0 [Parameter] |