Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

engine
Class ContBitSelect  view ContBitSelect download ContBitSelect.java

java.lang.Object
  extended byengine.Expression
      extended byengine.WireSelection
          extended byengine.BitSelect
              extended byengine.ContBitSelect
All Implemented Interfaces:
Executable, LeftValue, RightValue

class ContBitSelect
extends BitSelect
implements Executable

This is a BitSelect that continuously assings to its target. Unless BitSelect, it maintains the bits in an internal BitVector ( data ), and calls Wire's compute(), in order for it to determine its bits considering all its assignemens;


Field Summary
(package private)  boolean active
           
(package private)  BitVector b
           
(package private)  BitVector data
           
(package private)  int end
           
(package private)  BitVector newB
          The computed data to be assigned to the target BitVector
(package private)  byte[] newStrengths
          The computed strengths to be assigned to target
(package private)  int start
           
(package private)  byte[] strengths
           
(package private)  GenericSelectorDescription target
           
(package private)  long updateTime
          The timestamp of the last programmed update
 
Fields inherited from class engine.Expression
length, ns
 
Constructor Summary
(package private) ContBitSelect(NameSpace ns, BitVector b, GenericSelectorDescription target, byte strength)
           
(package private) ContBitSelect(NameSpace ns, BitVector b, GenericSelectorDescription target, int start, int end)
          The implicit strength (strong1, strong0) is used here.
(package private) ContBitSelect(NameSpace ns, BitVector b, GenericSelectorDescription target, int start, int end, byte strength)
           
 
Method Summary
(package private)  void addMonitor(Monitor m)
           
 void assign(Result r)
           
(package private)  void assign(Result r, byte[] strengths)
           
(package private)  void breakSelection(WireSelection[] bits, int startIndex)
          Breaks this wire selection into one-bit long ContBitSelects.
 Result evaluate()
           
 void execute()
           
 int getStrength(int bitIndex)
          Returns the strength that drives this wire.
 void getStrengths(byte[] s, int index)
          Copies the strengths into the given vector, starting from the given index.
 boolean isLeftValue()
           
 int length()
           
(package private)  void reatach()
          Re-attaches thie expression to its target wire
(package private)  void release()
          Detach this assignement from its taregt wire, so subsequent calls to its compute methid will not
(package private)  void set(BitVector x, int start, int end)
          Called by @see assign with the appropriate parameters
 void setStrengths(byte[] s, int startIndex)
          First sets the strengths, and then calls the old assign.
 byte strength(int i)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

BitVector data

strengths

byte[] strengths

updateTime

long updateTime
The timestamp of the last programmed update


active

boolean active

newB

BitVector newB
The computed data to be assigned to the target BitVector


newStrengths

byte[] newStrengths
The computed strengths to be assigned to target


start

int start

end

int end

b

BitVector b

target

GenericSelectorDescription target
Constructor Detail

ContBitSelect

ContBitSelect(NameSpace ns,
              BitVector b,
              GenericSelectorDescription target,
              int start,
              int end,
              byte strength)

ContBitSelect

ContBitSelect(NameSpace ns,
              BitVector b,
              GenericSelectorDescription target,
              int start,
              int end)
The implicit strength (strong1, strong0) is used here.


ContBitSelect

ContBitSelect(NameSpace ns,
              BitVector b,
              GenericSelectorDescription target,
              byte strength)
Method Detail

set

void set(BitVector x,
         int start,
         int end)
   throws InterpretTimeException
Called by @see assign with the appropriate parameters

Overrides:
set in class BitSelect

setStrengths

public void setStrengths(byte[] s,
                         int startIndex)
First sets the strengths, and then calls the old assign. This will cause the assigned wire to compute its value considering the new strengths

Overrides:
setStrengths in class BitSelect

execute

public void execute()
             throws InterpretTimeException,
                    SimulationStoppedException
Specified by:
execute in interface Executable

strength

public byte strength(int i)

release

void release()
Description copied from class: WireSelection
Detach this assignement from its taregt wire, so subsequent calls to its compute methid will not

Overrides:
release in class BitSelect

reatach

void reatach()
Description copied from class: WireSelection
Re-attaches thie expression to its target wire

Overrides:
reatach in class BitSelect

breakSelection

void breakSelection(WireSelection[] bits,
                    int startIndex)
Description copied from class: WireSelection
Breaks this wire selection into one-bit long ContBitSelects.

Overrides:
breakSelection in class BitSelect

evaluate

public Result evaluate()
                throws InterpretTimeException

length

public int length()

getStrength

public int getStrength(int bitIndex)
                throws java.lang.ClassCastException
Returns the strength that drives this wire.

Specified by:
getStrength in class WireSelection

getStrengths

public void getStrengths(byte[] s,
                         int index)
Description copied from class: WireSelection
Copies the strengths into the given vector, starting from the given index. Tha last one should be large enough to keep 'em. Mainly used by MContAssignmonitor for port connections.

Specified by:
getStrengths in class WireSelection

assign

public void assign(Result r)
            throws InterpretTimeException

assign

void assign(Result r,
            byte[] strengths)
      throws InterpretTimeException

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).

Overrides:
toString in class Expression

addMonitor

void addMonitor(Monitor m)
Specified by:
addMonitor in class Expression

isLeftValue

public boolean isLeftValue()