Source/Packages

Accelerator.SM90.InstructionEncoding

packages/hardware/architectures/nvidia-sm90/src/Accelerator/SM90/InstructionEncoding.alpha

500 lines73 declarations29.3 KiBSHA-256 6893fe9ca611

def · lines 424–471

sm90DecodeMemoryWord

Full file
424def sm90DecodeMemoryWord = (lambda unrestricted word : (family SM90Word) .
425  (let unrestricted low = (sm90WordLowOf word) in
426  (let unrestricted high = (sm90WordHighOf word) in
427  (let unrestricted opcode = (sm90OpcodeOf word) in
428  (let unrestricted guard = (sm90GuardOfWord word) in
429  (let unrestricted control = (sm90ControlOfWord word) in
430  (let unrestricted size = (sm90Field high sm90SizePlace 8) in
431  (let unrestricted strength = (sm90Field high sm90StrengthPlace 8) in
432  (sm90Choose (family SM90Decoding) (naturalEqual opcode sm90OpcodeLoadGlobal)
433    (sm90DecodeCanonical word
434      (constructor SM90Instruction SM90LoadGlobal guard (sm90LoadWidthOf size strength)
435        (sm90Choose (family SM90LoadAllocation) (sm90Field high 0x400000 2)
436          (constructor SM90LoadAllocation SM90LoadNoAllocate) (constructor SM90LoadAllocation SM90LoadAllocate))
437        (sm90RegisterOf (sm90Field low sm90DestinationPlace sm90Span8))
438        (sm90RegisterOf (sm90Field low sm90SourcePlace sm90Span8))
439        (sm90Field low sm90GlobalOffsetPlace sm90GlobalOffsetLimit)
440        control))
441  (sm90Choose (family SM90Decoding) (naturalEqual opcode sm90OpcodeStoreGlobal)
442    (sm90DecodeCanonical word
443      (constructor SM90Instruction SM90StoreGlobal guard (sm90StoreWidthOf size strength)
444        (sm90RegisterOf (sm90Field low sm90SourcePlace sm90Span8))
445        (sm90RegisterOf (sm90Field low sm90SecondSourcePlace sm90Span8))
446        (sm90Field low sm90GlobalOffsetPlace sm90GlobalOffsetLimit)
447        control))
448  (sm90Choose (family SM90Decoding) (naturalEqual opcode sm90OpcodeCopyGlobalToShared)
449    (sm90DecodeCanonical word
450      (constructor SM90Instruction SM90CopyGlobalToShared guard
451        (sm90RegisterOf (sm90Field low sm90DestinationPlace sm90Span8))
452        (sm90Field low sm90CopySharedOffsetPlace sm90CopySharedOffsetLimit)
453        (sm90RegisterOf (sm90Field low sm90SourcePlace sm90Span8))
454        (sm90Field low sm90SecondSourcePlace sm90CopySourceOffsetLimit)
455        control))
456  (sm90Choose (family SM90Decoding) (naturalEqual opcode sm90OpcodeBranch)
457    (sm90DecodeCanonical word
458      (constructor SM90Instruction SM90Branch guard
459        (sm90BranchTargetOf
460          (nat-add (nat-multiply 4 (sm90Field low sm90BranchLowPlace sm90Span8))
461          (nat-add (nat-multiply 1024 (sm90Field low sm90BranchMiddlePlace sm90BranchMiddleSpan))
462            (nat-multiply sm90BranchHighUnit (nat-modulo high sm90BranchHighSpan)))))
463        control))
464  (sm90Choose (family SM90Decoding) (naturalEqual opcode sm90OpcodeReduceGlobal)
465    (sm90DecodeCanonical word
466      (constructor SM90Instruction SM90ReduceGlobalAddFloat32 guard
467        (sm90RegisterOf (sm90Field low sm90SourcePlace sm90Span8))
468        (sm90RegisterOf (sm90Field low sm90SecondSourcePlace sm90Span8))
469        (sm90Field low sm90GlobalOffsetPlace sm90GlobalOffsetLimit)
470        control))
471    (constructor SM90Decoding SM90DecodingRefused (constructor SM90EncodingRefusal SM90RefusalUnknownOpcode)))))))))))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.