source: Documentation/Tutorials/XPS_Intro/html/sections/XPS_Intro_-_Implementing_the_software_design.html

Last change on this file was 1446, checked in by sgupta, 14 years ago

updated tutorial with support for v4

  • Property svn:mime-type set to text/html
File size: 9.0 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5    <meta name="generator" content="ScreenSteps http://www.screensteps.com/" />
6    <title>XPS Intro - Implementing the software design</title>
7    <link href="../neutral.css" media="screen" rel="stylesheet" type="text/css" />
8</head>
9
10<body class="lucida">
11    <div id="wrapper">     
12        <div id="header">
13            <a id="logo" href="http://warp.rice.edu/trac/"><img src="http://warp.rice.edu/images/warpLogo.jpg" alt="Rice University WARP - Wireless Open-Access Research Platform" height="45" width="285" /></a>
14        </div>
15    <div id="mainnav" class="nav">
16        <ul>
17            <li class="first active"><a href="/trac/wiki">Home</a></li><li><a href="/forums">Forums</a></li><li><a href="/trac/browser">Browse Source</a></li>
18        </ul>
19    </div>
20        <div id="LessonContent">
21            <div class="LessonHeader">
22                <h1 class="LessonTitle">XPS Intro - Implementing the software design</h1>
23            </div>
24                <div class="summary">
25        <p>This section describes the process of adding new software application projects, customizing programs and creating the final bitstream to download to the FPGA Board.</p>
26    </div>
27           
28                <div id="step_1" class="lessonStep top">
29       
30        <div class="image">
31<a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215635100038_lg.png" class="image" target="_blank"><img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215635100038.png" width="580" height="323"></a>
32<div class="caption"><a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215635100038_lg.png" target="_blank">Zoom</a></div>
33</div> <p>Start by choosing <strong>Software -&gt; Add Software Application Project...</strong></p>
34    </div>
35    <div class="clear"></div>
36    <div id="step_2" class="lessonStep top">
37       
38        <div class="image">
39<img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215635121668.png" width="309" height="295">
40</div> <p>You can name the software project anything you like. Be sure it's assigned to the <strong>ppc405_0</strong> processor. Click <strong>OK</strong>.</p>
41    </div>
42    <div class="clear"></div>
43    <div id="step_3" class="lessonStep top">
44       
45        <div class="image">
46<a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215635149423_lg.png" class="image" target="_blank"><img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215635149423.png" width="580" height="324"></a>
47<div class="caption"><a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215635149423_lg.png" target="_blank">Zoom</a></div>
48</div> <p>Your new software project will show up in the <strong>Applications</strong> tab. Right-click on your project and select <strong>Mark to Initialize BRAMs</strong>. Notice that the little red X disappears from your project (and appears on the ppc405_0 bootloop). This means your project will be used to initialize the FPGA's internal memory devices. Only one project can initialize the internal memory. You can use this feature to switch between multiple software projects easily.</p>
49    </div>
50    <div class="clear"></div>
51    <div id="step_4" class="lessonStep top">
52       
53        <div class="image">
54<a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642181254_lg.png" class="image" target="_blank"><img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215642181254.png" width="580" height="394"></a>
55<div class="caption"><a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642181254_lg.png" target="_blank">Zoom</a></div>
56</div> <p>Now you need to add source code to your software project. For this exercise, we've provided a source file that will blink the LEDs on the FPGA board.</p>
57
58
59<p>If you are using FPGAv1.2 download this code from the repository; there are two files:<br />
60 -&nbsp;<a href="/svn/WARP/Documentation/Tutorials/XPS_Intro/code/UserIO_Demo_v1.c">UserIO_Demo_v1.c</a><br />
61 - <a href="/svn/WARP/Documentation/Tutorials/XPS_Intro/code/warp_userio_v1.h">warp_userio_v1.h</a></p>
62
63
64<p>If you are using FPGAv2.2 download this code from the repository; there is just one file:<br />
65 - <a href="/svn/WARP/Documentation/Tutorials/XPS_Intro/code/UserIO_Demo_v2.c">UserIO_Demo_v2.c</a></p>
66
67
68<p>Save these files to your project folder, in a sub-folder named 'src'. Then, in XPS,  right-click the <strong>Sources</strong> entry and choose <strong>Add Existing Files</strong>. Navigate to your src folder and select UserIO_Demo_v#.c. </p>
69    </div>
70    <div class="clear"></div>
71    <div id="step_5" class="lessonStep top">
72       
73        <div class="image">
74<a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642206497_lg.png" class="image" target="_blank"><img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215642206497.png" width="580" height="393"></a>
75<div class="caption"><a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642206497_lg.png" target="_blank">Zoom</a></div>
76</div> <p>If you have a header file, then right-click <strong>Headers, </strong>choose <strong>Add Existing Files</strong> and select warp_userio_v1.h.</p>
77    </div>
78    <div class="clear"></div>
79    <div id="step_6" class="lessonStep top">
80       
81        <div class="image">
82<a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642094040_lg.png" class="image" target="_blank"><img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215642094040.png" width="580" height="325"></a>
83<div class="caption"><a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642094040_lg.png" target="_blank">Zoom</a></div>
84</div> <p>You can expand the <strong>Sources</strong> entry and double-click the source file to see the code. There are comments throughout explaining how it works. Don't make any changes (for now). Choose <strong>Device Configuration -&gt; Update Bitstream</strong>. This will start the software compilation of the board support files, peripheral drivers and your source code.</p>
85    </div>
86    <div class="clear"></div>
87    <div id="step_7" class="lessonStep top">
88       
89        <div class="image">
90<a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642829310_lg.png" class="image" target="_blank"><img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215642829310.png" width="580" height="323"></a>
91<div class="caption"><a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642829310_lg.png" target="_blank">Zoom</a></div>
92</div> <p>When the log viewer shows <strong>Memory Initialization completed successfully</strong>, your software platform and application are compiled. There's one last step before actually using your project in hardware.</p>
93    </div>
94    <div class="clear"></div>
95    <div id="step_8" class="lessonStep top">
96       
97        <div class="image">
98<a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642918138_lg.png" class="image" target="_blank"><img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215642918138.png" width="580" height="324"></a>
99<div class="caption"><a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642918138_lg.png" target="_blank">Zoom</a></div>
100</div> <p>Right-click on your software application and select <strong>Generate Linker Script.</strong></p>
101    </div>
102    <div class="clear"></div>
103    <div id="step_9" class="lessonStep top">
104       
105        <div class="image">
106<img src="images/XPS_Intro_-_Implementing_the_software_design/linker.png" width="560" height="305">
107</div> <p>The linker script editor controls the mapping of sections of code and data to memory resources in hardware. Each drop-down box in the <strong>Section View</strong> lists the available memory resources. In this simple design, the only memory resources are the Data On-Chip Memory (DOCM) and Instruction On-Chip Memory (IOCM) devices. The default selections are valid in this case. Click <strong>OK</strong>.</p>
108    </div>
109    <div class="clear"></div>
110    <div id="step_10" class="lessonStep top">
111       
112        <div class="image">
113<a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642967316_lg.png" class="image" target="_blank"><img src="images/XPS_Intro_-_Implementing_the_software_design/media_1215642967316.png" width="580" height="323"></a>
114<div class="caption"><a href="images/XPS_Intro_-_Implementing_the_software_design/media_1215642967316_lg.png" target="_blank">Zoom</a></div>
115</div> <p>Now that you have a fully synthesized hardware platform, compiled software platform and valid linker script, you can run <strong>Update Bitstream</strong> one last time. When this is finished, you're ready to download the file <strong>/implementation/download.bit</strong> to your FPGA board.</p>
116    </div>
117    <div class="clear"></div>
118
119        </div>
120        <div id="lessonNavigation">
121            <table>
122                <tr>
123                    <td class="lessonNav_Left"><a href="XPS_Intro_-_Implementing_the_hardware_platform.html">&lt;&lt; XPS Intro - Implementing the hardware platform</a></td>
124                    <td class="lessonNav_TOC"><a href="../XPS_Intro.html">Top</a></td>
125                    <td class="lessonNav_Right"></td>
126                </tr>
127            </table>
128        </div>
129    </div> 
130</body>
131</html>
Note: See TracBrowser for help on using the repository browser.