New method 'debug_external_interrupt_req' to support emulation of a debug module starts at P3_Core interface and is plumbed all the way in to the CSR register MIP as interrupt [14]. The corresponding MIE[14] is always 1, so it is never masked. Still todo: should not be masked by MSTATUS interrupt-enables either. Also expanded interrupt-detection logic, mcause etc. to extend up to interrupt 14. Builds in standalone mode, runs ISA tests. Builds in src_SSITH_P3, generating RTL.
132 lines
3.8 KiB
Verilog
132 lines
3.8 KiB
Verilog
//
|
|
// Generated by Bluespec Compiler, version 2018.10.beta1 (build e1df8052c, 2018-10-17)
|
|
//
|
|
//
|
|
//
|
|
//
|
|
// Ports:
|
|
// Name I/O size props
|
|
// basicExec O 322
|
|
// basicExec_dInst I 72
|
|
// basicExec_rVal1 I 64
|
|
// basicExec_rVal2 I 64
|
|
// basicExec_pc I 64
|
|
// basicExec_ppc I 64
|
|
//
|
|
// Combinational paths from inputs to outputs:
|
|
// (basicExec_dInst,
|
|
// basicExec_rVal1,
|
|
// basicExec_rVal2,
|
|
// basicExec_pc,
|
|
// basicExec_ppc) -> basicExec
|
|
//
|
|
//
|
|
|
|
`ifdef BSV_ASSIGNMENT_DELAY
|
|
`else
|
|
`define BSV_ASSIGNMENT_DELAY
|
|
`endif
|
|
|
|
`ifdef BSV_POSITIVE_RESET
|
|
`define BSV_RESET_VALUE 1'b1
|
|
`define BSV_RESET_EDGE posedge
|
|
`else
|
|
`define BSV_RESET_VALUE 1'b0
|
|
`define BSV_RESET_EDGE negedge
|
|
`endif
|
|
|
|
module module_basicExec(basicExec_dInst,
|
|
basicExec_rVal1,
|
|
basicExec_rVal2,
|
|
basicExec_pc,
|
|
basicExec_ppc,
|
|
basicExec);
|
|
// value method basicExec
|
|
input [71 : 0] basicExec_dInst;
|
|
input [63 : 0] basicExec_rVal1;
|
|
input [63 : 0] basicExec_rVal2;
|
|
input [63 : 0] basicExec_pc;
|
|
input [63 : 0] basicExec_ppc;
|
|
output [321 : 0] basicExec;
|
|
|
|
// signals for module outputs
|
|
wire [321 : 0] basicExec;
|
|
|
|
// remaining internal signals
|
|
reg [63 : 0] x__h23, x__h263;
|
|
wire [193 : 0] IF_basicExec_dInst_BITS_71_TO_67_EQ_4_8_OR_bas_ETC___d43;
|
|
wire [63 : 0] SEXT_basicExec_dInst_BITS_31_TO_0_3___d14,
|
|
aluVal2__h33,
|
|
alu_result__h35,
|
|
basicExec_pc_PLUS_4___d10,
|
|
cf_nextPc__h294;
|
|
wire [31 : 0] basicExec_dInst_BITS_31_TO_0__q1;
|
|
wire aluBr___d37;
|
|
|
|
// value method basicExec
|
|
assign basicExec =
|
|
{ x__h23,
|
|
alu_result__h35,
|
|
IF_basicExec_dInst_BITS_71_TO_67_EQ_4_8_OR_bas_ETC___d43 } ;
|
|
|
|
// remaining internal signals
|
|
module_alu instance_alu_1(.alu_a(basicExec_rVal1),
|
|
.alu_b(aluVal2__h33),
|
|
.alu_func((basicExec_dInst[66:64] == 3'd0) ?
|
|
basicExec_dInst[50:46] :
|
|
5'd0),
|
|
.alu(alu_result__h35));
|
|
module_aluBr instance_aluBr_0(.aluBr_a(basicExec_rVal1),
|
|
.aluBr_b(basicExec_rVal2),
|
|
.aluBr_brFunc((basicExec_dInst[66:64] ==
|
|
3'd1) ?
|
|
basicExec_dInst[48:46] :
|
|
3'd7),
|
|
.aluBr(aluBr___d37));
|
|
module_brAddrCalc instance_brAddrCalc_2(.brAddrCalc_pc(basicExec_pc),
|
|
.brAddrCalc_val(basicExec_rVal1),
|
|
.brAddrCalc_iType(basicExec_dInst[71:67]),
|
|
.brAddrCalc_imm(SEXT_basicExec_dInst_BITS_31_TO_0_3___d14),
|
|
.brAddrCalc_taken(aluBr___d37),
|
|
.brAddrCalc(cf_nextPc__h294));
|
|
assign IF_basicExec_dInst_BITS_71_TO_67_EQ_4_8_OR_bas_ETC___d43 =
|
|
{ x__h263,
|
|
basicExec_pc,
|
|
cf_nextPc__h294,
|
|
aluBr___d37,
|
|
cf_nextPc__h294 != basicExec_ppc } ;
|
|
assign SEXT_basicExec_dInst_BITS_31_TO_0_3___d14 =
|
|
{ {32{basicExec_dInst_BITS_31_TO_0__q1[31]}},
|
|
basicExec_dInst_BITS_31_TO_0__q1 } ;
|
|
assign aluVal2__h33 =
|
|
basicExec_dInst[32] ?
|
|
SEXT_basicExec_dInst_BITS_31_TO_0_3___d14 :
|
|
basicExec_rVal2 ;
|
|
assign basicExec_dInst_BITS_31_TO_0__q1 = basicExec_dInst[31:0] ;
|
|
assign basicExec_pc_PLUS_4___d10 = basicExec_pc + 64'd4 ;
|
|
always@(basicExec_dInst or
|
|
alu_result__h35 or
|
|
basicExec_rVal2 or
|
|
basicExec_pc_PLUS_4___d10 or
|
|
basicExec_pc or
|
|
SEXT_basicExec_dInst_BITS_31_TO_0_3___d14 or basicExec_rVal1)
|
|
begin
|
|
case (basicExec_dInst[71:67])
|
|
5'd2, 5'd5, 5'd7: x__h23 = basicExec_rVal2;
|
|
5'd8, 5'd9: x__h23 = basicExec_pc_PLUS_4___d10;
|
|
5'd11:
|
|
x__h23 = basicExec_pc + SEXT_basicExec_dInst_BITS_31_TO_0_3___d14;
|
|
5'd13: x__h23 = basicExec_rVal1;
|
|
default: x__h23 = alu_result__h35;
|
|
endcase
|
|
end
|
|
always@(basicExec_dInst or cf_nextPc__h294 or alu_result__h35)
|
|
begin
|
|
case (basicExec_dInst[71:67])
|
|
5'd2, 5'd4, 5'd5, 5'd6, 5'd7: x__h263 = alu_result__h35;
|
|
default: x__h263 = cf_nextPc__h294;
|
|
endcase
|
|
end
|
|
endmodule // module_basicExec
|
|
|