Skip to content

Sign of Zero is wrong when multiplier_mode is on #2

@jingpu

Description

@jingpu

The bug happens when multiplier_mode is on (opcode=01). Result Z should be the product of A and B. A and B here are denorms with different sign bit, so the sign bit of expected result should be one.

Code version 753d51f
To reproduce:

git checkout 753d51f2b64f6089a2e12b7ea3969a133b33432b
make -f $FPGEN/Makefile run RUN=+NumTrans=1000 GENESIS_PARAMS="top_FPGen.FPGen.FMA.PipelineDepth=8 top_FPGen.FPGen.FMA.EnableMultiplePumping=YES top_FPGen.FPGen.FMA.MulpPipelineDepth=3 top_FPGen.FPGen.FMA.MulShift.MUL0.TreeType=ZM top_FPGen.FPGen.FMA.MulShift.MUL0.BoothType=3"

run log:

45500: Transaction #19: 
45500 opcode: 01
45501: SENT:   TypeA=Denorm001 SignA=0 ExpA=0x000 FracA=0x0000000000001
45501:         TypeB=DenormRnd SignB=1 ExpB=0x000 FracB=0x9a56aa235af86
45501:         TypeC=Random SignC=1 ExpC=0x333 FracC=0xf5ea79407a596
45501: EXPECTED: Type=Zero Sign=1 Exp=0x000 Frac=0x0000000000000
45501: FOUND:   Type=Zero Sign=0 Exp=0x000 Frac=0x0000000000000
45501: 0000000000000001x8009a56aa235af86+b33f5ea79407a596 = 0000000000000000 (8000000000000000) WRONG
 45501: ERROR Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions