From adfc8a96e74b777be5ec08f2f3203c3bf7ede617 Mon Sep 17 00:00:00 2001 From: Isaac David Date: Sun, 10 Nov 2024 01:39:10 +0000 Subject: [PATCH] vfloat sequencing --- arches/isa_json/gen_uarch_rv64v_json.py | 198 ++++++- arches/isa_json/olympia_uarch_rv64v.json | 528 +++++++++--------- core/Dispatch.hpp | 9 +- core/InstArchInfo.cpp | 2 + core/InstArchInfo.hpp | 1 + .../core/vector/test_cores/test_big_core.yaml | 2 +- 6 files changed, 444 insertions(+), 296 deletions(-) diff --git a/arches/isa_json/gen_uarch_rv64v_json.py b/arches/isa_json/gen_uarch_rv64v_json.py index 7fabe099..741abac4 100755 --- a/arches/isa_json/gen_uarch_rv64v_json.py +++ b/arches/isa_json/gen_uarch_rv64v_json.py @@ -194,19 +194,19 @@ "vmv.v.i" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, # Vector Fixed-Point Arithmetic Instructions: Vector Single-Width Saturating Add and Subtract - "vsaddu.vv" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, - "vsaddu.vx" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, - "vsaddu.vi" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, + "vsaddu.vv" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, + "vsaddu.vx" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, + "vsaddu.vi" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, - "vsadd.vv" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, - "vsadd.vx" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, - "vsadd.vi" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, + "vsadd.vv" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, + "vsadd.vx" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, + "vsadd.vi" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, - "vssubu.vv" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, - "vssubu.vx" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, + "vssubu.vv" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, + "vssubu.vx" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, - "vssub.vv" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, - "vssub.vx" : {"pipe" : "vfixed", "uop_gen" : "ARITH", "latency" : 1}, + "vssub.vv" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, + "vssub.vx" : {"pipe" : "vint", "uop_gen" : "ARITH", "latency" : 1}, # TODO: Vector Fixed-Point Arithmetic Instructions: Vector Single-Width Averaging Add and Subtract # Vector Fixed-Point Arithmetic Instructions: Vector Single-Width Fractional Multiply with Rounding and Saturation @@ -217,24 +217,165 @@ # TODO: Vector Fixed-Point Arithmetic Instructions: Vector Narrowing Fixed-Point Clip Instructions # TODO: Vector Floating-Point Instructions: Vector Floating-Point Exception Flags -# TODO: Vector Floating-Point Instructions: Vector Single-Width Floating-Point Add/Subtract Instructions -# TODO: Vector Floating-Point Instructions: Vector Widening Floating-Point Add/Subtract Instructions -# TODO: Vector Floating-Point Instructions: Vector Single-Width Floating-Point Multiply/Divide Instructions -# TODO: Vector Floating-Point Instructions: Vector Widening Floating-Point Multiply -# TODO: Vector Floating-Point Instructions: Vector Single-Width Floating-Point Fused Multiply-Add Instructions -# TODO: Vector Floating-Point Instructions: Vector Widening Floating-Point Fused Multiply-Add Instructions -# TODO: Vector Floating-Point Instructions: Vector Floating-Point Square-Root Instruction -# TODO: Vector Floating-Point Instructions: Vector Floating-Point Reciprocal Square-Root Estimate Instruction -# TODO: Vector Floating-Point Instructions: Vector Floating-Point Reciprocal Estimate Instruction -# TODO: Vector Floating-Point Instructions: Vector Floating-Point MIN/MAX Instructions -# TODO: Vector Floating-Point Instructions: Vector Floating-Point Sign-Injection Instructions -# TODO: Vector Floating-Point Instructions: Vector Floating-Point Compare Instructions -# TODO: Vector Floating-Point Instructions: Vector Floating-Point Classify Instruction -# TODO: Vector Floating-Point Instructions: Vector Floating-Point Merge Instruction -# TODO: Vector Floating-Point Instructions: Vector Floating-Point Move Instruction -# TODO: Vector Floating-Point Instructions: Single-Width Floating-Point/Integer Type-Convert Instructions -# TODO: Vector Floating-Point Instructions: Widening Floating-Point/Integer Type-Convert Instructions -# TODO: Vector Floating-Point Instructions: Narrowing Floating-Point/Integer Type-Convert Instructions +# Vector Floating-Point Instructions: Vector Single-Width Floating-Point Add/Subtract Instructions + "vfadd.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfadd.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfsub.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfsub.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfrsub.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + +# Vector Floating-Point Instructions: Vector Widening Floating-Point Add/Subtract Instructions + "vfwadd.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwadd.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwsub.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwsub.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwadd.wv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwadd.wf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwsub.wv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwsub.wf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + +# Vector Floating-Point Instructions: Vector Single-Width Floating-Point Multiply/Divide Instructions + "vfmul.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfmul.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfdiv.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 25}, + "vfdiv.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 25}, + + "vfrdiv.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" :25}, + +# Vector Floating-Point Instructions: Vector Widening Floating-Point Multiply + "vfwmul.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + "vfwmul.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + +# Vector Floating-Point Instructions: Vector Single-Width Floating-Point Fused Multiply-Add Instructions + "vfmacc.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfmacc.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfnmacc.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfnmacc.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfmsac.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfmsac.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfnmsac.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfnmsac.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfmadd.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfmadd.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfnmadd.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfnmadd.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfmsub.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfmsub.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfnmsub.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfnmsub.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + +# Vector Floating-Point Instructions: Vector Widening Floating-Point Fused Multiply-Add Instructions + "vfwmacc.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwmacc.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwnmacc.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwnmacc.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwmsac.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwmsac.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwnmsac.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwnmsac.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + +# Vector Floating-Point Instructions: Vector Floating-Point Square-Root Instruction + "vfsqrt.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 25}, + +# TODO: support variable length latency +# Vector Floating-Point Instructions: Vector Floating-Point Reciprocal Square-Root Estimate Instruction + "vfrsqrt7.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + +# Vector Floating-Point Instructions: Vector Floating-Point Reciprocal Estimate Instruction + "vfrec7.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + +# Vector Floating-Point Instructions: Vector Floating-Point MIN/MAX Instructions + "vfmin.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + "vfmin.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + + "vfmax.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + "vfmax.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + +# Vector Floating-Point Instructions: Vector Floating-Point Sign-Injection Instructions + "vfsgnj.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + "vfsgnj.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + + "vfsgnjn.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + "vfsgnjn.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + + "vfsgnjx.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + "vfsgnjx.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + +# Vector Floating-Point Instructions: Vector Floating-Point Compare Instructions + "vmfeq.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + "vmfeq.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + + "vmfne.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + "vmfne.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + + "vmflt.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + "vmflt.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + + "vmfle.vv" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + "vmfle.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + + "vmfgt.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + + "vmfgte.vf" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 2}, + +# Vector Floating-Point Instructions: Vector Floating-Point Classify Instruction + "vfclass.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + +# Vector Floating-Point Instructions: Vector Floating-Point Merge Instruction + "vfmerge.vfm" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + +# Vector Floating-Point Instructions: Vector Floating-Point Move Instruction + "vfmv.v.f" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 1}, + +# Vector Floating-Point Instructions: Single-Width Floating-Point/Integer Type-Convert Instructions + "vfcvt.xu.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + "vfcvt.x.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + + "vfcvt.rtz.xu.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + "vfcvt.rtz.x.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + + "vfcvt.f.xu.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + "vfcvt.f.x.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + +# Vector Floating-Point Instructions: Widening Floating-Point/Integer Type-Convert Instructions + "vfwcvt.xu.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwcvt.x.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwcvt.rtz.xu.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwcvt.rtz.x.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwcvt.f.xu.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + "vfwcvt.f.xu.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + + "vfwcvt.f.f.v" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 6}, + +# Vector Floating-Point Instructions: Narrowing Floating-Point/Integer Type-Convert Instructions + "vfncvt.xu.f.w" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + "vfncvt.x.f.w" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + + "vfncvt.rtz.xu.f.w" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + "vfncvt.rtz.x.f.w" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + + "vfncvt.f.xu.w" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + "vfncvt.f.x.w" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + + "vfncvt.f.f.w" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, + "vfncvt.rod.f.f.w" : {"pipe" : "vfloat", "uop_gen" : "ARITH", "latency" : 3}, # TODO: Vector Reduction Operations: Vector Single-Width Integer Reduction Instructions # TODO: Vector Reduction Operations: Vector Widening Integer Reduction Instructions @@ -305,4 +446,3 @@ with open(JSON, "w") as f: print("Writing rv64v uarch json to "+JSON) json.dump(uarch_json, f, indent=4) - diff --git a/arches/isa_json/olympia_uarch_rv64v.json b/arches/isa_json/olympia_uarch_rv64v.json index c46ba06c..18fd9f22 100644 --- a/arches/isa_json/olympia_uarch_rv64v.json +++ b/arches/isa_json/olympia_uarch_rv64v.json @@ -133,69 +133,69 @@ }, { "mnemonic": "vfadd.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfadd.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfclass.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfcvt.f.x.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfcvt.f.xu.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfcvt.rtz.x.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfcvt.rtz.xu.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfcvt.x.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfcvt.xu.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfdiv.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 25 }, { "mnemonic": "vfdiv.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 25 }, { "mnemonic": "vfdot.vv", @@ -211,93 +211,93 @@ }, { "mnemonic": "vfmacc.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmacc.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmadd.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmadd.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmax.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfmax.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfmerge.vfm", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfmin.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfmin.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfmsac.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmsac.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmsub.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmsub.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmul.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmul.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfmv.f.s", @@ -313,69 +313,69 @@ }, { "mnemonic": "vfmv.v.f", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfncvt.f.f.w", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfncvt.f.x.w", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfncvt.f.xu.w", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfncvt.rod.f.f.w", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfncvt.rtz.x.f.w", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfncvt.rtz.xu.f.w", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfncvt.x.f.w", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfncvt.xu.f.w", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfnmacc.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfnmacc.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfnmadd.vf", @@ -385,45 +385,45 @@ }, { "mnemonic": "vfnmadd.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfnmsac.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfnmsac.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfnmsub.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfnmsub.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfrdiv.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 25 }, { "mnemonic": "vfrec7.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vfredmax.vs", @@ -451,51 +451,51 @@ }, { "mnemonic": "vfrsqrt7.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vfrsub.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfsgnj.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfsgnj.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfsgnjn.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfsgnjn.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfsgnjx.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfsgnjx.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 1 }, { "mnemonic": "vfslide1down.vf", @@ -511,51 +511,51 @@ }, { "mnemonic": "vfsqrt.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 25 }, { "mnemonic": "vfsub.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfsub.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwadd.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwadd.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwadd.wf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwadd.wv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwcvt.f.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwcvt.f.x.v", @@ -565,93 +565,93 @@ }, { "mnemonic": "vfwcvt.f.xu.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwcvt.rtz.x.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwcvt.rtz.xu.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwcvt.x.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwcvt.xu.f.v", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwmacc.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwmacc.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwmsac.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwmsac.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwmul.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfwmul.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 3 }, { "mnemonic": "vfwnmacc.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwnmacc.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwnmsac.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwnmsac.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwredosum.vs", @@ -667,27 +667,27 @@ }, { "mnemonic": "vfwsub.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwsub.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwsub.wf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vfwsub.wv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 6 }, { "mnemonic": "vid.v", @@ -1021,15 +1021,15 @@ }, { "mnemonic": "vmfeq.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmfeq.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmfge.vf", @@ -1039,45 +1039,45 @@ }, { "mnemonic": "vmfgt.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmfle.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmfle.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmflt.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmflt.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmfne.vf", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmfne.vv", - "pipe": "?", - "uop_gen": "NONE", - "latency": 0 + "pipe": "vfloat", + "uop_gen": "ARITH", + "latency": 2 }, { "mnemonic": "vmin.vv", diff --git a/core/Dispatch.hpp b/core/Dispatch.hpp index c8174e2f..6f00982d 100644 --- a/core/Dispatch.hpp +++ b/core/Dispatch.hpp @@ -138,6 +138,7 @@ namespace olympia MUL_BUSY = InstArchInfo::TargetPipe::MUL, VINT_BUSY = InstArchInfo::TargetPipe::VINT, VFIXED_BUSY = InstArchInfo::TargetPipe::VFIXED, + VFLOAT_BUSY = InstArchInfo::TargetPipe::VFLOAT, VMASK_BUSY = InstArchInfo::TargetPipe::VMASK, VMUL_BUSY = InstArchInfo::TargetPipe::VMUL, VDIV_BUSY = InstArchInfo::TargetPipe::VDIV, @@ -178,7 +179,9 @@ namespace olympia sparta::Counter::COUNT_NORMAL, getClock()), sparta::CycleCounter(getStatisticSet(), "stall_vint_busy", "VINT busy", sparta::Counter::COUNT_NORMAL, getClock()), - sparta::CycleCounter(getStatisticSet(), "stall_vfixed_busy", "VFIXED busy", + sparta::CycleCounter(getStatisticSet(), "stall_vfixed_busy", "VFIXED busy", + sparta::Counter::COUNT_NORMAL, getClock()), + sparta::CycleCounter(getStatisticSet(), "stall_vfloat_busy", "VFLOAT busy", sparta::Counter::COUNT_NORMAL, getClock()), sparta::CycleCounter(getStatisticSet(), "stall_vmask_busy", "VMASK busy", sparta::Counter::COUNT_NORMAL, getClock()), @@ -222,8 +225,10 @@ namespace olympia sparta::Counter::COUNT_NORMAL), sparta::Counter(getStatisticSet(), "count_vint_insts", "Total VINT insts", sparta::Counter::COUNT_NORMAL), - sparta::Counter(getStatisticSet(), "count_vfixed_insts", "Total VFIXED insts", + sparta::Counter(getStatisticSet(), "count_vfixed_insts", "Total VFIXED insts", sparta::Counter::COUNT_NORMAL), + sparta::Counter(getStatisticSet(), "count_vfloat_insts", "Total VFLOAT insts", + sparta::Counter::COUNT_NORMAL), sparta::Counter(getStatisticSet(), "count_vmask_insts", "Total VMASK insts", sparta::Counter::COUNT_NORMAL), sparta::Counter(getStatisticSet(), "count_vmul_insts", "Total VMUL insts", diff --git a/core/InstArchInfo.cpp b/core/InstArchInfo.cpp index 7e863c4f..c7ec9b81 100644 --- a/core/InstArchInfo.cpp +++ b/core/InstArchInfo.cpp @@ -19,6 +19,7 @@ namespace olympia {"mul", InstArchInfo::TargetPipe::MUL}, {"vint", InstArchInfo::TargetPipe::VINT}, {"vfixed", InstArchInfo::TargetPipe::VFIXED}, + {"vfloat", InstArchInfo::TargetPipe::VFLOAT}, {"vmask", InstArchInfo::TargetPipe::VMASK}, {"vset", InstArchInfo::TargetPipe::VSET}, {"vmul", InstArchInfo::TargetPipe::VMUL}, @@ -41,6 +42,7 @@ namespace olympia {InstArchInfo::TargetPipe::MUL, "MUL"}, {InstArchInfo::TargetPipe::VINT, "VINT"}, {InstArchInfo::TargetPipe::VFIXED, "VFIXED"}, + {InstArchInfo::TargetPipe::VFLOAT, "VFLOAT"}, {InstArchInfo::TargetPipe::VMASK, "VMASK"}, {InstArchInfo::TargetPipe::VSET, "VSET"}, {InstArchInfo::TargetPipe::VMUL, "VMUL"}, diff --git a/core/InstArchInfo.hpp b/core/InstArchInfo.hpp index 98378e57..9b1e3dbf 100644 --- a/core/InstArchInfo.hpp +++ b/core/InstArchInfo.hpp @@ -50,6 +50,7 @@ namespace olympia MUL, VINT, VFIXED, + VFLOAT, VMASK, VMUL, VDIV, diff --git a/test/core/vector/test_cores/test_big_core.yaml b/test/core/vector/test_cores/test_big_core.yaml index 2ea2b8d1..90c656f6 100644 --- a/test/core/vector/test_cores/test_big_core.yaml +++ b/test/core/vector/test_cores/test_big_core.yaml @@ -25,7 +25,7 @@ top.cpu.core0.extension.core_extensions: ["float", "f2i"], ["br"], ["br"], - ["vint", "vset", "vdiv", "vmul"] + ["vint", "vset", "vdiv", "vmul", "vfloat"] ] issue_queue_to_pipe_map: [