Livt packages
Eccelerators.RiscV
Version 0.3.0
Composable RV32I and Zmmul processors, machine-mode support, and reusable FPGA system components written in Livt.
Published files (120)
- fixtures
- DelayedWordDevice.lvt
- PipelineFetchMemory.lvt
- PipelineWordDevice.lvt
- README.md
- Rv32BusCoreTest.lvt
- Rv32BusProtocolTest.lvt
- Rv32CsrEngineTest.lvt
- Rv32CsrRetirement.lvt
- Rv32DspControlTest.lvt
- Rv32DspEngineTest.lvt
- Rv32DspMultiplierTest.lvt
- Rv32DualReadDistributedTest.lvt
- Rv32DualReadRegisterBankTest.lvt
- Rv32ExternalInterruptTest.lvt
- Rv32FetchBusTest.lvt
- Rv32iConstantsTest.lvt
- Rv32iDecodeTest.lvt
- Rv32InterruptCsrTest.lvt
- Rv32iPackageApiTest.lvt
- Rv32iSemanticsTest.lvt
- Rv32IterativeMultiplierTest.lvt
- Rv32LoadStoreBusTest.lvt
- Rv32MachineCsrsTest.lvt
- Rv32MachineDecoderTest.lvt
- Rv32MultiplyRetirement.lvt
- Rv32MultiplyVectors.lvt
- Rv32PipelineControlTest.lvt
- Rv32PipelineCsrEngineTest.lvt
- Rv32PipelineDspEngineTest.lvt
- Rv32PipelineEngineTest.lvt
- Rv32PipelineExternalInterruptTest.lvt
- Rv32PipelineTimerInterruptTest.lvt
- Rv32PipelineTrapEngineTest.lvt
- Rv32PipelineZmmulEngineTest.lvt
- Rv32RegisterBankTest.lvt
- Rv32SequentialControlTest.lvt
- Rv32SequentialEngineTest.lvt
- Rv32TimerInterruptTest.lvt
- Rv32TrapEngineTest.lvt
- Rv32TrapPolicyTest.lvt
- Rv32ZicsrAccessTest.lvt
- Rv32ZicsrDecoderTest.lvt
- Rv32ZmmulControlTest.lvt
- Rv32ZmmulDecodeTest.lvt
- Rv32ZmmulEngineTest.lvt
- RvExternalInterruptsTest.lvt
- RvMachineSystemTest.lvt
- RvMachineTimerTest.lvt
- RvPipelineSystemTest.lvt
- RvSystemTest.lvt
- RvUartDeviceTest.lvt
- RvUartSystemTest.lvt
tests/Rv32MultiplyRetirement.lvt
namespace Eccelerators.RiscV.Tests
/**
* Independent straight-line architectural vector: operands are loaded with LUI/ADDI,
* then all Zmmul modes exercise destination aliases and x0. Final EBREAK does not retire.
* See fixtures/multiply-retirement.json for the complete expected trace.
*/
class Rv32MultiplyRetirement
{
// Instruction words and independently calculated architectural writes.
public const WORDS: uint[164] = [
0x000000b7, 0x00008093, 0x00000137, 0xfff10113,
0x022081b3, 0x000000b7, 0xfff08093, 0x00000137,
0xfff10113, 0x022080b3, 0x800000b7, 0x00008093,
0x00000137, 0xfff10113, 0x02208133, 0x800000b7,
0x00008093, 0x80000137, 0x00010113, 0x02208033,
0x800000b7, 0xfff08093, 0x80000137, 0x00010113,
0x022081b3, 0x000000b7, 0xfff08093, 0x80000137,
0xfff10113, 0x022080b3, 0x075bd0b7, 0xd1508093,
0x3ade7137, 0x8b110113, 0x02208133, 0xaaaab0b7,
0xaaa08093, 0x55555137, 0x55510113, 0x02208033,
0x000000b7, 0x00008093, 0x00000137, 0xfff10113,
0x022091b3, 0x000000b7, 0xfff08093, 0x00000137,
0xfff10113, 0x022090b3, 0x800000b7, 0x00008093,
0x00000137, 0xfff10113, 0x02209133, 0x800000b7,
0x00008093, 0x80000137, 0x00010113, 0x02209033,
0x800000b7, 0xfff08093, 0x80000137, 0x00010113,
0x022091b3, 0x000000b7, 0xfff08093, 0x80000137,
0xfff10113, 0x022090b3, 0x075bd0b7, 0xd1508093,
0x3ade7137, 0x8b110113, 0x02209133, 0xaaaab0b7,
0xaaa08093, 0x55555137, 0x55510113, 0x02209033,
0x000000b7, 0x00008093, 0x00000137, 0xfff10113,
0x0220a1b3, 0x000000b7, 0xfff08093, 0x00000137,
0xfff10113, 0x0220a0b3, 0x800000b7, 0x00008093,
0x00000137, 0xfff10113, 0x0220a133, 0x800000b7,
0x00008093, 0x80000137, 0x00010113, 0x0220a033,
0x800000b7, 0xfff08093, 0x80000137, 0x00010113,
0x0220a1b3, 0x000000b7, 0xfff08093, 0x80000137,
0xfff10113, 0x0220a0b3, 0x075bd0b7, 0xd1508093,
0x3ade7137, 0x8b110113, 0x0220a133, 0xaaaab0b7,
0xaaa08093, 0x55555137, 0x55510113, 0x0220a033,
0x000000b7, 0x00008093, 0x00000137, 0xfff10113,
0x0220b1b3, 0x000000b7, 0xfff08093, 0x00000137,
0xfff10113, 0x0220b0b3, 0x800000b7, 0x00008093,
0x00000137, 0xfff10113, 0x0220b133, 0x800000b7,
0x00008093, 0x80000137, 0x00010113, 0x0220b033,
0x800000b7, 0xfff08093, 0x80000137, 0x00010113,
0x0220b1b3, 0x000000b7, 0xfff08093, 0x80000137,
0xfff10113, 0x0220b0b3, 0x075bd0b7, 0xd1508093,
0x3ade7137, 0x8b110113, 0x0220b133, 0xaaaab0b7,
0xaaa08093, 0x55555137, 0x55510113, 0x0220b033,
0x02108233, 0x020082b3, 0x00000313, 0x00100073
]
// Expected destination index per retirement; zero denotes no register write.
public const DESTINATIONS: uint[163] = [
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000003, 0x00000001, 0x00000001, 0x00000002,
0x00000002, 0x00000001, 0x00000001, 0x00000001,
0x00000002, 0x00000002, 0x00000002, 0x00000001,
0x00000001, 0x00000002, 0x00000002, 0x00000000,
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000003, 0x00000001, 0x00000001, 0x00000002,
0x00000002, 0x00000001, 0x00000001, 0x00000001,
0x00000002, 0x00000002, 0x00000002, 0x00000001,
0x00000001, 0x00000002, 0x00000002, 0x00000000,
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000003, 0x00000001, 0x00000001, 0x00000002,
0x00000002, 0x00000001, 0x00000001, 0x00000001,
0x00000002, 0x00000002, 0x00000002, 0x00000001,
0x00000001, 0x00000002, 0x00000002, 0x00000000,
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000003, 0x00000001, 0x00000001, 0x00000002,
0x00000002, 0x00000001, 0x00000001, 0x00000001,
0x00000002, 0x00000002, 0x00000002, 0x00000001,
0x00000001, 0x00000002, 0x00000002, 0x00000000,
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000003, 0x00000001, 0x00000001, 0x00000002,
0x00000002, 0x00000001, 0x00000001, 0x00000001,
0x00000002, 0x00000002, 0x00000002, 0x00000001,
0x00000001, 0x00000002, 0x00000002, 0x00000000,
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000003, 0x00000001, 0x00000001, 0x00000002,
0x00000002, 0x00000001, 0x00000001, 0x00000001,
0x00000002, 0x00000002, 0x00000002, 0x00000001,
0x00000001, 0x00000002, 0x00000002, 0x00000000,
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000003, 0x00000001, 0x00000001, 0x00000002,
0x00000002, 0x00000001, 0x00000001, 0x00000001,
0x00000002, 0x00000002, 0x00000002, 0x00000001,
0x00000001, 0x00000002, 0x00000002, 0x00000000,
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000003, 0x00000001, 0x00000001, 0x00000002,
0x00000002, 0x00000001, 0x00000001, 0x00000001,
0x00000002, 0x00000002, 0x00000002, 0x00000001,
0x00000001, 0x00000002, 0x00000002, 0x00000000,
0x00000004, 0x00000005, 0x00000006
]
// Expected register-write value for each ordered retirement.
public const VALUES: uint[163] = [
0x00000000, 0x00000000, 0x00000000, 0xffffffff,
0x00000000, 0x00000000, 0xffffffff, 0x00000000,
0xffffffff, 0x00000001, 0x80000000, 0x80000000,
0x00000000, 0xffffffff, 0x80000000, 0x80000000,
0x80000000, 0x80000000, 0x80000000, 0x00000000,
0x80000000, 0x7fffffff, 0x80000000, 0x80000000,
0x80000000, 0x00000000, 0xffffffff, 0x80000000,
0x7fffffff, 0x80000001, 0x075bd000, 0x075bcd15,
0x3ade7000, 0x3ade68b1, 0xfbff5385, 0xaaaab000,
0xaaaaaaaa, 0x55555000, 0x55555555, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0xffffffff,
0x00000000, 0x00000000, 0xffffffff, 0x00000000,
0xffffffff, 0x00000000, 0x80000000, 0x80000000,
0x00000000, 0xffffffff, 0x00000000, 0x80000000,
0x80000000, 0x80000000, 0x80000000, 0x00000000,
0x80000000, 0x7fffffff, 0x80000000, 0x80000000,
0xc0000000, 0x00000000, 0xffffffff, 0x80000000,
0x7fffffff, 0xffffffff, 0x075bd000, 0x075bcd15,
0x3ade7000, 0x3ade68b1, 0x01b13114, 0xaaaab000,
0xaaaaaaaa, 0x55555000, 0x55555555, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0xffffffff,
0x00000000, 0x00000000, 0xffffffff, 0x00000000,
0xffffffff, 0xffffffff, 0x80000000, 0x80000000,
0x00000000, 0xffffffff, 0x80000000, 0x80000000,
0x80000000, 0x80000000, 0x80000000, 0x00000000,
0x80000000, 0x7fffffff, 0x80000000, 0x80000000,
0x3fffffff, 0x00000000, 0xffffffff, 0x80000000,
0x7fffffff, 0xffffffff, 0x075bd000, 0x075bcd15,
0x3ade7000, 0x3ade68b1, 0x01b13114, 0xaaaab000,
0xaaaaaaaa, 0x55555000, 0x55555555, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0xffffffff,
0x00000000, 0x00000000, 0xffffffff, 0x00000000,
0xffffffff, 0xfffffffe, 0x80000000, 0x80000000,
0x00000000, 0xffffffff, 0x7fffffff, 0x80000000,
0x80000000, 0x80000000, 0x80000000, 0x00000000,
0x80000000, 0x7fffffff, 0x80000000, 0x80000000,
0x3fffffff, 0x00000000, 0xffffffff, 0x80000000,
0x7fffffff, 0x7ffffffe, 0x075bd000, 0x075bcd15,
0x3ade7000, 0x3ade68b1, 0x01b13114, 0xaaaab000,
0xaaaaaaaa, 0x55555000, 0x55555555, 0x00000000,
0xe38e38e4, 0x00000000, 0x00000000
]
}