1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>TCM: Overview</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">TCM: Overview <IMG src="../../image/NTR.gif" width="24" height="12" border="0" align="middle"><IMG src="../../image/TWL.gif" width="24" height="12" border="0" align="middle"></H1> 12<P>TCM is an abbreviation for "Tightly Coupled Memory." It is high-speed memory attached directly to the ARM9 core. Since this memory is not connected to the ARM9 bus, it is possible for the ARM9 to perform process using TCM, even in DMA.</P> 13<P>There are two types of TCM: Instruction TCM (ITCM) and Data TCM (DTCM). ITCM has 32 kilobytes of space, while DTCM has 16 kilobytes. ITCM can store instructions and data. DTCM can store data, but cannot store instructions.</P> 14<H2>Enabling and Disabling</H2> 15<P>ITCM and DTCM can be enabled and disabled with the following functions:</P> 16<P><CODE><A href="OS_EnableITCM.html">OS_EnableITCM</A></CODE> enables ITCM.<BR><CODE><A href="OS_DisableITCM.html">OS_DisableITCM</A></CODE> disables ITCM.<BR><CODE><A href="OS_EnableDTCM.html">OS_EnableDTCM</A></CODE> enables DTCM. <BR><CODE><A href="OS_DisableDTCM.html">OS_DisableDTCM</A></CODE> disables DTCM.</P> 17<H2>Mapping</H2> 18<P>ITCM can be mapped to an address that is a multiple of 32 KB, while DTCM can be mapped to an address that is 16 KB.</P> 19<P>These will be placed at the following addresses. 20</P> 21<TABLE border="1"> 22 <TBODY> 23 <TR> 24 <TH>TCM Type</TH> 25 <TH>Size</TH> 26 <TH>Usage</TH> 27 <TH>Address</TH> 28 </TR> 29 <TR> 30 <TD>ITCM</TD> 31 <TD>32KB</TD> 32 <TD>Instruction Code / Data</TD> 33 <TD>0x01FF8000 - 0x01FFFFFF</TD> 34 </TR> 35 <TR> 36 <TD>DTCM</TD> 37 <TD>16KB</TD> 38 <TD>Data<BR> 39 </TD> 40 <TD>0x027E0000 - 0x027E3FFF<BR> 41 (for NITRO ROM) <B><FONT color="#ff0000">(NOTE 1)</FONT></B><BR> 42 0x02FE0000 - 0x02FE3FFF<BR> 43 (for HYBRID / LIMITED ROM) <B><FONT color="#ff0000">(NOTE 2)</FONT></B></TD> 44 </TR> 45 </TBODY> 46</TABLE> 47<P><BR> <B><FONT color="#ff0000">(NOTE 1)</FONT></B> DTCM starts at <CODE>0x027E000</CODE> for a NITRO ROM. This is regardless of whether the NITRO ROM is run on NITRO hardware or TWL hardware.</P> 48<P><B><FONT color="#ff0000">(NOTE 2)</FONT></B> DTCM starts at <CODE>0x02FE000</CODE> for a HYBRID ROM or a LIMITED ROM. This is obvious when running in TWL mode, but also applies to a HYBRID ROM that is running in NITRO mode, regardless of the hardware.</P> 49<P>Note that DTCM addresses thus depend upon the ROM type instead of the operating mode.</P> 50<H3>Functions to Get ITCM Addresses</H3> 51<P>In ITCM, <CODE><A href="OS_GetITCMAddress.html">OS_GetITCMAddress()</A></CODE> is prepared as a function to get the <CODE>HW_ITCM</CODE> constant. The <code>HW_ITCM</code> constant is defined at the default ITCM starting address: <code>0x01FF8000</code>.</P> 52<H3>Functions to Get DTCM Addresses</H3> 53<P>For DTCM, <code><a href="OS_GetDTCMAddress.html">OS_GetDTCMAddress()</a></code> can be used to get the mapped address. <code><a href="OS_SetDTCMAddress.html">OS_SetDTCMAddress()</a></code> sets the address. The stack region and each type of hook vector are mapped for the DTCM. The program may become unstable if the mapping locations are changed while the program is running. It is therefore recommended that you avoid making frequent changes with one program.</P> 54<H2>TCM–Related CP15 Settings</H2> 55<P>The ITCM and DTCM configurations depend on the configuration of the internal register of co-processor 15 (<code>CP15</code>). TWL-SDK provides functions that directly access this register. ITCM and DTCM both have Set and Get functions that take arguments to be provided to the register (or loaded from the register). However, in order to use them (particularly the Set functions), you must have a firm understanding of their operating principles.</P> 56<P><CODE><A href="OS_SetITCMParam.html">OS_SetITCMParam</A></CODE> sets the ITCM parameters.<BR><CODE><A href="OS_GetITCMParam.html">OS_GetITCMParam</A></CODE> gets the ITCM parameters.<BR><CODE><A href="OS_SetDTCMParam.html">OS_SetDTCMParam</A></CODE> sets the DTCM parameters.<BR><CODE><A href="OS_GetDTCMParam.html">OS_GetDTCMParam</A></CODE> gets the DTCM parameters.</P> 57<H2>See Also</H2> 58<P><CODE><A href="../list_os.html#Tcm">An Overview of OS Functions (TCM)</A><BR></CODE></P> 59<H2>Revision History</H2> 60<P>2007/11/28 Added descriptions related to TWL mode. <BR>2005/04/13 Changed the default DTCM address. <BR>2004/12/14 Revised terminology and word endings. <BR>2004/11/09 Initial version.</P> 61<hr><p>CONFIDENTIAL</p></body> 62</HTML>