Difference between revisions of "Lab 5: Moving Dot"

From Microlab Classes
Jump to navigation Jump to search
(Created page with " == Background == Now that we've familiarized ourselves with basic sequential circuits in Lab 4, let's create something large! Synthesis techniques have been taught in the l...")
 
 
Line 28: Line 28:
 
# Enter the xyTracker block provided in Logisim.
 
# Enter the xyTracker block provided in Logisim.
 
# Implement the two 2-bit inputs and two 3-bit outputs by your method of choice. For example, I recommend implementing two sequential circuits that can each increment or decrement its output value by 1 per clock cycle.
 
# Implement the two 2-bit inputs and two 3-bit outputs by your method of choice. For example, I recommend implementing two sequential circuits that can each increment or decrement its output value by 1 per clock cycle.
 +
 +
In detail, the xyTracker performs the following:
 +
 +
* If the joystick is pointing left (top left, mid left or bottom left), then ''pixelX'' is decremented by 1 every clock cycle.
 +
* If the joystick is pointing up (top left, top mid or top right), then ''pixelY'' is incremented by 1 every clock cycle.
 +
* If the joystick is pointing right (top right, mid right or bottom right), then ''pixelX'' is incremented by 1 every clock cycle.
 +
* If the joystick is pointing down (bottom right, bottom mid or bottom left), then ''pixelY'' is decremented by 1 every clock cycle.
 +
* The xyTracker has no need to account for values that the joystick '''cannot possibly provide''' (like left and right at the same time).
  
 
== Notes ==
 
== Notes ==
  
 
* Again, do not move any input or output pins in the template.
 
* Again, do not move any input or output pins in the template.

Latest revision as of 15:52, 31 March 2025

Background

Now that we've familiarized ourselves with basic sequential circuits in Lab 4, let's create something large! Synthesis techniques have been taught in the lecture as a process like the following:

  1. Describing the behavior
  2. Draw the state diagram
  3. Minimize states
  4. Construct excitation tables
  5. Design the combinational logic using KMaps or logic blocks.
  6. Construct circuits

Most of this process (3-6) is almost completely mechanical in nature, and in fact, can be automated. However, what remains the engineer's job until today is to describe the appropriate behavior and drawing the correct state diagram accordingly.

Instructions

Lab 5 Main Circuit where a joystick controls a dot. To get similar function, change clock frequency to 16Hz.

Your activity for this lab is to implement the sequential controller of a moving dot controlled by a joystick as demonstrated in the figure. Your restrictions are as follows:

  • You may instantiate your Lab 2 submission as a block in this lab.
  • You may use anything available in Logisim.

You may use your previous lab submissions to implement this lab.

  1. Download the Lab 4 template in UVLe.
  2. Enter the xyTracker block provided in Logisim.
  3. Implement the two 2-bit inputs and two 3-bit outputs by your method of choice. For example, I recommend implementing two sequential circuits that can each increment or decrement its output value by 1 per clock cycle.

In detail, the xyTracker performs the following:

  • If the joystick is pointing left (top left, mid left or bottom left), then pixelX is decremented by 1 every clock cycle.
  • If the joystick is pointing up (top left, top mid or top right), then pixelY is incremented by 1 every clock cycle.
  • If the joystick is pointing right (top right, mid right or bottom right), then pixelX is incremented by 1 every clock cycle.
  • If the joystick is pointing down (bottom right, bottom mid or bottom left), then pixelY is decremented by 1 every clock cycle.
  • The xyTracker has no need to account for values that the joystick cannot possibly provide (like left and right at the same time).

Notes

  • Again, do not move any input or output pins in the template.