- fix timings.py
This commit is contained in:
parent
8975fa2e44
commit
21b6772448
2
README
2
README
|
@ -1,4 +1,4 @@
|
|||
_____ _ ____ _ _ _ _
|
||||
_____ _ ____ _ _ _ _
|
||||
| __|___ |_|___ _ _ | \|_|___|_| |_ ___| |
|
||||
| __| | | | . | | | | | | | . | | _| .'| |
|
||||
|_____|_|_|_| |___|_ | |____/|_|_ |_|_| |__,|_|
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue