Class StructBase<T>
- java.lang.Object
-
- ru.ispras.microtesk.mmu.model.sim.StructBase<T>
-
- All Implemented Interfaces:
Struct<T>
public abstract class StructBase<T> extends java.lang.Object implements Struct<T>
StructBase
is an abstract base class for buffer entries.
-
-
Constructor Summary
Constructors Constructor Description StructBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ru.ispras.fortress.data.types.bitvector.BitVector
asBitVector()
Converts the struct to the bit vector.void
assign(ru.ispras.fortress.data.types.bitvector.BitVector entry)
int
getBitSize()
Returns the bit size of the struct.abstract T
newStruct(ru.ispras.fortress.data.types.bitvector.BitVector value)
Returns the struct initialized by the given bit vector.protected void
setEntry(ru.ispras.fortress.data.types.bitvector.BitVector entry)
-
-
-
Method Detail
-
getBitSize
public int getBitSize()
Description copied from interface:Struct
Returns the bit size of the struct.- Specified by:
getBitSize
in interfaceStruct<T>
- Returns:
- the bit size as an integer value
-
newStruct
public abstract T newStruct(ru.ispras.fortress.data.types.bitvector.BitVector value)
Description copied from interface:Struct
Returns the struct initialized by the given bit vector.
-
asBitVector
public final ru.ispras.fortress.data.types.bitvector.BitVector asBitVector()
Description copied from interface:Struct
Converts the struct to the bit vector.- Specified by:
asBitVector
in interfaceStruct<T>
- Returns:
- the bit vector representing all fields of the struct.
-
setEntry
protected void setEntry(ru.ispras.fortress.data.types.bitvector.BitVector entry)
-
assign
public final void assign(ru.ispras.fortress.data.types.bitvector.BitVector entry)
-
-