add cpu::test::decode_and_run_single_insn and some formal tests of running PowerISA instructions #15
5 changed files with 17386 additions and 20519 deletions
|
|
@ -87,8 +87,11 @@ fn add_sub<C: Type + PhantomConstCpuConfig, SrcCount: KnownSize>(config: C) {
|
|||
connect(src1, src_values[1].int_fp);
|
||||
}
|
||||
#[hdl]
|
||||
let carry_in = wire();
|
||||
connect(carry_in, carry_in_before_inversion ^ invert_carry_in);
|
||||
let carry_in: UInt<1> = wire();
|
||||
connect(
|
||||
carry_in,
|
||||
(carry_in_before_inversion ^ invert_carry_in).cast_to_static::<UInt<1>>(),
|
||||
);
|
||||
#[hdl]
|
||||
let src0 = wire();
|
||||
connect(src0, src_values[0].int_fp);
|
||||
|
|
@ -104,7 +107,12 @@ fn add_sub<C: Type + PhantomConstCpuConfig, SrcCount: KnownSize>(config: C) {
|
|||
connect(pc_or_zero, pc);
|
||||
}
|
||||
let sum_of_sliced = |slice: RangeTo<usize>| {
|
||||
src0[slice] + src1[slice] + src_values[2].int_fp[slice] + pc_or_zero[slice] + imm[slice]
|
||||
src0[slice]
|
||||
+ src1[slice]
|
||||
+ src_values[2].int_fp[slice]
|
||||
+ pc_or_zero[slice]
|
||||
+ imm[slice]
|
||||
+ carry_in
|
||||
};
|
||||
#[hdl]
|
||||
let sum: UInt<64> = wire();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue