class AFix extends MultiData with Num[AFix] with BitwiseOp[AFix] with MinMaxDecimalProvider
- Alphabetic
- By Inheritance
- AFix
- MinMaxDecimalProvider
- BitwiseOp
- Num
- MultiData
- Data
- InComponent
- OverridedEqualsHashCode
- SpinalTagReady
- Assignable
- NameableByComponent
- Nameable
- OwnableRef
- ContextUser
- ScalaLocated
- GlobalDataUser
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AFix(maxRaw: BigInt, minRaw: BigInt, exp: Int)
Type Members
- abstract type RefOwnerType
- Definition Classes
- OwnableRef
Value Members
- def !=(right: AFix): Bool
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ##(right: Data): Bits
Concatenation between two data
Concatenation between two data
- Definition Classes
- Data
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def #*(count: Int): Bits
- Definition Classes
- Data
- def %(right: AFix): AFix
Divides
this
by the right hand side AFix value expanding ranges as necessary - def &(right: AFix): AFix
Logical AND operator
- def *(right: AFix): AFix
Mutiplies
this
by the right hand side AFix value expanding ranges as necessary - def +(right: AFix): AFix
Adds
this
to the right hand side AFix value expanding ranges as necessary - def +^(right: AFix): AFix
Safe Addition with 1 bit expand
- def +|(right: AFix): AFix
Adds
this
to the right hand side AFix value without expanding ranges or checks on value overflow - def -(right: AFix): AFix
Subtracts
this
to the right hand side AFix value expanding ranges as necessary - def -^(right: AFix): AFix
Safe Substraction with 1 bit expand
- def -|(right: AFix): AFix
Subtracts
this
from the right hand side AFix value without expanding ranges or checks on value underflow - def /(right: AFix): AFix
Divides
this
by the right hand side AFix value expanding ranges as necessary - def :=(that: BigDecimal): Unit
- def :=(a: AFix): Unit
- def :=(s: SFix): Unit
- def :=(u: UFix): Unit
- def :=(s: SInt): Unit
- def :=(u: UInt): Unit
- def <(right: AFix): Bool
Is less than right
- def <<(shift: Int): AFix
Logical left shift (w(T) = w(this) + shift)
- def <<|(shift: Int): AFix
- def <=(right: AFix): Bool
Is equal or less than right
- def =/=(right: AFix): Bool
- def ==(right: AFix): Bool
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ===(right: AFix): Bool
- def >(right: AFix): Bool
Is greater than right
- def >=(right: AFix): Bool
Is equal or greater than right
- def >>(shift: AFix): AFix
- def >>(shift: Int): AFix
Logical right shift (w(T) = w(this) - shift)
- def >>|(shift: AFix): AFix
- def >>|(shift: Int): AFix
- def Q: QFormat
- def ^(right: AFix): AFix
Logical XOR operator
- val _spinalTags: LinkedHashSet[SpinalTag]
- Definition Classes
- SpinalTagReady
- def addAttribute(attribute: Attribute): AFix.this.type
- Definition Classes
- Data → SpinalTagReady
- def addAttribute(name: String, value: Int): AFix.this.type
- Definition Classes
- SpinalTagReady
- def addAttribute(name: String, value: String): AFix.this.type
- Definition Classes
- SpinalTagReady
- def addAttribute(name: String): AFix.this.type
- Definition Classes
- SpinalTagReady
- def addTag[T <: SpinalTag](spinalTag: T): AFix.this.type
- Definition Classes
- MultiData → SpinalTagReady
- def addTags[T <: SpinalTag](tags: Iterable[T]): AFix.this.type
- Definition Classes
- SpinalTagReady
- def allowDirectionLessIo: AFix.this.type
- Definition Classes
- Data
- def allowOverride: AFix.this.type
Allow a data to be overrided
Allow a data to be overrided
- Definition Classes
- Data
- def allowPartialyAssigned: AFix.this.type
- Definition Classes
- Data
- def allowPruning(): AFix.this.type
- Definition Classes
- Data
- def allowSimplifyIt(): AFix.this.type
- Definition Classes
- Data
- def allowUnsetRegToAvoidLatch: AFix.this.type
- Definition Classes
- Data
- def as[T <: Data](dataType: HardType[T]): T
- Definition Classes
- Data
- def asAlwaysPositive(): AFix
- def asBits: Bits
Cast data to Bits
- def asData: Data
- Definition Classes
- Data
- def asInOut(): AFix.this.type
set a data as inout
- def asInput(): AFix.this.type
Set a data as input
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asOutput(): AFix.this.type
Set a data as output
- def asSFix(): SFix
- def asSInt(): SInt
- def asUFix(): UFix
- def asUInt(): UInt
- def assignDontCare(): AFix.this.type
- Definition Classes
- Data
- def assignFormalRandom(kind: RandomExpKind): Unit
- final def assignFrom(that: AnyRef, target: AnyRef = this): Unit
- Definition Classes
- Data
- def assignFromBits(bits: Bits, hi: Int, lo: Int): Unit
- def assignFromBits(bits: Bits): Unit
- def assignFromBits(bits: Bits, offset: Int, bitCount: BitCount): Unit
- Definition Classes
- Data
- def assignUnassignedByName(that: MultiData): Unit
- Definition Classes
- MultiData
- val bitWidth: Int
- def ceil(exp: Int, aligned: Boolean): AFix
- def ceil(exp: Int): AFix
Rounds a value up towards positive infinity at the given exp point position
Rounds a value up towards positive infinity at the given exp point position
- returns
Rounded result
- def ceil(width: BitCount, align: Boolean): AFix
lowest n bits Round Operation by BitCount
lowest n bits Round Operation by BitCount
- Definition Classes
- Num
- def ceilToInf(exp: Int, aligned: Boolean): AFix
- def ceilToInf(exp: Int): AFix
Rounds a value towards negative or positive infinity
Rounds a value towards negative or positive infinity
- returns
Rounded result
- def ceilToInf(width: BitCount, align: Boolean): AFix
- Definition Classes
- Num
- def clone(): AFix.this.type
- def component: Component
- Definition Classes
- ContextUser
- final def compositAssignFrom(that: AnyRef, target: AnyRef, kind: AnyRef): Unit
- Definition Classes
- Assignable
- val compositeAssign: Assignable
- Definition Classes
- Assignable
- def copyDirectionOfImpl(that: Data): AFix.this.type
- def dirString(): String
- Definition Classes
- Data
- def dontSimplifyIt(): AFix.this.type
- Definition Classes
- Data
- def elements: ArrayBuffer[(String, Data)]
- def elementsString: String
- Definition Classes
- MultiData
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(obj: Any): Boolean
- Definition Classes
- OverridedEqualsHashCode → AnyRef → Any
- def existsTag(cond: (SpinalTag) => Boolean): Boolean
- Definition Classes
- SpinalTagReady
- val exp: Int
- def filterTag(cond: (SpinalTag) => Boolean): Iterable[SpinalTag]
- Definition Classes
- SpinalTagReady
- def find(name: String): Data
- Definition Classes
- MultiData
- def findTag(cond: (SpinalTag) => Boolean): Option[SpinalTag]
- Definition Classes
- SpinalTagReady
- def fixTo(Q: QFormat): AFix
- def fixTo(af: AFix): AFix
- def fixTo(af: AFix, roundType: RoundType): AFix
- def flatten: Seq[BaseType]
- def flattenForeach(body: (BaseType) => Unit): Unit
- def flattenLocalName: Seq[String]
- def flip(): AFix.this.type
flip the direction of the data
- def floor(exp: Int): AFix
Rounds a value down towards negative infinity (truncation) at the given exp point position
- def floor(width: BitCount): AFix
- Definition Classes
- Num
- def floorToZero(exp: Int): AFix
Rounds a value towards zero
- def floorToZero(width: BitCount): AFix
- Definition Classes
- Num
- def foreachReflectableNameables(doThat: (Any) => Unit): Unit
- Definition Classes
- Nameable
- def foreachTag(body: (SpinalTag) => Unit): Unit
- Definition Classes
- SpinalTagReady
- val fracWidth: Int
- def freeze(): AFix.this.type
- def genIf(cond: Boolean): AFix.this.type
Generate this if condition is true
Generate this if condition is true
- Definition Classes
- Data
- def getAheadValue(): AFix.this.type
- Definition Classes
- Data
- def getBitsWidth: Int
Return the width of the data
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getComponent(): Component
- Definition Classes
- Data → InComponent → NameableByComponent
- def getComponents(): Seq[Component]
Get current component with all parents
Get current component with all parents
- Definition Classes
- InComponent
- def getDirection: IODirection
- Definition Classes
- Data
- def getDisplayName(): String
- Definition Classes
- Nameable
- def getInstanceCounter: Int
- Definition Classes
- ContextUser
- def getMode: Byte
- Attributes
- protected
- Definition Classes
- Nameable
- def getMuxType[T <: Data](list: TraversableOnce[T]): HardType[T]
- def getName(default: String): String
- Definition Classes
- NameableByComponent → Nameable
- def getName(): String
- Definition Classes
- NameableByComponent → Nameable
- def getPartialName(): String
- Definition Classes
- Nameable
- def getRealSource: Any
- Definition Classes
- Assignable
- def getRealSourceNoRec: Any
- Definition Classes
- Data → Assignable
- def getRefOwnersChain(): List[Any]
- Definition Classes
- OwnableRef
- def getRootParent: Data
- Definition Classes
- Data
- def getRtlPath(separator: String = "/"): String
- Definition Classes
- Data
- def getScalaLocationLong: String
- Definition Classes
- ScalaLocated
- def getScalaLocationShort: String
- Definition Classes
- ScalaLocated
- def getScalaTrace(): Throwable
- Definition Classes
- ScalaLocated
- def getTag[T <: SpinalTag](clazz: Class[T]): Option[T]
- Definition Classes
- SpinalTagReady
- def getTags(): LinkedHashSet[SpinalTag]
- Definition Classes
- SpinalTagReady
- def getZero: AFix.this.type
Create a data set to 0
- val globalData: GlobalData
- Definition Classes
- GlobalDataUser
- def hasParametersOf(that: AFix): Boolean
- def hasTag[T <: SpinalTag](clazz: Class[T]): Boolean
- Definition Classes
- SpinalTagReady
- def hasTag(spinalTag: SpinalTag): Boolean
- Definition Classes
- SpinalTagReady
- def hashCode(): Int
- Definition Classes
- OverridedEqualsHashCode → AnyRef → Any
- def init(that: AFix): AFix.this.type
- def init(that: BigDecimal): AFix.this.type
- final def initFrom(that: AnyRef, target: AnyRef = this): Unit
- Definition Classes
- Data
- def instanceAttributes(language: Language): Iterable[Attribute]
- Definition Classes
- SpinalTagReady
- def instanceAttributes: Iterable[Attribute]
- Definition Classes
- SpinalTagReady
- val intWidth: Int
- def isAnalog: Boolean
- Definition Classes
- Data
- def isComb: Boolean
- Definition Classes
- Data
- def isCompletelyUnnamed: Boolean
- Definition Classes
- Nameable
- def isDirectionLess: Boolean
- Definition Classes
- Data
- def isEmptyOfTag: Boolean
- Definition Classes
- SpinalTagReady
- def isInOut: Boolean
- Definition Classes
- Data
- def isInput: Boolean
- Definition Classes
- Data
- def isInputOrInOut: Boolean
- Definition Classes
- Data
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNamed: Boolean
- Definition Classes
- NameableByComponent → Nameable
- def isNegative(): Bool
- def isOutput: Boolean
- Definition Classes
- Data
- def isOutputOrInOut: Boolean
- Definition Classes
- Data
- def isPositive(): Bool
- def isPriorityApplicable(namePriority: Byte): Boolean
- Definition Classes
- Nameable
- def isReg: Boolean
- Definition Classes
- Data
- def isUnnamed: Boolean
- Definition Classes
- Nameable
- def isZero(): Bool
- def max(right: AFix): AFix
Return the maximum value between this and right
Return the maximum value between this and right
- Definition Classes
- Num
- val maxRaw: BigInt
- lazy val maxValue: BigDecimal
- Definition Classes
- AFix → MinMaxDecimalProvider
- def min(right: AFix): AFix
Return the minimum value between this and right
Return the minimum value between this and right
- Definition Classes
- Num
- val minRaw: BigInt
- lazy val minValue: BigDecimal
- Definition Classes
- AFix → MinMaxDecimalProvider
- val name: String
- Definition Classes
- Nameable
- val nameableRef: Nameable
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def negate(enable: Bool, plusOneEnable: Bool = null): AFix
- def negate(): AFix
- def noBackendCombMerge: AFix.this.type
- Definition Classes
- Data
- def noCombLoopCheck: AFix.this.type
- Definition Classes
- Data
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val numWidth: Int
- def onEachAttributes(doIt: (Attribute) => Unit): Unit
- Definition Classes
- SpinalTagReady
- def overrideLocalName(name: String): AFix.this.type
- Definition Classes
- Nameable
- val parent: Data
- Definition Classes
- Data
- val parentScope: ScopeStatement
- Definition Classes
- ContextUser
- def pull(propagateName: Boolean): AFix.this.type
- Definition Classes
- Data
- def pull(): AFix.this.type
Pull a signal to the top level (use for debugging)
Pull a signal to the top level (use for debugging)
- Definition Classes
- Data
- def purify(): AFix.this.type
- Definition Classes
- Data
- def randBoot(u: Unit): AFix.this.type
Useful for register that doesn't need a reset value in RTL, but need a random value for simulation (avoid x-propagation)
Useful for register that doesn't need a reset value in RTL, but need a random value for simulation (avoid x-propagation)
- Definition Classes
- Data
- val raw: Bits
- val refOwner: RefOwnerType
- Definition Classes
- OwnableRef
- Annotations
- @DontName()
- def reflectNames(): Unit
- Definition Classes
- Nameable
- def removeAssignments(): AFix.this.type
- Definition Classes
- Data
- def removeTag(spinalTag: SpinalTag): AFix.this.type
- Definition Classes
- SpinalTagReady
- def removeTags(tags: Iterable[SpinalTag]): AFix.this.type
- Definition Classes
- SpinalTagReady
- def resize(newExp: ExpNumber): AFix
- def resized: AFix.this.type
Resized data regarding target
Resized data regarding target
- Definition Classes
- Data
- def round(exp: Int, aligned: Boolean = getTrunc.saturation): AFix
- def round(width: BitCount, align: Boolean): AFix
- Definition Classes
- Num
- def roundDown(exp: Int, aligned: Boolean): AFix
- def roundDown(width: BitCount, align: Boolean): AFix
- Definition Classes
- Num
- def roundHalfDown(exp: Int): AFix
Rounds a value down (floor/truncate) if x <= 0.5 otherwise rounds up (ceil)
Rounds a value down (floor/truncate) if x <= 0.5 otherwise rounds up (ceil)
- returns
Rounded result
- def roundHalfToEven(exp: Int): AFix
Rounds a value towards the nearest even value including half values, otherwise rounds towards odd values
Rounds a value towards the nearest even value including half values, otherwise rounds towards odd values
- returns
Rounded result
- def roundHalfToInf(exp: Int): AFix
Rounds a value towards infinity if x >= 0.5 otherwise rounds towards zero
Rounds a value towards infinity if x >= 0.5 otherwise rounds towards zero
- returns
Rounded result
- def roundHalfToOdd(exp: Int): AFix
Rounds a value towards the nearest odd value including half values, otherwise rounds towards even values
Rounds a value towards the nearest odd value including half values, otherwise rounds towards even values
- returns
Rounded result
- def roundHalfToZero(exp: Int): AFix
Rounds a value towards zero (floor/truncate) if x <= 0.5 otherwise rounds towards infinity
Rounds a value towards zero (floor/truncate) if x <= 0.5 otherwise rounds towards infinity
- returns
Rounded result
- def roundHalfUp(exp: Int): AFix
Rounds a value up (ceiling) if x >= 0.5 otherwise rounds down (floor/truncate)
Rounds a value up (ceiling) if x >= 0.5 otherwise rounds down (floor/truncate)
- returns
Rounded result
- def roundToEven(exp: Int, aligned: Boolean): AFix
- def roundToEven(width: BitCount, align: Boolean): AFix
- Definition Classes
- Num
- def roundToInf(exp: Int, aligned: Boolean): AFix
- def roundToInf(width: BitCount, align: Boolean): AFix
- Definition Classes
- Num
- def roundToOdd(exp: Int, align: Boolean): AFix
- def roundToOdd(width: BitCount, align: Boolean): AFix
- Definition Classes
- Num
- def roundToZero(exp: Int, aligned: Boolean): AFix
- def roundToZero(width: BitCount, align: Boolean): AFix
- Definition Classes
- Num
- def roundUp(exp: Int, aligned: Boolean): AFix
- def roundUp(width: BitCount, align: Boolean): AFix
- Definition Classes
- Num
- def rounded: AFix
- def rounded(rounding: RoundType): AFix
- def sat(m: Int): AFix
Saturates the top m bits.
- def sat(satMax: BigInt, satMin: BigInt): AFix
Saturates a number to a provided integer representation value range
Saturates a number to a provided integer representation value range
- satMax
Max integer value to saturate
- satMin
Min integer value to saturate
- returns
- Saturated AFix value
- def sat(satMax: BigInt, satMin: BigInt, exp: ExpNumber): AFix
- def sat(af: AFix): AFix
Saturates a number to the range of another number.
Saturates a number to the range of another number. This accounts for decimal shifting.
- af
- AFix value to saturate range to
- returns
- Saturated AFix value
- def sat(width: BitCount): AFix
- Definition Classes
- Num
- def saturated: AFix
- def saturated(rounding: RoundType): AFix
- val scalaTrace: Throwable
- Definition Classes
- ScalaLocated
- def scrap(exp: Int): AFix
- def setAsAnalog(): AFix.this.type
- Definition Classes
- Data
- def setAsComb(): AFix.this.type
Set baseType to Combinatorial
- def setAsDirectionLess(): AFix.this.type
remove the direction (in,out,inout) to a data
- def setAsReg(): AFix.this.type
Set baseType to reg
- def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): AFix.this.type
- Definition Classes
- Nameable
- def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): AFix.this.type
- Definition Classes
- Nameable
- def setCompositeName(nameable: Nameable, postfix: String): AFix.this.type
- Definition Classes
- Nameable
- def setCompositeName(nameable: Nameable, namePriority: Byte): AFix.this.type
- Definition Classes
- Nameable
- def setCompositeName(nameable: Nameable, weak: Boolean): AFix.this.type
- Definition Classes
- Nameable
- def setCompositeName(nameable: Nameable): AFix.this.type
- Definition Classes
- Nameable
- def setName(name: String, namePriority: Byte): AFix.this.type
- Definition Classes
- Nameable
- def setName(name: String, weak: Boolean): AFix.this.type
- Definition Classes
- Nameable
- def setName(name: String): AFix.this.type
- Definition Classes
- Nameable
- def setNameAsWeak(): AFix.this.type
- Definition Classes
- Nameable
- def setPartialName(name: String, namePriority: Byte, owner: Any): AFix.this.type
- Definition Classes
- Nameable
- def setPartialName(name: String, namePriority: Byte): AFix.this.type
- Definition Classes
- Nameable
- def setPartialName(name: String, weak: Boolean): AFix.this.type
- Definition Classes
- Nameable
- def setPartialName(owner: Nameable, name: String, namePriority: Byte): AFix.this.type
- Definition Classes
- Nameable
- def setPartialName(owner: Nameable, name: String, weak: Boolean): AFix.this.type
- Definition Classes
- Nameable
- def setPartialName(name: String): AFix.this.type
- Definition Classes
- Nameable
- def setPartialName(owner: Nameable, name: String): AFix.this.type
- Definition Classes
- Nameable
- def setRefOwner(that: Any): Unit
- Definition Classes
- OwnableRef
- def setScalaLocated(source: ScalaLocated): AFix.this.type
- Definition Classes
- ScalaLocated
- def setWeakName(name: String): AFix.this.type
- Definition Classes
- Nameable
- val signWidth: Int
- val signed: Boolean
- def spinalTags: LinkedHashSet[SpinalTag]
- Definition Classes
- SpinalTagReady
- lazy val step: BigDecimal
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tag(q: QFormat): AFix
This function differs from traditional Num[T] by returning a new AFix
- def toAFix(that: HardType[AFix]): AFix
- def toIo(): AFix.this.type
- Definition Classes
- Data
- def toMuxInput[T <: Data](muxOutput: T): T
- def toString(): String
- def trim(m: Int): AFix
Trims the bottom m bits.
- def trim(width: BitCount): AFix
- Definition Classes
- Num
- def truncate(): AFix
- def truncated: AFix
- def truncated(saturation: Boolean, overflow: Boolean, rounding: RoundType): AFix
- def unary_-(): AFix
- def unary_~: AFix
Inverse bitwise operator
- def unfreeze(): AFix.this.type
- def unsetName(): AFix.this.type
- Definition Classes
- Nameable
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- val wholeWidth: Int
- def wrapNext(): AFix.this.type
- Definition Classes
- Data
- def zipByName(that: MultiData, rec: ArrayBuffer[(BaseType, BaseType)] = ArrayBuffer()): ArrayBuffer[(BaseType, BaseType)]
- Definition Classes
- MultiData
- def |(right: AFix): AFix
Logical OR operator
- def |<<(shift: Int): AFix
- def |<<(shift: AFix): AFix