origen_app_generators 0.3.1 → 0.3.2
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 -1
- data/lib/origen_app_generators/plugin.rb +2 -0
- data/lib/origen_app_generators/test_engineering/test_block.rb +7 -7
- data/templates/app_generators/application/lib/module.rb +13 -6
- data/templates/app_generators/plugin/config/boot.rb +13 -6
- data/templates/app_generators/plugin/lib/README +5 -0
- data/templates/app_generators/plugin/lib_dev/README +4 -0
- data/templates/app_generators/test_engineering/test_block/lib_dev/dut.rb +25 -0
- data/templates/app_generators/test_engineering/test_block/lib_dev/dut_controller.rb +30 -0
- data/templates/app_generators/test_engineering/test_block/target/default.rb +1 -1
- metadata +8 -5
- data/templates/app_generators/test_engineering/test_block/lib/test/dut.rb +0 -27
- data/templates/app_generators/test_engineering/test_block/lib/test/dut_controller.rb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0db247768f806c9048a8a170957e6d7911495b29
|
4
|
+
data.tar.gz: 20fc9fd317c56b32ed52fcb88d3c7737c70bf395
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3e5028c9bcdd7b4d705c9aadc7f1f78ca072c1d71ca93d7a9a4a0e304709ca487be09b2df824b3210dd84c6ff294bc96058f64e125f24e6d6144f98e6a52826
|
7
|
+
data.tar.gz: 265df3f84efee3c51223351a9c6b70b1086d28b830187b0c966f935aa75bdefbdef027ef9dbb1a2c490b68c62a0cae8d8ea78c5f37ecc1bbb03eb98e579552a3
|
data/config/version.rb
CHANGED
@@ -26,6 +26,8 @@ module OrigenAppGenerators
|
|
26
26
|
else
|
27
27
|
list[:web_navbar] = { source: 'templates/web/partials/_navbar_internal.html.erb', dest: 'templates/web/partials/_navbar.html.erb' }
|
28
28
|
end
|
29
|
+
list[:lib_readme] = { source: 'lib/README', dest: "lib/#{@name}/README" }
|
30
|
+
list[:lib_reame_dev] = { source: 'lib_dev/README', dest: "lib/#{@name}_dev/README" }
|
29
31
|
list
|
30
32
|
end
|
31
33
|
end
|
@@ -69,7 +69,7 @@ module OrigenAppGenerators
|
|
69
69
|
puts
|
70
70
|
puts "WHAT SHOULD BE THE PATH TO #{@ip_names.first} WHEN IT IS INSTANTIATED IN AN SOC?"
|
71
71
|
puts
|
72
|
-
puts 'Your
|
72
|
+
puts 'Your IP(s) will be instantiated by a top-level (SoC) model, at which point it should be given a generic nickname'
|
73
73
|
puts 'that will provide an easy way to access it.'
|
74
74
|
puts 'For example, if you had an IP model for an NVM block, the IP name might be "FLASH_C40_512K_128K", but when it is'
|
75
75
|
puts 'instantiated it would be given the name "flash", allowing it be easily accessed as "dut.flash".'
|
@@ -130,12 +130,12 @@ module OrigenAppGenerators
|
|
130
130
|
list[:environment_default] = { source: 'ultraflex.rb', # Relative to the file being linked to
|
131
131
|
dest: 'environment/default.rb', # Relative to destination_root
|
132
132
|
type: :symlink }
|
133
|
-
list[:
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
list[:
|
138
|
-
|
133
|
+
list[:dev_dut] = { source: 'lib_dev/dut.rb',
|
134
|
+
dest: "lib/#{@name}_dev/dut.rb",
|
135
|
+
options: { class_name: @ip_names.first, sub_block_name: @sub_block_name }
|
136
|
+
}
|
137
|
+
list[:dev_dutc] = { source: 'lib_dev/dut_controller.rb',
|
138
|
+
dest: "lib/#{@name}_dev/dut_controller.rb"
|
139
139
|
}
|
140
140
|
|
141
141
|
@ip_names.each_with_index do |name, i|
|
@@ -3,13 +3,20 @@ require 'origen'
|
|
3
3
|
require_relative '../config/application.rb'
|
4
4
|
<% end -%>
|
5
5
|
module <%= @namespace %>
|
6
|
-
|
7
|
-
#
|
8
|
-
#
|
6
|
+
<% if @type == :plugin -%>
|
7
|
+
# THIS FILE SHOULD ONLY BE USED TO LOAD RUNTIME DEPENDENCIES
|
8
|
+
# If this plugin has any development dependencies (e.g. dummy DUT or other models that are only used
|
9
|
+
# for testing), then these should be loaded from config/boot.rb
|
10
|
+
|
11
|
+
<% end -%>
|
12
|
+
# Example of how to explicitly require a file
|
13
|
+
# require "<%= @name %>/my_file"
|
14
|
+
|
15
|
+
# Load all files in the lib/<%= @name %> directory.
|
9
16
|
# Note that there is no problem from requiring a file twice (Ruby will ignore
|
10
|
-
# the second require), so if you have a file that must be required
|
11
|
-
#
|
12
|
-
Dir.glob("#{File.dirname(__FILE__)}
|
17
|
+
# the second require), so if you have a file that must be required first, then
|
18
|
+
# explicitly require it up above and then let this take care of the rest.
|
19
|
+
Dir.glob("#{File.dirname(__FILE__)}/<%= @name %>/**/*.rb").sort.each do |file|
|
13
20
|
require file
|
14
21
|
end
|
15
22
|
end
|
@@ -5,13 +5,20 @@
|
|
5
5
|
# case only lib/<%= @name %>.rb is loaded.
|
6
6
|
#
|
7
7
|
# Therefore this file can be used to load anything extra that you need to boot
|
8
|
-
# the development environment for this app. For example this is typically used
|
8
|
+
# the development environment for this app. For example, this is typically used
|
9
9
|
# to load some additional test classes to use your plugin APIs so that they can
|
10
10
|
# be tested and/or interacted with in the console.
|
11
11
|
require "<%= @name %>"
|
12
12
|
|
13
|
-
|
14
|
-
#
|
15
|
-
#
|
16
|
-
|
17
|
-
#
|
13
|
+
module <%= @namespace %>Dev
|
14
|
+
# Example of how to explicitly require a file
|
15
|
+
# require "<%= @name %>_dev/my_file"
|
16
|
+
|
17
|
+
# Load all files in the lib/<%= @name %>_dev directory.
|
18
|
+
# Note that there is no problem from requiring a file twice (Ruby will ignore
|
19
|
+
# the second require), so if you have a file that must be required first, then
|
20
|
+
# explicitly require it up above and then let this take care of the rest.
|
21
|
+
Dir.glob("#{File.dirname(__FILE__)}/../lib/<%= @name %>_dev/**/*.rb").sort.each do |file|
|
22
|
+
require file
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
This directory should include any code related to testing, documentation, etc., but which
|
2
|
+
will not be required whenever this plugin is actually used within a 3rd party application.
|
3
|
+
|
4
|
+
Any code that will be required when used within a 3rd party application, should be placed
|
5
|
+
in lib/<%= @name %> instead.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module <%= @namespace %>Dev
|
2
|
+
# This is a dummy DUT class that should be used to test that your test module can
|
3
|
+
# integrate into a top-level app
|
4
|
+
class DUT
|
5
|
+
include Origen::TopLevel
|
6
|
+
|
7
|
+
def initialize(options = {})
|
8
|
+
instantiate_pins(options)
|
9
|
+
instantiate_sub_blocks(options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def instantiate_pins(options)
|
13
|
+
add_pin :tclk
|
14
|
+
add_pin :tdi
|
15
|
+
add_pin :tdo
|
16
|
+
add_pin :tms
|
17
|
+
add_pin :resetb
|
18
|
+
end
|
19
|
+
|
20
|
+
def instantiate_sub_blocks(options)
|
21
|
+
sub_block :arm_debug, class_name: 'OrigenARMDebug::Driver', aps: { mem_ap: 0x0, mdmap: 0x0100_0000 }
|
22
|
+
sub_block :<%= options[:sub_block_name] %>, class_name: '<%= @namespace %>::<%= options[:class_name] %>', base_address: 0x1000_0000
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module <%= @namespace %>Dev
|
2
|
+
# This is a dummy DUT controller that should be used to test that your test module can
|
3
|
+
# integrate into a top-level app
|
4
|
+
class DUTController
|
5
|
+
include Origen::TopLevel
|
6
|
+
include OrigenJTAG
|
7
|
+
include OrigenARMDebug
|
8
|
+
|
9
|
+
def startup(options = {})
|
10
|
+
tester.set_timeset('func_25', 40)
|
11
|
+
ss 'Startup the SoC'
|
12
|
+
pin(:resetb).drive!(0)
|
13
|
+
100.cycles
|
14
|
+
pin(:resetb).dont_care
|
15
|
+
end
|
16
|
+
|
17
|
+
def shutdown(options = {})
|
18
|
+
ss 'Shutdown the SoC'
|
19
|
+
pin(:resetb).drive!(0)
|
20
|
+
end
|
21
|
+
|
22
|
+
def write_register(reg, options = {})
|
23
|
+
arm_debug.write_register(reg, options)
|
24
|
+
end
|
25
|
+
|
26
|
+
def read_register(reg, options = {})
|
27
|
+
arm_debug.read_register(reg, options)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -1,2 +1,2 @@
|
|
1
1
|
# Instantiate a DUT instance, this will be globally available as 'dut'
|
2
|
-
<%= @namespace
|
2
|
+
<%= @namespace %>Dev::DUT.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen_app_generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.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: 2016-
|
11
|
+
date: 2016-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- templates/app_generators/application/config/maillist_prod.txt
|
62
62
|
- templates/app_generators/application/config/version.rb
|
63
63
|
- templates/app_generators/application/doc/history
|
64
|
+
- templates/app_generators/application/lib/.module.rb.swp
|
64
65
|
- templates/app_generators/application/lib/app.rake
|
65
66
|
- templates/app_generators/application/lib/module.rb
|
66
67
|
- templates/app_generators/application/lib/top_level.rb
|
@@ -79,6 +80,8 @@ files:
|
|
79
80
|
- templates/app_generators/plugin/Rakefile
|
80
81
|
- templates/app_generators/plugin/config/boot.rb
|
81
82
|
- templates/app_generators/plugin/gemspec.rb
|
83
|
+
- templates/app_generators/plugin/lib/README
|
84
|
+
- templates/app_generators/plugin/lib_dev/README
|
82
85
|
- templates/app_generators/plugin/templates/web/index.md.erb
|
83
86
|
- templates/app_generators/plugin/templates/web/partials/_navbar_external.html.erb
|
84
87
|
- templates/app_generators/plugin/templates/web/partials/_navbar_internal.html.erb
|
@@ -99,8 +102,8 @@ files:
|
|
99
102
|
- templates/app_generators/test_engineering/test_block/lib/controller.rb
|
100
103
|
- templates/app_generators/test_engineering/test_block/lib/interface.rb
|
101
104
|
- templates/app_generators/test_engineering/test_block/lib/model.rb
|
102
|
-
- templates/app_generators/test_engineering/test_block/
|
103
|
-
- templates/app_generators/test_engineering/test_block/
|
105
|
+
- templates/app_generators/test_engineering/test_block/lib_dev/dut.rb
|
106
|
+
- templates/app_generators/test_engineering/test_block/lib_dev/dut_controller.rb
|
104
107
|
- templates/app_generators/test_engineering/test_block/pattern/example.rb
|
105
108
|
- templates/app_generators/test_engineering/test_block/program/prb1.rb
|
106
109
|
- templates/app_generators/test_engineering/test_block/target/default.rb
|
@@ -124,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
127
|
version: 1.8.11
|
125
128
|
requirements: []
|
126
129
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.4.5
|
128
131
|
signing_key:
|
129
132
|
specification_version: 4
|
130
133
|
summary: Origen application generators
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module <%= @namespace %>
|
2
|
-
module Test
|
3
|
-
# This is a dummy DUT class that should be used to test that your test module can
|
4
|
-
# integrate into a top-level app
|
5
|
-
class DUT
|
6
|
-
include Origen::TopLevel
|
7
|
-
|
8
|
-
def initialize(options = {})
|
9
|
-
instantiate_pins(options)
|
10
|
-
instantiate_sub_blocks(options)
|
11
|
-
end
|
12
|
-
|
13
|
-
def instantiate_pins(options)
|
14
|
-
add_pin :tclk
|
15
|
-
add_pin :tdi
|
16
|
-
add_pin :tdo
|
17
|
-
add_pin :tms
|
18
|
-
add_pin :resetb
|
19
|
-
end
|
20
|
-
|
21
|
-
def instantiate_sub_blocks(options)
|
22
|
-
sub_block :arm_debug, class_name: 'OrigenARMDebug::Driver', aps: { mem_ap: 0x0, mdmap: 0x0100_0000 }
|
23
|
-
sub_block :<%= options[:sub_block_name] %>, class_name: '<%= @namespace %>::<%= options[:class_name] %>', base_address: 0x1000_0000
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
module <%= @namespace %>
|
2
|
-
module Test
|
3
|
-
# This is a dummy DUT controller that should be used to test that your test module can
|
4
|
-
# integrate into a top-level app
|
5
|
-
class DUTController
|
6
|
-
include Origen::TopLevel
|
7
|
-
include OrigenJTAG
|
8
|
-
include OrigenARMDebug
|
9
|
-
|
10
|
-
def startup(options = {})
|
11
|
-
tester.set_timeset('func_25', 40)
|
12
|
-
ss 'Startup the SoC'
|
13
|
-
pin(:resetb).drive!(0)
|
14
|
-
100.cycles
|
15
|
-
pin(:resetb).dont_care
|
16
|
-
end
|
17
|
-
|
18
|
-
def shutdown(options = {})
|
19
|
-
ss 'Shutdown the SoC'
|
20
|
-
pin(:resetb).drive!(0)
|
21
|
-
end
|
22
|
-
|
23
|
-
def write_register(reg, options = {})
|
24
|
-
arm_debug.write_register(reg, options)
|
25
|
-
end
|
26
|
-
|
27
|
-
def read_register(reg, options = {})
|
28
|
-
arm_debug.read_register(reg, options)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|