origen_swd 1.1.2 → 1.1.3
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 +4 -4
- data/config/version.rb +1 -2
- data/lib/origen_swd/driver.rb +8 -4
- data/lib/origen_swd.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51a97998eec9af382325c0f868198587bca8b8881c8508e2f57b9b9e5c252861
|
4
|
+
data.tar.gz: 95ae1faa26434393293358c049841a6fa64fece8aac409f300df2db5bb4cc1bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a831ddbb5f522b5af31f3b78fb62c9fda0301125db220a74d4f88ef01c77564823f5bc5911f788ddd8522a9b92af5e32480dbec702e5924a67e8b03d1d18482
|
7
|
+
data.tar.gz: 51cd717bcd6c2bceca23fef362650cdab42a011566b6b3387b6d9629e447c4ca6b77b99ed914ff4bdc2e21241c036d460b4a5e2ea8508012f470fd2baee2ef02
|
data/config/version.rb
CHANGED
data/lib/origen_swd/driver.rb
CHANGED
@@ -14,6 +14,7 @@ module OrigenSWD
|
|
14
14
|
|
15
15
|
# Customiz-ible 'turn-round cycle' (TRN) parameter (in cycles)
|
16
16
|
attr_accessor :trn
|
17
|
+
attr_accessor :posedge_clk
|
17
18
|
|
18
19
|
# Initialize class variables
|
19
20
|
#
|
@@ -30,6 +31,7 @@ module OrigenSWD
|
|
30
31
|
@current_apaddr = 0
|
31
32
|
@orundetect = 0
|
32
33
|
@trn = 0
|
34
|
+
@posedge_clk = '1'
|
33
35
|
end
|
34
36
|
|
35
37
|
# Write data from Debug Port
|
@@ -143,6 +145,7 @@ module OrigenSWD
|
|
143
145
|
return reg_or_val.address if reg_or_val.respond_to?(:address)
|
144
146
|
return reg_or_val.addr if reg_or_val.respond_to?(:addr)
|
145
147
|
return reg_or_val if reg_or_val && options[:use_reg_or_val_if_you_must]
|
148
|
+
|
146
149
|
fail 'No address given, if supplying a data value instead of a register object, you must supply an :address option'
|
147
150
|
end
|
148
151
|
|
@@ -158,13 +161,13 @@ module OrigenSWD
|
|
158
161
|
# @param [Integer] address Address of register that is being accessed
|
159
162
|
def send_header(apndp, rnw, address)
|
160
163
|
addr = address >> 2
|
161
|
-
parity
|
164
|
+
parity = apndp ^ rnw ^ (addr >> 3) ^ (addr >> 2) & (0x01) ^ (addr >> 1) & (0x01) ^ addr & 0x01
|
162
165
|
|
163
166
|
cc '[SWD] -----------------------------------------------------------------'
|
164
167
|
cc '[SWD] | Start | AP | Read | AD[2] | AD[3] | Par | Stop | Park |'
|
165
168
|
cc "[SWD] | 1 | #{apndp} | #{rnw} | #{addr[0]} | #{addr[1]} | #{parity[0]} | 0 | 1 |"
|
166
169
|
cc '[SWD] -----------------------------------------------------------------'
|
167
|
-
swd_clk.drive(
|
170
|
+
swd_clk.drive(posedge_clk)
|
168
171
|
swd_dio.drive!(1) # send start bit (always 1)
|
169
172
|
swd_dio.drive!(apndp) # send apndp bit
|
170
173
|
swd_dio.drive!(rnw) # send rnw bit
|
@@ -183,7 +186,8 @@ module OrigenSWD
|
|
183
186
|
# * [:success] (Default) -> Verify the acknowledgement as normal.
|
184
187
|
# @param options [Hash] Placeholder for other/future options.
|
185
188
|
# @raise [RuntimeError] When an unrecongized :confirm option is given.
|
186
|
-
def receive_acknowledgement(
|
189
|
+
def receive_acknowledgement(options = {})
|
190
|
+
confirm = options[:confirm] || :success
|
187
191
|
wait_trn
|
188
192
|
if [:ignore, :none, :skip].include?(confirm)
|
189
193
|
log('Ignoring Acknowledgement Phase')
|
@@ -279,7 +283,7 @@ module OrigenSWD
|
|
279
283
|
end
|
280
284
|
|
281
285
|
cc options[:arm_debug_comment] if options.key?(:arm_debug_comment)
|
282
|
-
swd_clk.drive(
|
286
|
+
swd_clk.drive(posedge_clk)
|
283
287
|
|
284
288
|
reg_overlay = extract_reg_overlay(reg)
|
285
289
|
if reg_overlay && !options[:no_subr] && !Origen.mode.simulation?
|
data/lib/origen_swd.rb
CHANGED
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: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ronnie Lajaunie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -63,8 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: 1.8.11
|
65
65
|
requirements: []
|
66
|
-
|
67
|
-
rubygems_version: 2.7.7
|
66
|
+
rubygems_version: 3.1.6
|
68
67
|
signing_key:
|
69
68
|
specification_version: 4
|
70
69
|
summary: Driver for single-wire-debug interface.
|