- fix timings.py

This commit is contained in:
Florent Kermarrec 2013-01-27 13:59:44 +01:00
parent 8975fa2e44
commit 21b6772448
3 changed files with 5 additions and 5 deletions

2
README
View File

@ -1,4 +1,4 @@
_____ _ ____ _ _ _ _
_____ _ ____ _ _ _ _
| __|___ |_|___ _ _ | \|_|___|_| |_ ___| |
| __| | | | . | | | | | | | . | | _| .'| |
|_____|_|_|_| |___|_ | |____/|_|_ |_|_| |__,|_|

View File

@ -13,8 +13,8 @@ ns = 1/GHz
class t2n:
def __init__(self, clk_period_ns):
self.clk_period_ns = clk_period_ns
self.clk_period_us = clk_period_ns*(GHz/MHz)
self.clk_period_ms = clk_period_ns*(GHz/KHz)
self.clk_period_us = clk_period_ns*(MHz/GHz)
self.clk_period_ms = clk_period_ns*(KHz/GHz)
def ns(self,t,margin=True):
if margin:
t += self.clk_period_ns/2

View File

@ -13,8 +13,8 @@ ns = 1/GHz
class t2n:
def __init__(self, clk_period_ns):
self.clk_period_ns = clk_period_ns
self.clk_period_us = clk_period_ns*(GHz/MHz)
self.clk_period_ms = clk_period_ns*(GHz/KHz)
self.clk_period_us = clk_period_ns*(MHz/GHz)
self.clk_period_ms = clk_period_ns*(KHz/GHz)
def ns(self,t,margin=True):
if margin:
t += self.clk_period_ns/2