origen_core_support 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 290fcca268ca3c069c200a748557821636e133b6
4
- data.tar.gz: 046d2695cbcf1dd6b9791a0664ba55285db379d4
3
+ metadata.gz: 999708ab9db10eccefefef06e4d559ab6074d81f
4
+ data.tar.gz: b8eb4b68081709f88536added176ae6b90e01ead
5
5
  SHA512:
6
- metadata.gz: 8c8f8398b205cad773aad81a4677fe9d5f9c41e4490b5ad42462fb52448d9b769824be6154cf67973ffae6e86fee36a9b285d1d485a208bd171688faed79c0a8
7
- data.tar.gz: 9cc88fade0064973a8f8aee1304c46d03a05b942fd34967409d8ea0f30609e31fc3491430c40d87b5b425814470d9b26c81bde41928ff44b60d5c8cd5e31c1ba
6
+ metadata.gz: 7dc948d060adfd2dc2dfd9c3d9b703d454a094a64aa79c0a591bf4e1f9e5f24949625e8c60c1264d690062b959834d57f458240e47dccee37c37d4854eaf54fe
7
+ data.tar.gz: 9b6375f3e9869122d4e06af6237982a734be0f25f0ae4e0be5c39a71c204085eb67ae4e218b274a575fa7ab7e798528bbae3460ac6e3d15e4dba0d2bc555552d
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenCoreSupport
2
2
  MAJOR = 0
3
3
  MINOR = 2
4
- BUGFIX = 1
4
+ BUGFIX = 2
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
data/lib/c99/nvm.rb CHANGED
@@ -1,28 +1,30 @@
1
1
  module C99
2
2
  class NVM
3
-
4
3
  attr_accessor :blocks
5
4
 
6
5
  include Origen::Pins
7
6
  include Origen::Registers
8
7
 
9
8
  def initialize
10
-
11
- add_reg :mclkdiv, 0x03, 16, :osch => { :pos => 15 },
12
- :asel => { :pos => 14 },
13
- :failctl => { :pos => 13 },
14
- :parsel => { :pos => 12 },
15
- :eccen => { :pos => 11 },
16
- :cmdloc => { :pos => 8, :bits => 3, :res => 0b001 },
17
- :clkdiv => { :pos => 0, :bits => 8, :res => 0x18 }
18
-
19
- add_reg :data, 0x4, 16, :d => { :pos => 0, :bits => 16 }
9
+ reg :mclkdiv, 0x03, size: 16 do |reg|
10
+ reg.bit 15, :osch
11
+ reg.bit 14, :asel
12
+ reg.bit 13, :failctl
13
+ reg.bit 12, :parsel
14
+ reg.bit 11, :eccen
15
+ reg.bit 10..8, :cmdloc, res: 0b001
16
+ reg.bit 7..0, :clkdiv, res: 0x18
17
+ end
18
+
19
+ reg :data, 0x4, size: 16 do |reg|
20
+ reg.bits 15..0, :d
21
+ end
20
22
 
21
23
  @blocks = [Block.new(0, self), Block.new(1, self), Block.new(2, self)]
22
24
  end
23
25
 
24
26
  def find_block_by_id(id)
25
- @blocks.select{ |block| block.id == id }.first
27
+ @blocks.find { |block| block.id == id }
26
28
  end
27
29
 
28
30
  def override_method
@@ -30,8 +32,7 @@ module C99
30
32
  end
31
33
 
32
34
  def reg_owner_alias
33
- ["flash", "fmu"]
35
+ %w(flash fmu)
34
36
  end
35
-
36
37
  end
37
38
  end
data/lib/c99/soc.rb CHANGED
@@ -5,21 +5,20 @@ module C99
5
5
  include Origen::TopLevel
6
6
 
7
7
  def initialize
8
+ add_pin :reset, reset: :drive_hi, name: 'nvm_reset'
9
+ add_pin :clk, reset: :drive_hi, name: 'nvm_clk'
10
+ add_pin :clk_mux, reset: :drive_hi, name: 'nvm_clk_mux'
11
+ add_pins :porta, reset: :drive_lo, size: 8
12
+ add_pins :portb, reset: :drive_lo, size: 8, endian: :little
13
+ add_pin :invoke, reset: :drive_lo, name: 'nvm_invoke'
14
+ add_pin :done, reset: :expect_hi, name: 'nvm_done'
15
+ add_pin :fail, reset: :expect_lo, name: 'nvm_fail'
16
+ add_pin :alvtst, reset: :dont_care, name: 'nvm_alvtst'
17
+ add_pin :ahvtst, reset: :dont_care, name: 'nvm_ahvtst'
18
+ add_pin :dtst, reset: :dont_care, name: 'nvm_dtst'
8
19
 
