lib/origen/pins/pin_clock.rb in origen-0.60.7 vs lib/origen/pins/pin_clock.rb in origen-0.60.8
- old
+ new
@@ -83,14 +83,14 @@
@cycles_per_duty.reverse!
end
def update_tester_period_local
if Origen.tester.current_period_in_ns == @tester_period_in_ns
- return false
+ false
else
@tester_period_in_ns = Origen.tester.current_period_in_ns
- return true
+ true
end
end
def update_clock_period(options = {})
new = get_clock_period(options)
@@ -125,9 +125,10 @@
# Passed in as cycles (not advised)
p << (options[:cycles] * Origen.tester.period_in_ns) if options[:cycles]
return @clock_period_in_ns if p.empty?
fail "[Pin Clock] ERROR: Multiple unit declarations for #{@owner.name}.clock" if p.size > 1
+
p[0].to_int
end
def duty_str
"#{@cycles_per_duty[0]}/#{@cycles_per_duty[1]}"