origen_ahb 0.2.0.pre5 → 0.2.0.pre6
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_ahb/driver.rb +18 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dad9b0541a36c1a019d291224a68259a76e0c23d
|
4
|
+
data.tar.gz: be04c303f2c819a128fc37e5bd449de24bdf6be1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 113207f1f4bce8cfffee756a0f417b006d7e51e61f078f8a8613a16235a9e98dc1a9cc075b2c9d8a9cffa153d2ab6e98dab3701490ca3068c88062d80ff87953
|
7
|
+
data.tar.gz: 4f4603b273f969fea4fdf9da5fe1a0ccd5938a47308c7e94715d245a238166929ff521d9b414d2d0aa3ee8b080fca96e079d0daf49de525437eaf8263f84fa8f
|
data/config/version.rb
CHANGED
data/lib/origen_ahb/driver.rb
CHANGED
@@ -8,8 +8,8 @@ module OrigenAhb
|
|
8
8
|
|
9
9
|
def read_register(reg_or_val, options = {})
|
10
10
|
options = {
|
11
|
-
haddr: reg_or_val.address,
|
12
|
-
hdata: reg_or_val
|
11
|
+
haddr: options[:address] || reg_or_val.address,
|
12
|
+
hdata: reg_or_val,
|
13
13
|
hwrite: 0,
|
14
14
|
hsize: get_hsize(reg_or_val.size),
|
15
15
|
hburst: 0,
|
@@ -17,14 +17,20 @@ module OrigenAhb
|
|
17
17
|
hprot: 0xF
|
18
18
|
}.merge(options)
|
19
19
|
cc '==== AHB Read Transaction ===='
|
20
|
-
|
20
|
+
if reg_or_val.respond_to?('data')
|
21
|
+
data = reg_or_val.data
|
22
|
+
else
|
23
|
+
data = reg_or_val
|
24
|
+
options[:hsize] = 2
|
25
|
+
end
|
26
|
+
cc 'Address: 0x' + options[:haddr].to_s(16) + ' Data: 0x' + data.to_s(16) + ' Size: ' + options[:hsize].to_s
|
21
27
|
$dut.ahb_trans(options)
|
22
28
|
end
|
23
29
|
|
24
30
|
def write_register(reg_or_val, options = {})
|
25
31
|
options = {
|
26
|
-
haddr: reg_or_val.address,
|
27
|
-
hdata: reg_or_val
|
32
|
+
haddr: options[:address] || reg_or_val.address,
|
33
|
+
hdata: reg_or_val,
|
28
34
|
hwrite: 1,
|
29
35
|
hsize: get_hsize(reg_or_val.size),
|
30
36
|
hburst: 0,
|
@@ -32,7 +38,13 @@ module OrigenAhb
|
|
32
38
|
hprot: 0xF
|
33
39
|
}.merge(options)
|
34
40
|
cc '==== AHB Write Transaction ===='
|
35
|
-
|
41
|
+
if reg_or_val.respond_to?('data')
|
42
|
+
data = reg_or_val.data
|
43
|
+
else
|
44
|
+
data = reg_or_val
|
45
|
+
options[:hsize] = 2
|
46
|
+
end
|
47
|
+
cc 'Address: 0x' + options[:haddr].to_s(16) + ' Data: 0x' + data.to_s(16) + ' Size: ' + options[:hsize].to_s
|
36
48
|
$dut.ahb_trans(options)
|
37
49
|
end
|
38
50
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen_ahb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.pre6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris P Nappi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|