/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) * * Delay routines using pre computed loops_per_jiffy value. * * vineetg: Feb 2012 * -Rewrote in "C" to avoid dealing with availability of H/w MPY * -Also reduced the num of MPY operations from 3 to 2 * * Amit Bhor: Codito Technologies 2004
*/
/* * Normal Math for computing loops in "N" usecs * -we have precomputed @loops_per_jiffy * -1 sec has HZ jiffies * loops per "N" usecs = ((loops_per_jiffy * HZ / 1000000) * N) * * Approximate Division by multiplication: * -Mathematically if we multiply and divide a number by same value the * result remains unchanged: In this case, we use 2^32 * -> (loops_per_N_usec * 2^32 ) / 2^32 * -> (((loops_per_jiffy * HZ / 1000000) * N) * 2^32) / 2^32 * -> (loops_per_jiffy * HZ * N * 4295) / 2^32 * * -Divide by 2^32 is very simply right shift by 32 * -We simply need to ensure that the multiply per above eqn happens in * 64-bit precision (if CPU doesn't support it - gcc can emaulate it)
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.