Line 1... |
Line 1... |
// ============================================================================
|
// ============================================================================
|
// __
|
// __
|
// \\__/ o\ (C) 2017-2018 Robert Finch, Waterloo
|
// \\__/ o\ (C) 2017-2019 Robert Finch, Waterloo
|
// \ __ / All rights reserved.
|
// \ __ / All rights reserved.
|
// \/_// robfinch<remove>@finitron.ca
|
// \/_// robfinch<remove>@finitron.ca
|
// ||
|
// ||
|
//
|
//
|
// FT64_iexpander.v
|
// FT64_iexpander.v
|
Line 155... |
Line 155... |
expand[25:23] = 3'b011; // word size
|
expand[25:23] = 3'b011; // word size
|
expand[22:18] = fnRp({cinstr[9:8],cinstr[3]});
|
expand[22:18] = fnRp({cinstr[9:8],cinstr[3]});
|
expand[17:13] = fnRp(cinstr[2:0]);
|
expand[17:13] = fnRp(cinstr[2:0]);
|
expand[12:8] = fnRp(cinstr[2:0]);
|
expand[12:8] = fnRp(cinstr[2:0]);
|
expand[7:6] = 2'b10;
|
expand[7:6] = 2'b10;
|
expand[5:0] = 8'h02; // R2 instruction
|
expand[5:0] = 6'h02; // R2 instruction
|
end
|
end
|
2'd1: begin
|
2'd1: begin
|
expand[47:32] = 16'h0000;
|
expand[47:32] = 16'h0000;
|
expand[31:26] = `AND;
|
expand[31:26] = `AND;
|
expand[25:23] = 3'b011; // word size
|
expand[25:23] = 3'b011; // word size
|
expand[22:18] = fnRp({cinstr[9:8],cinstr[3]});
|
expand[22:18] = fnRp({cinstr[9:8],cinstr[3]});
|
expand[17:13] = fnRp(cinstr[2:0]);
|
expand[17:13] = fnRp(cinstr[2:0]);
|
expand[12:8] = fnRp(cinstr[2:0]);
|
expand[12:8] = fnRp(cinstr[2:0]);
|
expand[7:6] = 2'b10;
|
expand[7:6] = 2'b10;
|
expand[5:0] = 8'h02; // R2 instruction
|
expand[5:0] = 6'h02; // R2 instruction
|
end
|
end
|
2'd2: begin
|
2'd2: begin
|
expand[47:32] = 16'h0000;
|
expand[47:32] = 16'h0000;
|
expand[31:26] = `OR;
|
expand[31:26] = `OR;
|
expand[25:23] = 3'b011; // word size
|
expand[25:23] = 3'b011; // word size
|
expand[22:18] = fnRp({cinstr[9:8],cinstr[3]});
|
expand[22:18] = fnRp({cinstr[9:8],cinstr[3]});
|
expand[17:13] = fnRp(cinstr[2:0]);
|
expand[17:13] = fnRp(cinstr[2:0]);
|
expand[12:8] = fnRp(cinstr[2:0]);
|
expand[12:8] = fnRp(cinstr[2:0]);
|
expand[7:6] = 2'b10;
|
expand[7:6] = 2'b10;
|
expand[5:0] = 8'h02; // R2 instruction
|
expand[5:0] = 6'h02; // R2 instruction
|
end
|
end
|
2'd3: begin
|
2'd3: begin
|
expand[47:32] = 16'h0000;
|
expand[47:32] = 16'h0000;
|
expand[31:26] = `XOR;
|
expand[31:26] = `XOR;
|
expand[25:23] = 3'b011; // word size
|
expand[25:23] = 3'b011; // word size
|
expand[22:18] = fnRp({cinstr[9:8],cinstr[3]});
|
expand[22:18] = fnRp({cinstr[9:8],cinstr[3]});
|
expand[17:13] = fnRp(cinstr[2:0]);
|
expand[17:13] = fnRp(cinstr[2:0]);
|
expand[12:8] = fnRp(cinstr[2:0]);
|
expand[12:8] = fnRp(cinstr[2:0]);
|
expand[7:6] = 2'b10;
|
expand[7:6] = 2'b10;
|
expand[5:0] = 8'h02; // R2 instruction
|
expand[5:0] = 6'h02; // R2 instruction
|
end
|
end
|
endcase
|
endcase
|
endcase
|
endcase
|
5'b01110:
|
5'b01110:
|
begin
|
begin
|
expand[47:32] = 16'h0000;
|
expand[47:32] = 16'h0000;
|
expand[31:23] = {{1{cinstr[11]}},{cinstr[11:8],cinstr[5:2]}};
|
expand[31:23] = {{1{cinstr[11]}},{cinstr[11:8],cinstr[5:2]}};
|
expand[22:18] = 5'd0; // Rb = 0
|
expand[22:18] = 5'd0; // Rb = 0
|
expand[17:16] = cinstr[1:0];
|
expand[17:16] = cinstr[1:0];
|
expand[15:13] = 3'd0; // BEQ
|
expand[15:13] = 3'd0; // BEQ
|
expand[12:8] = 5'd0; // r0==r0
|
expand[12:8] = 5'd0; // Ra = r0
|
expand[7:6] = 2'b10;
|
expand[7:6] = 2'b10;
|
expand[5:0] = `Bcc; // 0x38
|
expand[5:0] = `Bcc; // 0x38
|
end
|
end
|
5'b10??0:
|
5'b10??0:
|
begin
|
begin
|