coriolis/hurricane/doc/hurricane/html/group__DbUGroup.html

154 lines
9.7 KiB
HTML

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Hurricane Documentation</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="SoC.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<h1 id="pagetop" class="header">Hurricane VLSI Database</h1>
<!--
<center class="header">
<table class="header">
<tr>
<td><a href="customSummary.html">Summary</a></td>
<td><a href="namespaces.html">Namespaces</a></td>
<td><a href="customHierarchy.html">Class Hierarchy</a></td>
<td><a href="annotated.html">Classes</a></td>
<td><a href="functions.html">Member Index</a></td>
</tr>
</table>
</center>
-->
<br>
<body onload="javascript:toggleLevel(1)">
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<div class="title">DbU/Unit description</div> </div>
</div><!--header-->
<div class="contents">
<p>Fixed point numbers management.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classHurricane_1_1DbU.html">Hurricane::DbU</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classHurricane_1_1DataBase.html" title="The whole DataBase (API).">DataBase</a> Unit managment (<b>API</b>). <a href="classHurricane_1_1DbU.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Fixed point numbers management. </p>
<h1><a class="anchor" id="secDbUIntro"></a>
Introduction</h1>
<p>The <a class="el" href="classHurricane_1_1DbU.html" title="DataBase Unit managment (API).">DbU</a> class provides the <a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> type for modelling geometric length, that is abscissas, ordinates, widths, offsets and a set of functions to convert <a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> to and from external coordinates.</p>
<dl class="section remark"><dt>Remarks</dt><dd>The <a class="el" href="classHurricane_1_1DbU.html" title="DataBase Unit managment (API).">DbU</a> class contains only static methods, and is not meant to be instanciated. The working type is <a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a>.</dd></dl>
<p>The <a class="el" href="classHurricane_1_1DbU.html" title="DataBase Unit managment (API).">DbU</a> class manage three king of length : </p><ul>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a></b> : the working type. It is currently associated to a long integer and a precision/resolution. This way all numbers are bound to the same precision (unlike floating point numbers) preventing rounding errors. </li>
<li>
<b>Real</b> length : length, expressed in steps of founder grid. We have the straight relation ship : grid = unit * resolution </li>
<li>
<b>Symbolic</b> length : length, expressed in lambdas. A lambda is an even multiple of the founder grid step. lambda = grid / lambdaPerGrid </li>
</ul>
<h1><a class="anchor" id="secDbUPrecision"></a>
Precision</h1>
<p>It is possible to choose (once for all) the precision with which unit values are stored.</p>
<p>This precision represents the maximal number of decimal digits allowed (it applies globally to all units). Therefore for a precision of 3, the unit will represent a value of 0.001 and the founder grid value 23.54 will be represented by a unit equal to 23540.</p>
<p>Related functions : </p><ul>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a6169efbdd9b3d54a0bd8467c8f957fda">DbU::getPrecision()</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a8756c9f0a32af5f601cd150e73b02c03">DbU::getMaximalPrecision()</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#ace9a8644e7e80dcaed2a8a95deeb1622">DbU::setPrecision()</a></b> </li>
</ul>
<h1><a class="anchor" id="secDbUResolution"></a>
Resolution</h1>
<p>The resolution is associated to the precision. Indeed it represents the external value associated to the smallest unit, that is the value returned by getGrid(Unit::db(1)).</p>
<p>Related functions : <b><a class="el" href="classHurricane_1_1DbU.html#a120a60b09b344d01c583567a1e489d9e">DbU::getResolution()</a></b></p>
<h1><a class="anchor" id="secDbUGridsPerLamba"></a>
Grids per Lambda ratio</h1>
<p>Set the ratio between grids and lambdas. This must be an even integer. Once sets, musn't be changed.</p>
<p>Related functions : </p><ul>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#ac93f9ba2a09105227e34bd05bcb1500c">DbU::setGridsPerLambda()</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a9a0359adbfafc356326f5c6adf57ff04">DbU::getGridsPerLambda()</a></b> </li>
</ul>
<h1><a class="anchor" id="secDbUGrid"></a>
Grid</h1>
<p>Thoses function are closely related to editors. They allow to restrict to positions on a grid. We support three kind of grid, real, symbolic and user defined.</p>
<ul>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a09e46fcca6aaca94851adfa196e10170">DbU::getRealSnapGridStep</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a8746e486f153aa37ee469c1604eba5c0">DbU::getOnRealSnapGrid</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a202cc3aa3364c2224647a29dde047fae">DbU::setRealSnapGridStep</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a687a9134729b107c42fb7f69596c4c3b">DbU::getSymbolicSnapGridStep</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#ad1b0c0f3680093cf5a63d901312c925d">DbU::getOnSymbolicSnapGrid</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a9ccd423c8f268ef54770f4663e6c9304">DbU::setSymbolicSnapGridStep</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a87323d9038656dceabffc37d45de408a">DbU::getOnCustomGrid</a></b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a9419025221579f4277475c65655be3dc">DbU::getOnPhysicalGrid</a></b> </li>
</ul>
<h1><a class="anchor" id="secDbUTranslators"></a>
Translators</h1>
<p>Translate a <a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> into grid or lambda length : </p><ul>
<li>
<b>long <a class="el" href="classHurricane_1_1DbU.html#aec07c6e7ae2a2a6f54e2a16b32c8bf26">DbU::toDb</a> (<a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> u)</b> </li>
<li>
<b>double <a class="el" href="classHurricane_1_1DbU.html#a318d673386c9424e07c12efd598c730d">DbU::toGrid</a> (<a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> u)</b> </li>
<li>
<b>double <a class="el" href="classHurricane_1_1DbU.html#a4923a9a443871282ad7d331be2a2a5d4">DbU::toLambda</a> (<a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> u)</b> </li>
<li>
<b>double <a class="el" href="classHurricane_1_1DbU.html#ab901e9d5c12e878728178f113def6c45">DbU::toPhysical</a> (<a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> u, UnitPower p)</b> </li>
</ul>
<p>Translate a lambda length into a <a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> : </p><ul>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> <a class="el" href="classHurricane_1_1DbU.html#aec69d65ec1651c2feea24c5931f4580b">DbU::fromDb</a> (long v)</b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> <a class="el" href="classHurricane_1_1DbU.html#a367e1d1b5ac1df076745550cba8a83c1">DbU::fromGrid</a> (double v)</b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> <a class="el" href="classHurricane_1_1DbU.html#a4b570755b19ea9ff0f2f258a221bd935">DbU::fromLambda</a> (double v)</b> </li>
<li>
<b><a class="el" href="classHurricane_1_1DbU.html#a4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> <a class="el" href="classHurricane_1_1DbU.html#a11d4dbd9134a19bda35cbacde1cb2769">DbU::fromPhysical</a> (double v, UnitPower p)</b> </li>
</ul>
</div><!-- contents -->
<br>
<hr>
<table class="footer1">
<tr>
<td class="LFooter"><small>Generated by doxygen 1.9.1 on Tue Feb 21 2023</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr>
</table>
<table class="footer2">
<tr>
<td class="LFooter">Hurricane VLSI Database</td>
<td class="RFooter"><small>Copyright &#169; 2000-2020 Bull S.A. All rights reserved</small></td>
</tr>
</table>
</body>
</html>