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.

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