blob: 882d6f35243a04564e1f3cf62b0fb8e0bd5f6235 [file]
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
isa RiscVZvt {
namespace mpact::sim::riscv::zvt;
slots {
riscv_zvt;
}
}
// Zvtbase matrix configuration instructions (spec 15.1.1.4).
slot riscv_zvt {
includes {
#include "absl/functional/bind_front.h"
#include "riscv/riscv_i_instructions.h"
#include "riscv/riscv_zvt_instructions.h"
}
default size = 4;
default opcode =
disasm: "Illegal instruction at 0x%(@:08x)",
semfunc: "&::mpact::sim::riscv::RiscVIllegalInstruction";
opcodes {
msetmtype{: rs1, rs2 : },
disasm: "msetmtype", "%rs1, %rs2",
semfunc: "&::mpact::sim::riscv::RiscVZvtMsetMtype";
msetmtypei{: mtwiden, vsew, altfmt : },
disasm: "msetmtypei", "%mtwiden, %vsew, %altfmt",
semfunc: "&::mpact::sim::riscv::RiscVZvtMsetMtypei";
msettn{: rs1 : rd},
disasm: "msettn", "%rd, %rs1",
semfunc: "&::mpact::sim::riscv::RiscVZvtMsetTn";
msettm{: rs1 : rd},
disasm: "msettm", "%rd, %rs1",
semfunc: "&::mpact::sim::riscv::RiscVZvtMsetTm";
msettk{: rs1 : rd},
disasm: "msettk", "%rd, %rs1",
semfunc: "&::mpact::sim::riscv::RiscVZvtMsetTk";
// Tile manipulation.
vtzero{: mtile : },
disasm: "vtzero", "%mtile",
semfunc: "&::mpact::sim::riscv::RiscVZvtVtZero";
vtdiscard{: : },
disasm: "vtdiscard",
semfunc: "&::mpact::sim::riscv::RiscVZvtVtDiscard";
vtmv_v_t{: rs1 : matVd},
disasm: "vtmv.v.t", "%matVd, %rs1",
semfunc: "&::mpact::sim::riscv::RiscVZvtVtmvVt";
vtmv_t_v{: matA, rs1 : },
disasm: "vtmv.t.v", "%rs1, %matA",
semfunc: "&::mpact::sim::riscv::RiscVZvtVtmvTv";
// Tile load/store to memory (EEW statically encoded).
vtle8{: rs1, rs2 : },
disasm: "vtle8", "%rs2, (%rs1)",
semfunc: "absl::bind_front(&::mpact::sim::riscv::RiscVZvtVtle, 8)";
vtle16{: rs1, rs2 : },
disasm: "vtle16", "%rs2, (%rs1)",
semfunc: "absl::bind_front(&::mpact::sim::riscv::RiscVZvtVtle, 16)";
vtle32{: rs1, rs2 : },
disasm: "vtle32", "%rs2, (%rs1)",
semfunc: "absl::bind_front(&::mpact::sim::riscv::RiscVZvtVtle, 32)";
vtle64{: rs1, rs2 : },
disasm: "vtle64", "%rs2, (%rs1)",
semfunc: "absl::bind_front(&::mpact::sim::riscv::RiscVZvtVtle, 64)";
vtse8{: rs1, rs2 : },
disasm: "vtse8", "%rs2, (%rs1)",
semfunc: "absl::bind_front(&::mpact::sim::riscv::RiscVZvtVtse, 8)";
vtse16{: rs1, rs2 : },
disasm: "vtse16", "%rs2, (%rs1)",
semfunc: "absl::bind_front(&::mpact::sim::riscv::RiscVZvtVtse, 16)";
vtse32{: rs1, rs2 : },
disasm: "vtse32", "%rs2, (%rs1)",
semfunc: "absl::bind_front(&::mpact::sim::riscv::RiscVZvtVtse, 32)";
vtse64{: rs1, rs2 : },
disasm: "vtse64", "%rs2, (%rs1)",
semfunc: "absl::bind_front(&::mpact::sim::riscv::RiscVZvtVtse, 64)";
// Matrix multiply: C += A^T * B.
vtmms_tvv{: matA, matB, mtile, vs2_idx, vs1_idx : },
disasm: "vtmms.tvv", "%mtile, %matA, %matB",
semfunc: "&::mpact::sim::riscv::RiscVZvtVtmms";
vtmmu_tvv{: matA, matB, mtile, vs2_idx, vs1_idx : },
disasm: "vtmmu.tvv", "%mtile, %matA, %matB",
semfunc: "&::mpact::sim::riscv::RiscVZvtVtmmu";
vtfmm_tvv{: matA, matB, mtile, vs2_idx, vs1_idx : fflags},
disasm: "vtfmm.tvv", "%mtile, %matA, %matB",
semfunc: "&::mpact::sim::riscv::RiscVZvtVtfmm";
vtfmm_alt_tvv{: matA, matB, mtile, vs2_idx, vs1_idx : fflags},
disasm: "vtfmm.alt.tvv", "%mtile, %matA, %matB",
semfunc: "&::mpact::sim::riscv::RiscVZvtVtfmmAlt";
}
}