origen_swd 0.3.6 → 0.3.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: 9bbdb4d886f3fb4a3a902e11445c933e7cf1da07
4
- data.tar.gz: aad012c09a3e8c9e42a7278ac8429da170328229
3
+ metadata.gz: 34a6dec79a10f5798971c222d87e2d913cd63c47
4
+ data.tar.gz: cca491956939e7c6b8665ed83c310e268a7825b2
5
5
  SHA512:
6
- metadata.gz: 56b46d1f1888e993eb09a262149ca3eebde26bc4145e362f149e8fa7486988da7896e9cdea0b26b70eeaa55178339b176151f16b82a881252c8194498d0ac87f
7
- data.tar.gz: ce48cd2b7228889c8c26c0d1229e5b1cad64380791fe4835fe717d62bb6a965e4664a46de3492c4e44dc3e2d1fee9d4ef730992976745787cefcc8a2b4b86460
6
+ metadata.gz: ccdfc7976acdde52b45e20e191f58441b3ea1b11112ef17a6a9fdae9121d69a497bb55b63ecd0e426cd77b9b87d762476e78349b2428dc15fabeb11919728893
7
+ data.tar.gz: 991dbd61c91ece8913f8ad3564b30b5796dd03d5e7470c0688ba9bf7b3e868a2ac7c54f56a56def365440d85fd389be1aeacb2bb25296465b8b89b84d25cc0b2
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenSWD
2
2
  MAJOR = 0
3
3
  MINOR = 3
4
- BUGFIX = 6
4
+ BUGFIX = 7
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -8,13 +8,18 @@ module OrigenSWD
8
8
  # either a DUT object or a protocol abstraction
9
9
  attr_reader :owner
10
10
 
11
+ # Initialize class variables
11
12
  def initialize(owner, options = {})
12
13
  @owner = owner
13
14
  @current_apaddr = 0
14
15
  @orundetect = 0
15
16
  end
16
17
 
17
- # Hardware interface
18
+ # Sends data stream with SWD protocol
19
+ # -data = data to be sent
20
+ # -size = the length of data
21
+ # -options[:overlay] = string for pattern label to facilitate pattern overlay
22
+ # -no return value
18
23
  def send_data(data, size, options = {})
19
24
  if options.key?(:overlay)
20
25
  $tester.label(options[:overlay])
@@ -35,6 +40,9 @@ module OrigenSWD
35
40
  end
36
41
  end
37
42
 
43
+ # Recieves data stream with SWD protocol
44
+ # -size = the length of data
45
+ # -options[:compare_data] = data to be compared, only compared if options is set
38
46
  def get_data(size, options = {})
39
47
  should_store = $dut.pin(:swd_dio).is_to_be_stored?
40
48
  owner.pin(:swd_dio).dont_care
@@ -45,6 +53,9 @@ module OrigenSWD
45
53
  end
46
54
  end
47
55
 
56
+ # Sends specified number of '0' bits
57
+ # -size = the length of data
58
+ # -no return value
48
59
  def swd_dio_to_0(size)
49
60
  owner.pin(:swd_dio).drive(0)
50
61
  size.times do |bit|
@@ -10,6 +10,7 @@ module OrigenSWD
10
10
  include Origen::Registers
11
11
  include Origen::Pins
12
12
 
13
+ # Initialize simple dut model with test register and required swd pins
13
14
  def initialize(options = {})
14
15
  add_reg :test, 0x0, 32, data: { pos: 0, bits: 32 },
15
16
  bit: { pos: 0 }
@@ -17,6 +18,8 @@ module OrigenSWD
17
18
  add_pin :swd_dio
18
19
  end
19
20
 
21
+ # Add any custom startup business here.
22
+ # -initialize timeset
20
23
  def startup(options)
21
24
  $tester.set_timeset('swd', 40)
22
25
  end
data/lib/origen_swd.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'origen'
2
2
  require_relative '../config/application.rb'
3
3
 
4
+ # Include this module to add a SWD driver to your class
4
5
  module OrigenSWD
5
6
  autoload :Driver, 'origen_swd/driver'
6
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_swd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronnie Lajaunie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-18 00:00:00.000000000 Z
11
+ date: 2015-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen