origen_testers 0.8.6 → 0.8.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: de1979a623e59045505464aadab0a98eb13d246c
4
- data.tar.gz: dd26351c8f5c86c96b54d02f8188adb65ed3b449
3
+ metadata.gz: b0f226f6dedd573e39ddba26d36a52588d89cfaf
4
+ data.tar.gz: edf5678acb10070388405fba3b820c4fd96172a7
5
5
  SHA512:
6
- metadata.gz: 9d025b93e979a036865b3156b5803ad17835369abd4e7f4567ec073590d09b44de39333b968503a805d6e1a3c7858fbafba8d8ae5b82fa8a3829f54dd3819b06
7
- data.tar.gz: 279a25ecdd7ec2f88f8964ba312ead4f4beb25308f9c5b2e8afe28c3a903b4ac3e1efc3127dfec8b0d762a60e0518fb9d4b91e483f2142d33c03ae178b11912a
6
+ metadata.gz: b15f679c0ccb26a23fbb09523d245b3761e2d081ce18bdccac93dc2945df51baf8346f6bfdc21f378ae28ee62d76d8aeb0ad3dfac9ac46f3bb5f8ae286092240
7
+ data.tar.gz: 758b94cc1811e3e750991031e13f5070c53b274a59e99dec84948496ddb1e29da55e5537ba0d0a9beb0a62f7b8f04787e65cf5b7d1b03fd9d5e3648455ff5f20
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
3
  MINOR = 8
4
- BUGFIX = 6
4
+ BUGFIX = 7
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -29,9 +29,6 @@ module OrigenTesters
29
29
  end
30
30
  true
31
31
  end
32
- # Instantiate an instance of this class immediately when this file is required, this object will
33
- # then listen for the remainder of the Origen thread
34
- CallbackHandlers.new
35
32
 
36
33
  private
37
34
 
@@ -55,4 +52,8 @@ module OrigenTesters
55
52
  end
56
53
  end
57
54
  end
55
+
56
+ # Instantiate an instance of this class immediately when this file is required, this object will
57
+ # then listen for the remainder of the Origen thread
58
+ CallbackHandlers.new
58
59
  end
@@ -3,6 +3,9 @@ module OrigenTesters
3
3
  class Base
4
4
  include VectorBasedTester
5
5
 
6
+ # Disable inline (end of vector) comments, enabled by default
7
+ attr_accessor :inline_comments
8
+
6
9
  # Returns a new J750 instance, normally there would only ever be one of these
7
10
  # assigned to the global variable such as $tester by your target:
8
11
  # $tester = J750.new
@@ -16,6 +19,7 @@ module OrigenTesters
16
19
  @name = 'v93k'
17
20
  @comment_char = '#'
18
21
  @level_period = true
22
+ @inline_comments = true
19
23
  end
20
24
 
21
25
  # Capture the pin data from a vector to the tester.
@@ -385,27 +389,48 @@ module OrigenTesters
385
389
  else
386
390
  microcode = vec.microcode ? vec.microcode : ''
387
391
  end
388
- header_comments = ''
389
- vec.comments.each do |comment|
390
- if comment.include? '#'
391
- comment = comment.gsub(/# /, '')
392
- comment = comment.gsub(/#/, '')
393
- if comment != ''
394
- header_comments << comment + "\cm"
392
+
393
+ if Origen.mode.simulation? || !inline_comments || $_testers_no_inline_comments
394
+ comment = ''
395
+ else
396
+
397
+ header_comments = []
398
+ repeat_comment = ''
399
+ vec.comments.each_with_index do |comment, i|
400
+ if comment =~ /^#/
401
+ if comment =~ /^#(R\d+)$/
402
+ repeat_comment = Regexp.last_match(1) + ' '
403
+ # Throw away the ############# headers and footers
404
+ elsif comment !~ /^# ####################/
405
+ comment = comment.strip.sub(/^# (## )?/, '')
406
+ if comment == ''
407
+ # Throw away empty lines at the start/end, but preserve them in the middle
408
+ unless header_comments.empty? || i == vec.comments.size - 1
409
+ header_comments << comment
410
+ end
411
+ else
412
+ header_comments << comment
413
+ end
414
+ end
395
415
  end
396
416
  end
417
+
418
+ if vec.pin_vals && ($_testers_enable_vector_comments || vector_comments)
419
+ comment = "#{vec.number}:#{vec.cycle}"
420
+ comment += ': ' if !header_comments.empty? || !vec.inline_comment.empty?
421
+ else
422
+ comment = ''
423
+ end
424
+ comment += header_comments.join("\cm") unless header_comments.empty?
425
+ unless vec.inline_comment.empty?
426
+ comment += "\cm" unless header_comments.empty?
427
+ comment += "(#{vec.inline_comment})"
428
+ end
429
+ comment = "#{repeat_comment}#{comment}"
397
430
  end
398
- if vec.pin_vals && ($_testers_enable_vector_comments || vector_comments)
399
- comment = "#{header_comments}#{vec.number}:#{vec.cycle} #{vec.inline_comment}"
400
- else
401
- inline = vec.inline_comment.empty? ? '' : " # #{vec.inline_comment}"
402
- comment = " #{header_comments}#{inline}"
403
- end
404
- if Origen.mode.simulation? || $_testers_no_inline_comments
405
- comment = ''
406
- end
407
- comment.slice! 250..-1 # Max comment length 250
408
- "#{microcode.ljust(25)}#{timeset.ljust(27)}#{pin_vals}#{comment};"
431
+
432
+ # Max comment length 250 at the end
433
+ "#{microcode.ljust(25)}#{timeset.ljust(27)}#{pin_vals}# #{comment[0, 247]};"
409
434
  end
410
435
 
411
436
  # All vectors generated with the supplied block will have all pins set
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.8.6
4
+ version: 0.8.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-10-21 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.31
19
+ version: 0.7.40
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.31
26
+ version: 0.7.40
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: require_all
29
29
  requirement: !ruby/object:Gem::Requirement