com.github.croesch.micro_debug.mic1.controlstore
Class MemorySignalSet

java.lang.Object
  extended by com.github.croesch.micro_debug.mic1.controlstore.MemorySignalSet

public final class MemorySignalSet
extends Object

Represents a set of signals: write, read and fetch.
The signal write determines whether the content of the register MDR should be written to the memory to the address defined by MAR.
The signal read determines whether content of the memory at the address defined by MAR should be written into the register MDR.
The signal read determines whether content of the program memory at the address defined by PC should be written into the register MBR.

Since:
Date: Nov 12, 2011
Author:
croesch

Method Summary
 void copyOf(com.github.croesch.micro_debug.mic1.controlstore.SignalSet set)
          Copies all signals from the given set to this set.
 boolean equals(Object obj)
           
 int getSize()
          Returns the number of signals this set contains.
 int hashCode()
           
 boolean isAnythingSet()
          Returns whether any of the signals is set.
 boolean isFetch()
          Returns whether the signal fetch is set.
 boolean isRead()
          Returns whether the signal read is set.
 boolean isWrite()
          Returns whether the signal write is set.
 MemorySignalSet setFetch(boolean fetch)
          Sets a new value for the signal fetch.
 MemorySignalSet setRead(boolean read)
          Sets a new value for the signal read.
 MemorySignalSet setWrite(boolean write)
          Sets a new value for the signal write.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isWrite

public boolean isWrite()
Returns whether the signal write is set.

Returns:
true, if the signal write is set.
Since:
Date: Nov 12, 2011

setWrite

public MemorySignalSet setWrite(boolean write)
Sets a new value for the signal write.

Parameters:
write - the new value for the signal write.
Returns:
instance of this object for fluent API.
Since:
Date: Nov 12, 2011

isRead

public boolean isRead()
Returns whether the signal read is set.

Returns:
true, if the signal read is set.
Since:
Date: Nov 12, 2011

setRead

public MemorySignalSet setRead(boolean read)
Sets a new value for the signal read.

Parameters:
read - the new value for the signal read.
Returns:
instance of this object for fluent API.
Since:
Date: Nov 12, 2011

isFetch

public boolean isFetch()
Returns whether the signal fetch is set.

Returns:
true, if the signal fetch is set.
Since:
Date: Nov 12, 2011

setFetch

public MemorySignalSet setFetch(boolean fetch)
Sets a new value for the signal fetch.

Parameters:
fetch - the new value for the signal fetch.
Returns:
instance of this object for fluent API.
Since:
Date: Nov 12, 2011

getSize

public final int getSize()
Returns the number of signals this set contains.

Returns:
the number of signals this set contains, greater or equal than zero
Since:
Date: Jan 14, 2012
See Also:
SignalSet#Mic1SignalSet(int)

isAnythingSet

public final boolean isAnythingSet()
Returns whether any of the signals is set.

Returns:
true, if at least one of the signals is set,
false otherwise.
Since:
Date: Jan 14, 2012

copyOf

public void copyOf(com.github.croesch.micro_debug.mic1.controlstore.SignalSet set)
Copies all signals from the given set to this set. If the given set is null or the number of signals are different to the signals in this object, nothing is done.

Parameters:
set - the set to fetch the signals from
Since:
Date: Nov 13, 2011

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.