9
- add_pin :reset, :reset => :drive_hi, :name => "nvm_reset"
10
- add_pin :clk, :reset => :drive_hi, :name => "nvm_clk"
11
- add_pin :clk_mux, :reset => :drive_hi, :name => "nvm_clk_mux"
12
- add_port :porta, :reset => :drive_lo, :size => 8
13
- add_port :portb, :reset => :drive_lo, :size => 8, :endian => :little
14
- add_pin :invoke, :reset => :drive_lo, :name => "nvm_invoke"
15
- add_pin :done, :reset => :expect_hi, :name => "nvm_done"
16
- add_pin :fail, :reset => :expect_lo, :name => "nvm_fail"
17
- add_pin :alvtst, :reset => :dont_care, :name => "nvm_alvtst"
18
- add_pin :ahvtst, :reset => :dont_care, :name => "nvm_ahvtst"
19
- add_pin :dtst, :reset => :dont_care, :name => "nvm_dtst"
20
-
21
- add_pin :tclk, :reset => :drive_lo
22
- add_pin :trst, :reset => :drive_hi
20
+ add_pin :tclk, reset: :drive_lo
21
+ add_pin :trst, reset: :drive_hi
23
22
 
24
23
  add_pin_alias :extal, :clk
25
24
  add_pin_alias :extal_mux, :clk_mux
@@ -28,39 +27,39 @@ module C99
28
27
  add_pin_alias :tdi, :invoke
29
28
  add_pin_alias :resetb, :ahvtst
30
29
 
31
- add_pin_alias :pa5, :porta, :pin => 5
32
- add_pin_alias :pa_lower, :porta, :pins => [3..0]
33
- add_pin_alias :pa_upper, :porta, :pins => [7,6,5,4]
34
- add_port_alias :porta_alias, :porta
30
+ add_pin_alias :pa5, :porta, pin: 5
31
+ add_pin_alias :pa_lower, :porta, pins: [3..0]
32
+ add_pin_alias :pa_upper, :porta, pins: [7, 6, 5, 4]
33
+ add_pin_alias :porta_alias, :porta
35
34
 
36
35
  @a = 2
37
36
  end
38
37
 
39
38
  def startup(options)
40
39
  if options[:add_additional_pins]
41
- add_pin :late_added_pin, :reset => :drive_hi
40
+ add_pin :late_added_pin, reset: :drive_hi
42
41
  else
43
42
  # Test that rendering some vectors from a template works...
44
43
  if $tester.is_a?(OrigenTesters::J750)
45
- $tester.render("#{Origen.root}/pattern/j750/_mode_entry.atp.erb", :hold_cycles => 5)
44
+ $tester.render("#{Origen.root}/pattern/j750/_mode_entry.atp.erb", hold_cycles: 5)
46
45
  end
47
46
  end
48
- $tester.set_timeset("nvmbist", 40) if $tester.is_vector_based?
47
+ $tester.set_timeset('nvmbist', 40) if $tester.is_vector_based?
49
48
  end
50
49
 
51
50
  def has_margin0_bug?
52
51
  false
53
52
  end
54
53
 
55
- def write_register(reg, options={})
54
+ def write_register(reg, options = {})
56
55
  reg
57
56
  end
58
57
 
59
- def read_register(reg, options={})
58
+ def read_register(reg, options = {})
60
59
  reg
61
60
  end
62
61
 
63
- def base_address(reg, options={})
62
+ def base_address(reg, options = {})
64
63
  if reg.owned_by?(:nvm)
65
64
  0x4000_0000
66
65
  else
@@ -14,5 +14,3 @@ config.shared = {
14
14
  }
15
15
 
16
16
  EOT
17
-
18
-
@@ -1,2 +1,2 @@
1
- require_relative "../config/application.rb"
2
- require_relative "../config/environment.rb"
1
+ require_relative '../config/application.rb'
2
+ require_relative '../config/environment.rb'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_core_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-02 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen