document/dma.htm

Sat, 06 Aug 2011 01:48:48 +0100

author
Philip Pemberton <philpem@philpem.me.uk>
date
Sat, 06 Aug 2011 01:48:48 +0100
changeset 1
522426d22baa
parent 0
11aef665a5d8
permissions
-rw-r--r--

Update to LM32 DMA v3.3

+// Version : 3.2
+// : 1. Support for 8/32-bit WISHBONE Data Bus. The Control and
+// : Read/Write Ports can be independently configured.
+// : 2. Support for "retry" on receipt of a WISHBONE RTY. This
+// : retry results in the current burst or classic cycle
+// : being issued again after a retry timeout.
+// : 3. Support for "error" on receipt of a WISHBONE ERR. This
+// : results in the current dma transfer being terminated
+// : and the error is updated within the STATUS CSR.
+// : 4. Support for burst size of 64.
+// :
+// Version : 3.3
+// : Support for MachXO2 added. The MachXO2 only has a FIFO
+// : with separate read/write clocks.

philpem@0 1 <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
philpem@0 2
philpem@0 3 <html>
philpem@0 4
philpem@0 5 <head>
philpem@0 6 <title>DMA Controller</title>
philpem@0 7 <meta http-equiv="content-type" content="text/html; charset=windows-1252">
philpem@0 8 <meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
philpem@0 9 <link rel="stylesheet" href="lever40_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
philpem@0 10 <!--
philpem@0 11 if (navigator.appName !="Netscape")
philpem@0 12 { document.write("<link rel='stylesheet' href='lever40.css'>");}
philpem@0 13 //-->
philpem@0 14 </script>
philpem@0 15 <style type="text/css">
philpem@0 16 <!--
philpem@0 17 img_whs1 { border:none; width:29px; height:31px; float:none; border-style:none; }
philpem@0 18 p.whs2 { font-style:italic; }
philpem@0 19 table.whs3 { x-cell-content-align:top; height:84px; left:0px; top:114px; width:637px; margin-left:15px; border-spacing:0px; }
philpem@0 20 col.whs4 { width:86px; }
philpem@0 21 col.whs5 { width:504px; }
philpem@0 22 tr.whs6 { x-cell-content-align:top; height:22px; }
philpem@0 23 td.whs7 { width:86px; padding-right:10px; padding-left:10px; border-left-style:Solid; border-left-color:#c0c0c0; border-top-style:Solid; border-top-color:#c0c0c0; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-right-width:1px; border-left-width:1px; border-top-width:1px; border-bottom-width:1px; background-color:#dee8f4; }
philpem@0 24 td.whs8 { width:504px; padding-right:10px; padding-left:10px; border-top-style:Solid; border-top-color:#c0c0c0; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-top-width:1px; border-bottom-width:1px; border-right-width:1px; background-color:#dee8f4; }
philpem@0 25 td.whs9 { width:86px; padding-right:10px; padding-left:10px; border-left-color:#c0c0c0; border-left-width:1px; border-left-style:Solid; border-right-color:#c0c0c0; border-right-style:Solid; border-right-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-bottom-width:1px; }
philpem@0 26 td.whs10 { width:504px; padding-right:10px; padding-left:10px; border-right-color:#c0c0c0; border-right-style:Solid; border-right-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-bottom-width:1px; }
philpem@0 27 p.whs11 { margin-left:4px; }
philpem@0 28 table.whs12 { x-cell-content-align:top; margin-left:15px; border-spacing:0px; }
philpem@0 29 tr.whs13 { x-cell-content-align:top; }
philpem@0 30 td.whs14 { padding-right:10px; padding-left:10px; border-left-style:Solid; border-left-color:#c0c0c0; border-top-color:#c0c0c0; border-top-style:Solid; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-right-width:1px; border-left-width:1px; border-top-width:1px; border-bottom-width:1px; background-color:#dee8f4; }
philpem@0 31 td.whs15 { padding-right:10px; padding-left:10px; border-top-color:#c0c0c0; border-top-style:Solid; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-top-width:1px; border-bottom-width:1px; border-right-width:1px; background-color:#dee8f4; }
philpem@0 32 td.whs16 { padding-right:10px; padding-left:10px; border-left-color:#c0c0c0; border-left-width:1px; border-left-style:Solid; border-right-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-bottom-style:Solid; border-bottom-color:#c0c0c0; border-bottom-width:1px; }
philpem@0 33 td.whs17 { padding-right:10px; padding-left:10px; border-right-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-bottom-style:Solid; border-bottom-color:#c0c0c0; border-bottom-width:1px; }
philpem@0 34 td.whs18 { padding-right:10px; padding-left:10px; border-left-style:Solid; border-left-width:1px; border-left-color:#c0c0c0; border-right-width:1px; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; }
philpem@0 35 td.whs19 { padding-right:10px; padding-left:10px; border-right-width:1px; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; }
philpem@0 36 img_whs20 { border:none; width:14px; height:16px; float:none; border-style:none; }
philpem@0 37 -->
philpem@0 38 </style><script type="text/javascript" language="JavaScript">
philpem@0 39 <!--
philpem@0 40 function ehlp_showtip(current,e,text)
philpem@0 41 {
philpem@0 42 if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == 'Netscape'))
philpem@0 43 {
philpem@0 44 document.tooltip.document.write("<layer bgColor='yellow' style='border:1px solid black;font-size:12px;'>"+ text + "</layer>");
philpem@0 45 document.tooltip.document.close();
philpem@0 46 document.tooltip.left=e.pageX+5;
philpem@0 47 document.tooltip.top=e.pageY+5;
philpem@0 48 document.tooltip.visibility="show";
philpem@0 49 }
philpem@0 50 }
philpem@0 51 function ehlp_hidetip()
philpem@0 52 {
philpem@0 53 document.tooltip.visibility="hidden";
philpem@0 54 }
philpem@0 55 //-->
philpem@0 56 </script>
philpem@0 57 <script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
philpem@0 58 <!--
philpem@0 59 function reDo() {
philpem@0 60 if (innerWidth != origWidth || innerHeight != origHeight)
philpem@0 61 location.reload();
philpem@0 62 }
philpem@0 63 if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
philpem@0 64 origWidth = innerWidth;
philpem@0 65 origHeight = innerHeight;
philpem@0 66 onresize = reDo;
philpem@0 67 }
philpem@0 68 onerror = null;
philpem@0 69 //-->
philpem@0 70 </script>
philpem@0 71 <style type="text/css">
philpem@0 72 <!--
philpem@0 73 div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
philpem@0 74 p.WebHelpNavBar { text-align:right; }
philpem@0 75 -->
philpem@0 76 </style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
philpem@0 77 <script type="text/javascript" language="javascript" src="whver.js"></script>
philpem@0 78 <script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
philpem@0 79 <script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
philpem@0 80 <script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
philpem@0 81 <script type="text/javascript" language="javascript1.2">
philpem@0 82 <!--
philpem@0 83 if (window.gbWhTopic)
philpem@0 84 {
philpem@0 85 if (window.setRelStartPage)
philpem@0 86 {
philpem@0 87 addTocInfo("DMA");
philpem@0 88
philpem@0 89 }
philpem@0 90
philpem@0 91
philpem@0 92 if (window.setRelStartPage)
philpem@0 93 {
philpem@0 94 setRelStartPage("msb_peripherals.htm");
philpem@0 95
philpem@0 96 autoSync(0);
philpem@0 97 sendSyncInfo();
philpem@0 98 sendAveInfoOut();
philpem@0 99 }
philpem@0 100
philpem@0 101 }
philpem@0 102 else
philpem@0 103 if (window.gbIE4)
philpem@0 104 document.location.reload();
philpem@0 105 //-->
philpem@0 106 </script>
philpem@0 107 </head>
philpem@0 108 <body><script type="text/javascript" language="javascript1.2">
philpem@0 109 <!--
philpem@0 110 if (window.writeIntopicBar)
philpem@0 111 writeIntopicBar(4);
philpem@0 112 //-->
philpem@0 113 </script>
philpem@1 114 <h1>LatticeMico DMA Controller &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a title="View Data Sheet" href="dma.pdf" target="_blank" onmouseover="if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == 'Netscape')) ehlp_showtip(this,event,'View Data Sheet');" onmouseout="if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == 'Netscape')) ehlp_hidetip();"><img src="ds_icon_ast.jpg" x-maintain-ratio="TRUE" width="29px" height="31px" border="0" class="img_whs1"></a></h1>
philpem@0 115
philpem@1 116 <p>The LatticeMico direct memory access controller (DMA) provides a master
philpem@0 117 read port, a master write port, and a slave port to control data transmission.
philpem@0 118 </p>
philpem@0 119
philpem@0 120 <p class="whs2"><span style="font-style: italic;"><I>*If the
philpem@0 121 data sheet fails to open, see the note at the bottom of this page.</I></span></p>
philpem@0 122
philpem@0 123 <h2>Revision History </h2>
philpem@0 124
philpem@0 125 <table x-use-null-cells cellspacing="0" width="637" height="84" class="whs3">
philpem@0 126 <script language='JavaScript'><!--
philpem@0 127 if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table><table x-use-null-cells cellspacing='0' width='637' height='84' border='1' bordercolor='silver' bordercolorlight='silver' bordercolordark='silver'>");
philpem@0 128 //--></script>
philpem@0 129 <col class="whs4">
philpem@0 130 <col class="whs5">
philpem@0 131
philpem@0 132 <tr valign="top" class="whs6">
philpem@0 133 <td bgcolor="#DEE8F4" width="86px" class="whs7">
philpem@0 134 <p class=Table
philpem@0 135 style="font-weight: bold;">Version</td>
philpem@0 136 <td bgcolor="#DEE8F4" width="504px" class="whs8">
philpem@0 137 <p class=Table
philpem@0 138 style="font-weight: bold;">Description</td></tr>
philpem@0 139
philpem@0 140 <tr valign="top" class="whs6">
philpem@0 141 <td colspan="1" rowspan="1" width="86px" class="whs9">
philpem@0 142 <p class=Table
philpem@1 143 style="font-weight: normal;">3.3</td>
philpem@1 144 <td colspan="1" rowspan="1" width="504px" class="whs10">
philpem@1 145 <p class=Table>Added software support for LatticeMico8.</td></tr>
philpem@1 146
philpem@1 147 <tr valign="top" class="whs6">
philpem@1 148 <td colspan="1" rowspan="1" width="86px" class="whs9">
philpem@1 149 <p class=Table
philpem@1 150 style="font-weight: normal;">3.2 (8.1 SP1)</td>
philpem@1 151 <td colspan="1" rowspan="1" width="504px" class="whs10">
philpem@1 152 <p class=Table>The data busses on the three WISHBONE interfaces can be
philpem@1 153 configured to be 8 or 32 bits. Support added for handling WISHBONE RTY
philpem@1 154 (retry) for burst transfers. Support added for handling WISHBONE ERR (error).
philpem@1 155 Register map updated to support 8-bit and 32-bit WISHBONE data bus.</td></tr>
philpem@1 156
philpem@1 157 <tr valign="top" class="whs6">
philpem@1 158 <td colspan="1" rowspan="1" width="86px" class="whs9">
philpem@1 159 <p class=Table
philpem@0 160 style="font-weight: normal;">3.1 (8.0)</td>
philpem@0 161 <td colspan="1" rowspan="1" width="504px" class="whs10">
philpem@0 162 <p class=Table>DMA Engine upgraded to comply with Rule 3.100 of Wishbone
philpem@0 163 Specifications, which deal with byte alignment for transfers that are
philpem@0 164 less than the width of Wishbone data bus.</td></tr>
philpem@0 165
philpem@0 166 <tr valign="top" class="whs6">
philpem@0 167 <td colspan="1" rowspan="1" width="86px" class="whs9">
philpem@0 168 <p class=Table
philpem@0 169 style="font-weight: normal;"><span style="font-weight: normal;">3.0
philpem@0 170 (7.0 SP2)</span></td>
philpem@0 171 <td colspan="1" rowspan="1" width="504px" class="whs10">
philpem@0 172 <p class=Table>Because the read and write channel worked in parallel, the
philpem@0 173 write channel started writing data to the slave as soon as the FIFO is
philpem@0 174 not empty.</p>
philpem@0 175 <p class=Table>Increased burst size to support bigger bursts from a current
philpem@0 176 value of 4 and 8 to 16 and 32, respectively. DMA now supports four burst
philpem@0 177 sizes: 4, 8, 16, and 32. The Burst Size field of the control register
philpem@0 178 was increased to 2 bits.</p>
philpem@0 179 <p class=Table>A glitch was removed on the S_ACK_O signal.</td></tr>
philpem@0 180
philpem@0 181 <tr valign="top" class="whs6">
philpem@0 182 <td colspan="1" rowspan="1" width="86px" class="whs9">
philpem@0 183 <p class="whs11">1.0</td>
philpem@0 184 <td colspan="1" rowspan="1" width="504px" class="whs10">
philpem@0 185 <p class=Table>Initial release.</td></tr>
philpem@0 186 <script language='JavaScript'><!--
philpem@0 187 if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table></table><table>");
philpem@0 188 //--></script>
philpem@0 189 </table>
philpem@0 190
philpem@0 191 &nbsp;
philpem@0 192
philpem@0 193 <h2>Dialog Box Parameters</h2>
philpem@0 194
philpem@0 195 <table x-use-null-cells cellspacing="0" class="whs12">
philpem@0 196 <col>
philpem@0 197 <col>
philpem@0 198
philpem@0 199 <tr valign="top" class="whs13">
philpem@0 200 <td bgcolor="#DEE8F4" class="whs14">
philpem@0 201 <p class=Table
philpem@0 202 style="font-weight: bold; margin-right: 2px;">Parameter</td>
philpem@0 203 <td bgcolor="#DEE8F4" class="whs15">
philpem@0 204 <p class=Table
philpem@0 205 style="font-weight: bold;">Description</td></tr>
philpem@0 206
philpem@0 207 <tr valign="top" class="whs13">
philpem@0 208 <td colspan="1" rowspan="1" class="whs16">
philpem@0 209 <p class=Table
philpem@0 210 style="margin-right: 2px;">Instance Name</td>
philpem@0 211 <td colspan="1" rowspan="1" class="whs17">
philpem@0 212 <p class=Table>Specifies the name of the DMA controller instance. Alphanumeric
philpem@0 213 values and underscores are supported. The default is dma.</td></tr>
philpem@0 214
philpem@0 215 <tr valign="top" class="whs13">
philpem@0 216 <td colspan="1" rowspan="1" class="whs16">
philpem@0 217 <p class=Table
philpem@0 218 style="margin-right: 2px;">Base Address</td>
philpem@0 219 <td colspan="1" rowspan="1" class="whs17">
philpem@0 220 <p class=Table>Specifies the base address for accessing the internal registers.
philpem@0 221 The minimum boundary alignment is 0X80. Supported values are 0X80000000
philpem@0 222 to 0XFFFFFFFF. The default is 0X80000000.</td></tr>
philpem@0 223
philpem@0 224 <tr valign="top" class="whs13">
philpem@0 225 <td colspan="1" rowspan="1" class="whs18">
philpem@0 226 <p class=Table
philpem@0 227 style="margin-right: 2px;">FIFO Implementation</td>
philpem@0 228 <td colspan="1" rowspan="1" class="whs19">
philpem@0 229 <p class=Table>Determines whether the FIFO is implemented as an EBR or
philpem@0 230 a LUT. The default is EBR.</td></tr>
philpem@0 231
philpem@0 232 <tr valign="top" class="whs13">
philpem@0 233 <td colspan="1" rowspan="1" class="whs18">
philpem@0 234 <p class=Table
philpem@1 235 style="margin-right: 2px;">Retry Timeout</p>
philpem@1 236 <p class=table>&nbsp;</td>
philpem@0 237 <td colspan="1" rowspan="1" class="whs19">
philpem@1 238 <p class=Table>Specifies the number of WISHBONE clock cycles that the DMA
philpem@1 239 controller must wait after the source or destination asserts the WISHBONE
philpem@1 240 RTY before retrying the same WISHBONE cycle. &nbsp;Supported
philpem@1 241 values are 1 to 255. The default is 16. </p>
philpem@1 242 <p class=table>&nbsp;</td></tr>
philpem@1 243
philpem@1 244 <tr valign="top" class="whs13">
philpem@1 245 <td colspan="2" rowspan="1" class="whs18">
philpem@1 246 <p class=Table
philpem@1 247 style="font-weight: bold;">WISHBONE Configuration</td>
philpem@1 248 </tr>
philpem@1 249
philpem@1 250 <tr valign="top" class="whs13">
philpem@1 251 <td colspan="1" rowspan="1" class="whs18">
philpem@1 252 <p class=Table>Control Port Data Bus Width</td>
philpem@1 253 <td colspan="1" rowspan="1" class="whs19">
philpem@1 254 <p class=Table>Configures the control port's WISHBONE data bus to be 8
philpem@1 255 or 32 bits wide.</td></tr>
philpem@1 256
philpem@1 257 <tr valign="top" class="whs13">
philpem@1 258 <td colspan="1" rowspan="1" class="whs18">
philpem@1 259 <p class=Table>Read/Write Port Data Bus Width</td>
philpem@1 260 <td colspan="1" rowspan="1" class="whs19">
philpem@1 261 <p class=Table>Configures the read and write WISHBONE master port data
philpem@1 262 buses to be 8 or 32 bits wide.</td></tr>
philpem@0 263 </table>
philpem@0 264
philpem@0 265 &nbsp;
philpem@0 266
philpem@0 267 <p><span style="font-weight: bold;"><B>Note</B></span>: If the data sheet fails
philpem@0 268 to open, click <img src="qm_icon.jpg" x-maintain-ratio="TRUE" width="14px" height="16px" border="0" class="img_whs20"> on the Available Components toolbar, and
philpem@0 269 then click the note button.</p>
philpem@0 270
philpem@0 271 <script type="text/javascript" language="JavaScript">
philpem@0 272 <!--
philpem@0 273 if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == 'Netscape'))
philpem@0 274 document.write("<div id='tooltip' class='WebHelpPopupMenu'></div>");
philpem@0 275 //-->
philpem@0 276 </script><script type="text/javascript" language="javascript1.2">
philpem@0 277 <!--
philpem@0 278 if (window.writeIntopicBar)
philpem@0 279 writeIntopicBar(0);
philpem@0 280 //-->
philpem@0 281 </script>
philpem@0 282 </body>
philpem@0 283 </html>