In this lab, you will create a 12-bit x 8-bit MAC (Multiplier Accumulator) with a multiplier and an accumulator using System Generator for DsP, and estimate the resource utilization using the Resource Estimator block of the System Generator. The System Generator allows you to use blocks that represent Xilinx LogiCOREs. After design and verification in the software environment of System Generator, you will generate VHDL code and cores from this design, and implement the MAC in the Xilinx ISE 8.1 (Project Navigator) software environment
1. Create a directory in MATLAB or with any method you prefer in your work directory called 'lab01'
2. In MATLAB change directory to the lab01 directory you just created.
Note: You may navigate to product directories by typing a “cd” command in the MATLAB command window. Type “ls” to see the directory contents. Many UNIX shell commands work from the MATLAB command Window
3. Launch Simulink: Type simulink at the MATLAB command prompt; or open the Simulink Library Browser by clickin the corresponding button on the MATLAB toolbar

4. Look at the blocks available in the Simulink Library Browser. The following elements, among others, should appear:


5. Right-click any block in the library browser, and choose Help from the MATLAB menu

Note: This provides details about the block. You can also use Help with the Xilinx Blockset elements
Continue to navigate the Simulink Library Browser and exploring the available built in resources you will have at your disposal. When you are comfortable we will continue with Lab 01 by creating a new model and employing some of these components.
6. Create a "new model" blank sheet by clicking the Create a new model button of the Simulink Library Browser

7. In the library browser window, expand the Simulink Library, and click Sources
8. Add the Sine Wave source on the worksheet: Scroll through the library to find the Sine Wave source, left click Sine Wave, and drag it onto the worksheet

9. Add the Scope sink element and wire it to the Sine Wave source on the worksheet: From Simulink Simulink -> Sinks, add the Scope block, and draw a wire from the Sine Wave to the Scope block
Note: To draw a wire, left-click source and drag mouse to destination

1. Double-click the Sine Wave block. The Block Parameters dialog box opens

2. Change the frequency to 2*pi*(1/150) and click OK to close the dialog box

3. On the worksheet, go to Format -> Port/Signal Displays and click Port Data Types
The signal width is displayed on the wire as shown in the following figure:

4. From your project sheet, pull down the Simulation menu and select Configuration Parameters

5. From the Simulation Parameters dialog box, select Solver in the left hand window and change the stop time to inf, and click OK
Note: This allows your simulation to run to infinity (until you manually stop the simulation).

1. Double-click the Scope block
2. Click the Scope Parameters button

3. In the Scope Parameters box, set the time range to '500', and click OK

4. Run the simulation: From your Simulink project worksheet, click Start Simulation button, or use Simulation -> Start

5. On the Scope display, click the Autoscale button so the output will fit into the Scope

6. View the Scope output
Note: A smooth sine wave should fit into your scope window. This is what you would expect because you are running a double-precision software simulation.
7. Stop the simulation as shown below

Xilinx Gateways and MUX Blocks.