From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI Circuit Design Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Read and Write Data to the 2K8RAM in NI Multisim

Overview


The 2K8RAM is a memory component that lets you write and read 8 bit data; it has 4096 memory addresses where you to store your data. This component is a core model as part of the XSPICE simulation engine and this example shows how to write and read data to this component.

Description

The pin out for this component is as follow:

D0 -D7 - Digital inputs

A0 - A11 - Addresses

WE - Write when high and read when low

CS - Address select

Q0-Q7 - Digital outputs

In this example, two bits data will be written to D0 and D1 and address A0 and A1 are used, the remaining digital inputs and address pins are set to low constant. The data in the table below was entered into the Word Generator. Since this part does not have a clock, between each state you should add set all inputs to 0.

CSWEA0
A1D1D0
Description
110001Write 01 to address 00
000000Next clock cycle
111010Write 10 to address 01
000000Next clock cycle
111111Write 11 to address 11
100000Next clock cycle
100000Read data from address00
000000Next clock cycle
101000Read data from address 01
000000Next clock cycle
10 1100Read data from address 11

Steps to Implement or Execute Code

To run the attached example circuit do the following:

  1. Double-click the Word Generator to expand the interface
  2. Right-click on the first row of binary data and select Set Cursor in the context menu
  3. Click the Step
  4. Select Simulate»Run or click the Run icon
  5. Click the Step button to step through the data, wait for the probes connecting to WE and CS pin to change state before you click Step again

Requirements

Software

NI Multisim 13

Hardware

Additional Images or Video



Tien P.

National Instruments
Contributors