Lab 1.1 - Memory Lab

The purpose of this lab is to demonstrate various concepts related to computer memory, such as data representation, endianness, and using control signals to communicate with memory devices and tell them "what to do". It will also give you some experience with reading and interpreting hardware datasheets from manufacturers.

Preparation

In your lab preparation, you should answer all 7 of the Lab Prep questions found below. Each of them are prefixed with "Lab Prep x:", where x is the question number. Make sure you have this ready to be marked before you come to the lab.

Part 1 - Read Documentation

Lab Prep 1: How many data pins does the SRAM have? How many address pins does it have? Use these two numbers to help you calculate the amount of storage in the SRAM (measured in KiloBytes).

WARNING: Processors tend to assume a byte-addressable memory space, however the SRAM device (and the simulator) is half-word-addressable. In other words, every memory location has 16-bits instead of 8-bits. The !LDS and !UDS signals are used to individually select the top or bottom byte, or both of them.

Part 2 - Controlling the Memory Device

To get acquainted with the program, follow the following procedure. For more information on the specific control signals involved, consult the memory device datasheet.

  1. Set the !WE, !LB, and !UB signals to "low" by moving the corresponding sliders down.
  2. Set the address to "0xA" by moving the first and third sliders (from the left) up.
  3. Set the data input to "0xABCD" either by double clicking on the "0x0000" beside the "Data Input" field and entering "ABCD", or by moving the 16 sliders above to the correct binary positions.
  4. Set the !CE signal to "low" by moving the corresponding slider down. Lab Prep 2: Record any changes in the memory contents.
  5. Raise the !CE signal back to "high".

Next, perform the necessary steps to achieve the following tasks. You must perform the tasks in the order in which they are listed and use the results from the previous operations when performing a particular task.

At this point, set all control signals to "high". Do not quit the program.

Lab Prep 3: Record the memory contents.

Part 3 - Data Representation

As was taught in class, the data stored in memory can be interpreted differently, depending on the data type. The memory device simulation program allows you to explore how several common data types look in memory. When a data type spans multiple memory locations, there are several possibilities with regards to the order in which data can be interpreted. The most common ones are "big endian" and "little endian", about which you have learned in class. The program allows you to explore both representations, by allowing you to select the one you want.

To get familiar with this feautre, follow these steps:

  1. Set the current address to "0x0". Then, note the "Data Type Representation" panel. In particular, note the value of "Byte (unsigned)".
  2. Under "Treat representation as", select "Little endian". Lab Prep 4: Explain this change given what you learned in class.
Next, perform the following tasks, keep the representation at Little endian.

Lab Prep 6: Record the memory contents.

Lab Prep 7: Write down the single-precision floating point representation for the number 0.75.

In the Lab

  1. Be prepared to answer any questions about the SRAM, the simulator, or any of the memory concepts.