origen_testers 0.7.6 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c72ab82702fa6b3444d2676b0034c13a8cc588bb
4
- data.tar.gz: d09780ebd3835a17d7e0608af2c11b0a999c0e5e
3
+ metadata.gz: 560c1e1e8f0793808a3054fbfa0939d9e85fc178
4
+ data.tar.gz: f8d1745d6e6107d1a092bd420f4bcf92b2419c9d
5
5
  SHA512:
6
- metadata.gz: 096d65600d67eeb7658221ddb49a74ffe5a8f1c8d76f075a9fe4cca2f1bc361c0127b7f683fb5c539734a5aa36856b56bd09ec8c515f2138ba0847bb13bc5583
7
- data.tar.gz: e3aeefaedd366b6a952e62c2a33d92d2edf02703cb9138a567be2638575dc0567454e6937c31d8ae8fec47a56938c673094bf748cfa474e2cfe1259670c6af9b
6
+ metadata.gz: 43d6f200cf2c285d52c56873debeb66d67a6d77ef873c77cf13f79ab936b064e8d42a2b4968ac1f83912eededa8f3a9b5cf459c3c365c7828d7ea7a20549aec9
7
+ data.tar.gz: b856f1c9b1dc241c94c90d2ff97122a0ced67c8f5add45b3b44cea5f33cc8083816a284a2355c58aaeb197c9dcdbbc2a0645c01f5d6371111a867dc7ea846913
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
3
  MINOR = 7
4
- BUGFIX = 6
4
+ BUGFIX = 7
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -144,7 +144,9 @@ module OrigenTesters
144
144
  c1(msg)
145
145
  end
146
146
  @step_comment_on = false
147
- c1(step_comment_prefix * (70 / div))
147
+ timestamp = " #{execution_time_in_ns}ns #{step_comment_prefix}"
148
+ str = step_comment_prefix * (70 / div)
149
+ c1 str.sub(/#{step_comment_prefix}{#{timestamp.length - 1}}$/, timestamp)
148
150
  end
149
151
 
150
152
  def snip(number, options = {})
@@ -235,8 +235,9 @@ module OrigenTesters
235
235
  val = nil
236
236
  Origen.file_handler.preserve_current_file do
237
237
  Origen.file_handler.default_extension = file_extension
238
- file = Origen.file_handler.clean_path_to_sub_template(file)
239
- placeholder = compiler.render(file, options)
238
+ full_path = Origen.file_handler.clean_path_to(file, allow_missing: true)
239
+ full_path ||= Origen.file_handler.clean_path_to_sub_template(file)
240
+ placeholder = compiler.render(full_path, options)
240
241
  val = compiler.insert(placeholder).chomp
241
242
  end
242
243
  val
@@ -69,20 +69,29 @@ module OrigenTesters
69
69
  @vec_count = @vec_count - num
70
70
  end
71
71
 
72
- # init cycle count when first accessed, otherwise return value
72
+ # Returns the current cycle count
73
73
  def cycle_count
74
74
  @cycle_count ||= 0
75
75
  end
76
76
 
77
+ # Returns the current execution time
78
+ def execution_time_in_ns
79
+ @execution_time_in_ns ||= 0
80
+ end
81
+
77
82
  # increment cycle count
78
- def inc_cycle_count(num = 1)
83
+ def inc_cycle_count(num = 1, options = {})
84
+ num, options = 1, num if num.is_a?(Hash)
79
85
  cycle_count if @cycle_count.nil? # define if not already
86
+ execution_time_in_ns if @execution_time_in_ns.nil? # define if not already
87
+ @execution_time_in_ns += num * (options[:period_in_ns] || tester.timeset.period_in_ns)
80
88
  @cycle_count = @cycle_count + num
81
89
  end
82
90
 
83
91
  # reset_cycle_count
84
92
  def reset_cycle_count(num = 0)
85
93
  cycle_count if @cycle_count.nil? # define if not already
94
+ @execution_time_in_ns = 0
86
95
  @cycle_count = num
87
96
  end
88
97
 
@@ -232,7 +241,7 @@ module OrigenTesters
232
241
  v = Vector.new(attrs)
233
242
  stage.store Vector.new(attrs)
234
243
  inc_vec_count
235
- inc_cycle_count(attrs[:repeat] || 1)
244
+ inc_cycle_count(attrs[:repeat] || 1, period_in_ns: v.timeset.period_in_ns)
236
245
  if @preset_next_vector_cleanup
237
246
  @preset_next_vector_cleanup.call(v)
238
247
  @preset_next_vector_cleanup = nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_testers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-27 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen