com.github.croesch.micro_debug.mic1.shifter
Class Shifter

java.lang.Object
  extended by com.github.croesch.micro_debug.mic1.shifter.Shifter

public final class Shifter
extends Object

This class represents a shifter for 32 bit values. It is based on the description for the shifter of the CISC-processor in the script of the lecture 'Rechnertechnik' of Karl Stroetmann.

Since:
Date: Nov 7, 2011
Author:
croesch

Constructor Summary
Shifter()
           
 
Method Summary
 void calculate()
          Performs calculation of the output signals based on the current values of input signals.
 int getOutput()
          Returns the calculated output.
 void setInput(int value)
          Sets the value for the input of the shifter.
 void setSLL8(boolean valueForSll8)
          Sets the value for the control line SLL8.
 void setSRA1(boolean valueForSra1)
          Sets the value for the control line SRA1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shifter

public Shifter()
Method Detail

setSLL8

public void setSLL8(boolean valueForSll8)
Sets the value for the control line SLL8.

Parameters:
valueForSll8 - true, if the control bit SLL8 is set
Since:
Date: Nov 7, 2011

setSRA1

public void setSRA1(boolean valueForSra1)
Sets the value for the control line SRA1.

Parameters:
valueForSra1 - true, if the control bit SRA1 is set
Since:
Date: Nov 7, 2011

getOutput

public int getOutput()
Returns the calculated output.

Returns:
the input of the shifter, possible shifted.
Since:
Date: Nov 7, 2011

calculate

public void calculate()
Performs calculation of the output signals based on the current values of input signals.

Since:
Date: Nov 21, 2011

setInput

public void setInput(int value)
Sets the value for the input of the shifter. This 32-bit number will be shifted, depending on the values of the control lines.

Parameters:
value - 32-bit input value for the shifter
Since:
Date: Nov 7, 2011


Copyright © 2012. All Rights Reserved.