implement vmv in pim-simulator
Validate Operations / validate-operations (push) Has been cancelled

fix offset selection implementation to match the pim isa
automatic code format for pim-simulator
This commit is contained in:
NiccoloN
2026-07-31 17:24:19 +02:00
parent a0131c6f7a
commit 9ca1a0ed9f
23 changed files with 584 additions and 497 deletions
@@ -7,26 +7,17 @@ use pimcore::{
},
};
#[test]
#[should_panic(expected = "Function not found for the requested size") ]
#[should_panic(expected = "Function not found for the requested size")]
fn wrong_size_place_holder() {
let cpu = common::empty_cpu(0);
let mut inst_builder = InstructionsBuilder::new();
let mut idata_build = InstructionDataBuilder::new();
idata_build.set_core_indx(0).fix_core_indx();
inst_builder.make_inst(
setbw,
idata_build
.set_ibiw_obiw(55, 55)
.build(),
);
inst_builder.make_inst(setbw, idata_build.set_ibiw_obiw(55, 55).build());
inst_builder.make_inst(
vvadd,
idata_build
.set_rdr1r2(3, 1, 2)
.set_imm_len(8)
.build(),
idata_build.set_rdr1r2(3, 1, 2).set_imm_len(8).build(),
);
let core_instruction = vec![inst_builder.build().into()];
let mut executable = Executable::new(cpu, core_instruction);
@@ -39,97 +30,88 @@ fn unsupported_8_bit_vectors_do_not_alias_f32() {
let mut inst_builder = InstructionsBuilder::new();
let mut idata_build = InstructionDataBuilder::new();
idata_build.set_core_indx(0).fix_core_indx();
inst_builder.make_inst(
setbw,
idata_build.set_ibiw_obiw(8, 8).build(),
);
inst_builder.make_inst(setbw, idata_build.set_ibiw_obiw(8, 8).build());
inst_builder.make_inst(
vvadd,
idata_build
.set_rdr1r2(3, 1, 2)
.set_imm_len(8)
.build(),
idata_build.set_rdr1r2(3, 1, 2).set_imm_len(8).build(),
);
}
fn place_holder(inst : InstructionType) {
fn place_holder(inst: InstructionType) {
let mut cpu = common::empty_cpu(0);
let mut idata_build = InstructionDataBuilder::new();
idata_build.set_core_indx(0).fix_core_indx();
inst(&mut cpu, idata_build.build()).unwrap();
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vvadd_placeholder() {
place_holder(vvadd);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vvsub_placeholder() {
place_holder(vvsub);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vvmul_placeholder() {
place_holder(vvmul);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vvdmul_placeholder() {
place_holder(vvdmul);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vvmax_placeholder() {
place_holder(vvmax);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vavg_placeholder() {
place_holder(vavg);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vrelu_placeholder() {
place_holder(vrelu);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vtanh_placeholder() {
place_holder(vtanh);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn vsigm_placeholder() {
place_holder(vsigm);
}
#[test]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version") ]
#[should_panic(expected = "You are calling a placeholder, the real call is the generic version")]
fn mvmul_placeholder() {
place_holder(mvmul);
}
#[test]
#[should_panic ]
#[should_panic]
fn vvsll_why_inst() {
place_holder(vvsll);
}
#[test]
#[should_panic ]
#[should_panic]
fn vvsra_why_inst() {
place_holder(vvsra);
}