Lab: 3
Status In Progress

Lab 3 - Data Acquisition, Storage and Display

Lab Overview

The signal acquire module contains a datapath and control necessary to initiate and acquire all 8 channels of the AD7606 chip and store them into a register file. And yes, we will only be using the first two channels on our oscilloscope, we will gather the extra 6 channels.


Architecture

You will build the signal acquisition engine using a datapath and control approach.


You will use a testbench to verify that your design works as a simulation. In order to verify proper operation of the synthesized design, you will ask the register file for the value of register 0 and send the output to four comparators. The comparators will compare the channel 1 converted value against the 16-bit 2's complement value for 1, 2, 3 and 4 volts.
The button process is similar to the last lab, it will look for a change in the logic level of one of the buttons (which I don't care). When the button process sees a change in this button's logic level, it will enable the trigger status word for one clock cycle.

Control Unit

The control unit should follow the processes outlined in class. Use a model where you separate the state process from the output process. Liberally use constants and alias to make your code more readable. Use easy to understand state names as these are what you will see during your simulation.

Datapath

The datapath contains two counter/comparator pairs to generate a short and long delay. You should configure the long delay to be around 1.3ms in your synthesized design.
CONSTANT LONG_DELAY_50Mhz_COUNTS : STD_LOGIC_VECTOR(LONG_DELAY_50Mhz_CONST_WIDTH - 1 downto 0) := x"00FFFF";
You should then include the package in your datapath.vhdl file and then you can use this constant in the long delay comparator instantation. This should look something like the following.
	longDelayCompare_inst: genericCompare
        GENERIC MAP(24)
        PORT MAP(   x => longDelayCounter,
                    y => LONG_DELAY_50Mhz_COUNTS,
                    g => open,
                    l => open,
                    e => sw(LONG_DELAY_DONE_SW_BIT_INDEX));
In addition to the two counter/comparator pairs, your datapath will also need to include a register file to store the 16-bit values returned from the AD7606

Register File

You will use the register file to store the 16-bit data from all 8 channels. Thus, your register file will have 8-storage location (registers), that can store 16-bits each. The internal organization of the register file is shown in the following figure.


To write data into the register file, you: Since the data output is separate from the data input, to read data all you need to do is assert the index of the register you want to read on the rdAddr input. The relevant register output is selected by the 8:1 mux and will appear on the Q output.

VHDL Code

The files below will give you a solid start on this lab. Note package files are a bit tricky to find. To do so, go to the Sources pane and click on the 'libraries' tab. You should find them under Design Sources -> VHDL -> xil_defaultlib

Simulation

To help you in debugging, I've provided some excerpts from my testbench simulation. If you right-click on the images and open in a new window, they will enlarge.
Up To 200ns
At 1,311,800ns
At 1,316,200ns
At 1,318,200ns
At 1,321,700ns

Synthesis

You will need to complete the xdc (pin assignment) file before you can successfully synthesize your design. This will require you to work through the schematic and look for the connections between the devices and pins on the Zynq chip. You will also need to open up the AN706 ADC board schematic to identity which pins on the 40-pin connector are connected to the AD7060.

Once you get the project to synthesize, you will need to connect the AN706+interface board to the J10 header. Please take care when doing this as mis-alignment of the pins can cause the header pins to get damaged.

To use the interface board: The image below shows me adjusting the channel 1 potentiometer. Since this is an early revision of the interface board, you may notice small differences to the interface board that you use in lab.