From b5b9efe29ab487af309c967bec86da252d171b84 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Tue, 7 May 2019 14:45:08 -0700 Subject: [PATCH] Update units to reflect actually constraint. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- prjxray/timing.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/prjxray/timing.py b/prjxray/timing.py index f28b8795..2098d4d1 100644 --- a/prjxray/timing.py +++ b/prjxray/timing.py @@ -56,6 +56,30 @@ Example timing tree: |Inpin| |Inpin| +-----+ +-----+ +Note on units: + +The timing model operates on the following types of units: + - Time + - Resistance + - Capacitance + +For a consistent unit set, the following equation must be satisfied: + +1 Resistance unit * 1 Capacitance unit = 1 Time unit + +The SI unit set would be: + - Time = seconds + - Resistance = Ohms + - Capacitance = Farads + +However as long as the scale factors are consistent, the model will work +with other unit combinations. For example: + - Time = nanoseconds (1e-9 seconds) + - Resistance = milliOhms (1e-3 Ohms) + - Capacitance = microFarads (1e-6 Farads) + +(1e-3 * 1e-6) (Ohms * Farads) does equal (1e-9) seconds. + """ import enum from collections import namedtuple @@ -101,10 +125,10 @@ class RcElement(namedtuple('RcElement', 'resistance capacitance')): ---------- resistance : float - Resistance of element (milliOhms) + Resistance of element capacitance : float - Capacitance of element (microFarads) + Capacitance of element """ pass