public class Block
extends Object
Constructor and Description |
---|
Block(Block orig)
Copy constructor used as a convenience to duplicate a block.
|
Block(int blockAddress)
Creates a new config block initialized with the provided address
|
Modifier and Type | Method and Description |
---|---|
boolean |
copyFrameData(Block block)
Copies all frame data from the provided block into the corresponding frames of this block.
|
int |
getAddress()
Gets the configuration block address as used in the Frame Address Register (FAR).
|
int |
getBit(BitLocation bit,
Tile tile)
Gets the bit at the specified location for the provided tile
|
static Integer |
getBlockHeight(Series series)
Gets a configuration block height in terms of CLEs based on the provided series
|
int |
getBlockType(Series series)
Gets the integer value block type of this block, see
BlockType |
Tile |
getBottomTile()
Gets the bottom tile that is covered by this configuration block
|
ClockRegion |
getClockRegion()
Gets the corresponding clock region to which this configuration block belongs
|
int |
getColumn(Series series)
Gets the column address of this block in the Frame Address Register (FAR).
|
Frame |
getFrame(int index)
Gets the frame within the block at the specified offset.
|
int |
getFrameCount()
Gets the number of frames in this configuration block.
|
Frame[] |
getFrames()
Gets the array of frames corresponding to this block.
|
int |
getRow(Series series)
Gets the row address of this block in the Frame Address Register (FAR).
|
Series |
getSeries()
Gets the series of this block based on the sub block type.
|
BlockSubType |
getSubType()
Gets the block's sub type, see
BlockSubType TileTypeEnum |
int |
getTileColumn()
Gets the tile column index associated with this configuration block
|
int |
getTopBotBit(Series series)
Gets the top/bottom bit of this block's address in the Frame Address Register (FAR).
|
Tile |
getTopTile()
Gets the top tile that is covered by this configuration block
|
void |
setAddress(int address)
Updates the configuration block address as used in the Frame Address Register (FAR).
|
Frame |
setFrame(int index,
Frame frame)
Sets (overwrites) the frame at the specified index within the block.
|
void |
setSubType(BlockSubType subType)
Updates the block's sub type, see
BlockSubType TileTypeEnum |
String |
toString() |
boolean |
updateBit(BitLocation bit,
Tile tile,
int value)
For the given bit location, it updates the bit to value and returns the previous value.
|
boolean |
updateBit(BitLocation bit,
Tile tile,
int value,
Block golden)
For the given bit location, it updates the bit to value and returns the
previous value.
|
public Block(int blockAddress)
blockAddress
- The address of the config blockpublic Block(Block orig)
orig
- The original block to copy and use as a templatepublic static Integer getBlockHeight(Series series)
series
- The device seriespublic int getAddress()
public void setAddress(int address)
address
- The new configuration block address.public BlockSubType getSubType()
BlockSubType
TileTypeEnum
public void setSubType(BlockSubType subType)
BlockSubType
TileTypeEnum
subType
- The new block's sub typepublic int getColumn(Series series)
series
- The series of the current devicepublic int getRow(Series series)
series
- The series of the current devicepublic int getTopBotBit(Series series)
series
- The series of the current device.public int getBlockType(Series series)
BlockType
series
- The series of the current device.public ClockRegion getClockRegion()
public int getTileColumn()
public Series getSeries()
public Tile getBottomTile()
public Tile getTopTile()
public Frame[] getFrames()
public Frame getFrame(int index)
index
- Index within the block.public int getFrameCount()
public Frame setFrame(int index, Frame frame)
index
- Index of the frame to set within the blockframe
- The new frame to set into the specified index.public boolean copyFrameData(Block block)
block
- The source block from which to copy the datapublic int getBit(BitLocation bit, Tile tile)
bit
- The bit locationtile
- The reference tilepublic boolean updateBit(BitLocation bit, Tile tile, int value)
bit
- The bit location within the blockvalue
- Desired value to set in the bit locationpublic boolean updateBit(BitLocation bit, Tile tile, int value, Block golden)
bit
- The bit location within the blockvalue
- Desired value to set in the bit locationgolden
- A reference configuration block that is checked with the value
to be set and prints an error message if there is a mismatch.public String toString()
toString
in class Object