origen_swd 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/origen_swd/driver.rb +13 -8
- data/lib/origen_swd/dut.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a342912c75db291ab33ef9739b6babd1df79a0b8
|
4
|
+
data.tar.gz: 6d05a4646c429052e7a4d4041f710ab38cef1117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 362376b2cefb1ccb0fede19bb8c61e3f818ca0f721682a4e4fe5c066cf81213242a0f2eed66e34804ed8a975ccc9af1c8e87590146ca900495bc27a336ce51b2
|
7
|
+
data.tar.gz: e6dd940a29994cab9ab6460ceea7c4e79f659d6876e691f3cc8f76513efd83b3bfbc3ac56ba91f6e66f32bc74eaf02b23c30ada880397f32bc87e68b9ee585f3
|
data/config/version.rb
CHANGED
data/lib/origen_swd/driver.rb
CHANGED
@@ -9,6 +9,8 @@ module OrigenSWD
|
|
9
9
|
attr_reader :owner
|
10
10
|
|
11
11
|
# Initialize class variables
|
12
|
+
# owner - parent object
|
13
|
+
# options - any miscellaneous custom arguments
|
12
14
|
def initialize(owner, options = {})
|
13
15
|
@owner = owner
|
14
16
|
@current_apaddr = 0
|
@@ -16,10 +18,11 @@ module OrigenSWD
|
|
16
18
|
end
|
17
19
|
|
18
20
|
# Sends data stream with SWD protocol
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
21
|
+
# data - data to be sent
|
22
|
+
# size - the length of data
|
23
|
+
# options - any miscellaneous custom arguments
|
24
|
+
# options[:overlay] - string for pattern label to facilitate pattern overlay
|
25
|
+
# Returns nothing.
|
23
26
|
def send_data(data, size, options = {})
|
24
27
|
if options.key?(:overlay)
|
25
28
|
$tester.label(options[:overlay])
|
@@ -41,8 +44,10 @@ module OrigenSWD
|
|
41
44
|
end
|
42
45
|
|
43
46
|
# Recieves data stream with SWD protocol
|
44
|
-
#
|
45
|
-
#
|
47
|
+
# size - the length of data
|
48
|
+
# options - any miscellaneous custom arguments
|
49
|
+
# options[:compare_data] - data to be compared, only compared if options is set
|
50
|
+
# Returns nothing.
|
46
51
|
def get_data(size, options = {})
|
47
52
|
should_store = $dut.pin(:swd_dio).is_to_be_stored?
|
48
53
|
owner.pin(:swd_dio).dont_care
|
@@ -54,8 +59,8 @@ module OrigenSWD
|
|
54
59
|
end
|
55
60
|
|
56
61
|
# Sends specified number of '0' bits
|
57
|
-
#
|
58
|
-
#
|
62
|
+
# size - the length of data
|
63
|
+
# Returns nothing.
|
59
64
|
def swd_dio_to_0(size)
|
60
65
|
owner.pin(:swd_dio).drive(0)
|
61
66
|
size.times do |bit|
|
data/lib/origen_swd/dut.rb
CHANGED
@@ -10,7 +10,7 @@ module OrigenSWD
|
|
10
10
|
include Origen::Registers
|
11
11
|
include Origen::Pins
|
12
12
|
|
13
|
-
#
|
13
|
+
# Initializes simple dut model with test register and required swd pins
|
14
14
|
def initialize(options = {})
|
15
15
|
add_reg :test, 0x0, 32, data: { pos: 0, bits: 32 },
|
16
16
|
bit: { pos: 0 }
|
@@ -19,8 +19,8 @@ module OrigenSWD
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# Add any custom startup business here.
|
22
|
-
#
|
23
|
-
def startup(options)
|
22
|
+
# Ex. initialize timeset
|
23
|
+
def startup(options = {})
|
24
24
|
$tester.set_timeset('swd', 40)
|
25
25
|
end
|
26
26
|
end
|