origen_app_generators 1.1.4 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/boot.rb +4 -2
- data/config/commands.rb +3 -3
- data/config/shared_commands.rb +17 -10
- data/config/version.rb +3 -4
- data/lib/origen_app_generators.rb +6 -4
- data/lib/origen_app_generators/application.rb +12 -12
- data/lib/origen_app_generators/base.rb +53 -9
- data/lib/origen_app_generators/new.rb +17 -9
- data/lib/{tasks/new_app_tests.rake → origen_app_generators/new_app_tests.rb} +1 -5
- data/lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb +6 -8
- data/lib/origen_app_generators/plugin.rb +4 -7
- data/lib/origen_app_generators/test_engineering/common.rb +29 -0
- data/lib/origen_app_generators/test_engineering/stand_alone_application.rb +9 -181
- data/lib/origen_app_generators/test_engineering/test_block.rb +4 -105
- data/templates/app_generators/application/Gemfile +17 -5
- data/templates/app_generators/application/{lib → app/blocks}/top_level.rb +1 -1
- data/templates/app_generators/application/app/lib/module.rb +6 -0
- data/templates/app_generators/application/{templates → app/templates}/web/index.md.erb +0 -0
- data/templates/app_generators/application/{templates → app/templates}/web/layouts/_basic.html.erb +0 -0
- data/templates/app_generators/application/{templates → app/templates}/web/partials/_navbar.html.erb +0 -0
- data/templates/app_generators/application/{templates → app/templates}/web/release_notes.md.erb +0 -0
- data/templates/app_generators/application/config/application.rb +51 -55
- data/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/application.rb +0 -0
- data/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/base.rb +0 -0
- data/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/module.rb +0 -0
- data/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/plugin.rb +0 -0
- data/templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb +1 -1
- data/templates/app_generators/plugin/Gemfile +13 -4
- data/templates/app_generators/plugin/{templates → app/templates}/web/index.md.erb +0 -0
- data/templates/app_generators/plugin/{templates → app/templates}/web/partials/_navbar_external.html.erb +0 -0
- data/templates/app_generators/plugin/{templates → app/templates}/web/partials/_navbar_internal.html.erb +0 -0
- data/templates/app_generators/plugin/gemspec.rb +4 -3
- data/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/j750.rb +0 -0
- data/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/uflex.rb +0 -0
- data/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/v93k.rb +0 -0
- data/templates/app_generators/test_engineering/stand_alone_application/.keep +0 -0
- data/templates/app_generators/test_engineering/test_block/.keep +0 -0
- metadata +25 -48
- data/bin/fix_my_workspace +0 -100
- data/lib/origen_app_generators/sub_block_parser.rb +0 -81
- data/lib/tasks/app_generators.rake +0 -6
- data/templates/app_generators/application/lib/app.rake +0 -6
- data/templates/app_generators/application/lib/module.rb +0 -22
- data/templates/app_generators/plugin/lib/README +0 -4
- data/templates/app_generators/plugin/lib_dev/README +0 -5
- data/templates/app_generators/test_engineering/stand_alone_application/Gemfile +0 -20
- data/templates/app_generators/test_engineering/stand_alone_application/environment/jlink.rb +0 -1
- data/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb +0 -23
- data/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block_controller.rb +0 -5
- data/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb +0 -33
- data/templates/app_generators/test_engineering/stand_alone_application/lib/top_level_controller.rb +0 -21
- data/templates/app_generators/test_engineering/stand_alone_application/pattern/example.rb +0 -4
- data/templates/app_generators/test_engineering/stand_alone_application/target/top_level.rb +0 -4
- data/templates/app_generators/test_engineering/test_block/environment/j750.rb +0 -2
- data/templates/app_generators/test_engineering/test_block/environment/ultraflex.rb +0 -2
- data/templates/app_generators/test_engineering/test_block/environment/v93k.rb +0 -2
- data/templates/app_generators/test_engineering/test_block/lib/controller.rb +0 -12
- data/templates/app_generators/test_engineering/test_block/lib/interface.rb +0 -21
- data/templates/app_generators/test_engineering/test_block/lib/model.rb +0 -18
- data/templates/app_generators/test_engineering/test_block/lib_dev/dut.rb +0 -27
- data/templates/app_generators/test_engineering/test_block/lib_dev/dut_controller.rb +0 -26
- data/templates/app_generators/test_engineering/test_block/pattern/example.rb +0 -5
- data/templates/app_generators/test_engineering/test_block/program/prb1.rb +0 -11
- data/templates/app_generators/test_engineering/test_block/target/default.rb +0 -2
@@ -1,5 +0,0 @@
|
|
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.
|
@@ -1,20 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
<% if (@audience != :external) && Origen.site_config.gem_server -%>
|
3
|
-
source '<%= Origen.site_config.gem_server %>'
|
4
|
-
<% end -%>
|
5
|
-
|
6
|
-
gem 'origen', '>= <%= @latest_origen_version %>'
|
7
|
-
|
8
|
-
gem 'origen_testers'
|
9
|
-
|
10
|
-
gem 'origen_debuggers'
|
11
|
-
|
12
|
-
gem 'origen_doc_helpers'
|
13
|
-
|
14
|
-
gem 'byebug'
|
15
|
-
|
16
|
-
gem 'origen_updater'
|
17
|
-
|
18
|
-
# Uncomment these if you want to use a visual debugger (e.g. Visual Studio Code) to debug your app
|
19
|
-
#gem 'ruby-debug-ide'
|
20
|
-
#gem 'debase'
|
@@ -1 +0,0 @@
|
|
1
|
-
OrigenDebuggers::JLink.new
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module <%= @namespace %>
|
2
|
-
class <%= @options[:name] %>
|
3
|
-
include Origen::Model
|
4
|
-
|
5
|
-
def initialize(options = {})
|
6
|
-
instantiate_registers(options)
|
7
|
-
instantiate_sub_blocks(options)
|
8
|
-
end
|
9
|
-
|
10
|
-
def instantiate_registers(options = {})
|
11
|
-
end
|
12
|
-
|
13
|
-
def instantiate_sub_blocks(options = {})
|
14
|
-
<% @options[:sub_blocks].each do |name, attrs| -%>
|
15
|
-
<% if attrs[:instances] -%>
|
16
|
-
sub_block :<%= name.underscore %>, instances: <%= attrs[:instances] %>, class_name: '<%= name.camelize %>'
|
17
|
-
<% else -%>
|
18
|
-
sub_block :<%= name.underscore %>, class_name: '<%= name.camelize %>'
|
19
|
-
<% end -%>
|
20
|
-
<% end -%>
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module <%= @namespace %>
|
2
|
-
class <%= @options[:name] || 'TopLevel' %>
|
3
|
-
include Origen::TopLevel
|
4
|
-
|
5
|
-
def initialize(options = {})
|
6
|
-
instantiate_pins(options)
|
7
|
-
instantiate_registers(options)
|
8
|
-
instantiate_sub_blocks(options)
|
9
|
-
end
|
10
|
-
|
11
|
-
def instantiate_pins(options = {})
|
12
|
-
add_pin :tclk
|
13
|
-
add_pin :tdi
|
14
|
-
add_pin :tdo
|
15
|
-
add_pin :tms
|
16
|
-
add_pin :resetb
|
17
|
-
add_pins :port_a, size: 8
|
18
|
-
end
|
19
|
-
|
20
|
-
def instantiate_registers(options = {})
|
21
|
-
end
|
22
|
-
|
23
|
-
def instantiate_sub_blocks(options = {})
|
24
|
-
<% @options[:sub_blocks].each do |name, attrs| -%>
|
25
|
-
<% if attrs[:instances] -%>
|
26
|
-
sub_block :<%= name.underscore %>, instances: <%= attrs[:instances] %>, class_name: '<%= name.camelize %>'
|
27
|
-
<% else -%>
|
28
|
-
sub_block :<%= name.underscore %>, class_name: '<%= name.camelize %>'
|
29
|
-
<% end -%>
|
30
|
-
<% end -%>
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
data/templates/app_generators/test_engineering/stand_alone_application/lib/top_level_controller.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module <%= @namespace %>
|
2
|
-
class <%= @options[:name] || 'TopLevel' %>Controller
|
3
|
-
include Origen::Controller
|
4
|
-
|
5
|
-
def startup(options)
|
6
|
-
pp 'Enter test mode' do
|
7
|
-
tester.set_timeset('func_25mhz', 40) # Where 40 is the period in ns
|
8
|
-
pin(:tclk).drive!(1)
|
9
|
-
pin(:resetb).drive!(1)
|
10
|
-
tester.wait time_in_us: 100
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def shutdown(options)
|
15
|
-
pp 'Reset the device' do
|
16
|
-
pin(:resetb).drive!(0)
|
17
|
-
pin(:tclk).drive!(0)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module <%= @namespace %>
|
2
|
-
class <%= @options[:name] %>Controller
|
3
|
-
include Origen::Controller
|
4
|
-
|
5
|
-
def do_something
|
6
|
-
# The config register is defined in the corresponding model
|
7
|
-
config.mode.write!(0x14)
|
8
|
-
tester.wait(time_in_us: 100)
|
9
|
-
config.secure.read!(0)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module <%= @namespace %>
|
2
|
-
class Interface
|
3
|
-
include OrigenTesters::ProgramGenerators
|
4
|
-
|
5
|
-
# This will be called at the start of every flow or sub-flow (whenever Flow.create
|
6
|
-
# is called).
|
7
|
-
# Any options passed to Flow.create will be passed in here.
|
8
|
-
# The options will contain top_level: true, whenever this is called at the start of
|
9
|
-
# a new top-level flow.
|
10
|
-
def startup(options = {})
|
11
|
-
end
|
12
|
-
|
13
|
-
# This will be called at the end of every flow or sub-flow (at the end of every
|
14
|
-
# Flow.create block).
|
15
|
-
# Any options passed to Flow.create will be passed in here.
|
16
|
-
# The options will contain top_level: true, whenever this is called at the end of a
|
17
|
-
# top-level flow file.
|
18
|
-
def shutdown(options = {})
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module <%= @namespace %>
|
2
|
-
class <%= @options[:name] %>
|
3
|
-
include Origen::Model
|
4
|
-
|
5
|
-
def initialize(options = {})
|
6
|
-
instantiate_registers(options)
|
7
|
-
end
|
8
|
-
|
9
|
-
def instantiate_registers(options)
|
10
|
-
# Define your IP's registers here
|
11
|
-
reg :config, 0x0, size: 32 do |reg|
|
12
|
-
reg.bits 15..8, :mode
|
13
|
-
reg.bit 1, :ext_clk, reset: 1
|
14
|
-
reg.bit 0, :secure, access: :ro
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,27 +0,0 @@
|
|
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
|
-
include OrigenJTAG
|
7
|
-
include OrigenARMDebug
|
8
|
-
|
9
|
-
def initialize(options = {})
|
10
|
-
instantiate_pins(options)
|
11
|
-
instantiate_sub_blocks(options)
|
12
|
-
end
|
13
|
-
|
14
|
-
def instantiate_pins(options)
|
15
|
-
add_pin :tclk
|
16
|
-
add_pin :tdi
|
17
|
-
add_pin :tdo
|
18
|
-
add_pin :tms
|
19
|
-
add_pin :resetb
|
20
|
-
end
|
21
|
-
|
22
|
-
def instantiate_sub_blocks(options)
|
23
|
-
sub_block :arm_debug, class_name: 'OrigenARMDebug::DAP', mem_aps: { mem_ap: 0x0, mdmap: 0x0100_0000 }
|
24
|
-
sub_block :<%= options[:sub_block_name] %>, class_name: '<%= @namespace %>::<%= options[:class_name] %>', base_address: 0x1000_0000
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,26 +0,0 @@
|
|
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
|
-
def startup(options = {})
|
6
|
-
tester.set_timeset('func_25', 40)
|
7
|
-
ss 'Startup the SoC'
|
8
|
-
pin(:resetb).drive!(0)
|
9
|
-
100.cycles
|
10
|
-
pin(:resetb).dont_care
|
11
|
-
end
|
12
|
-
|
13
|
-
def shutdown(options = {})
|
14
|
-
ss 'Shutdown the SoC'
|
15
|
-
pin(:resetb).drive!(0)
|
16
|
-
end
|
17
|
-
|
18
|
-
def write_register(reg, options = {})
|
19
|
-
arm_debug.mem_ap.write_register(reg, options)
|
20
|
-
end
|
21
|
-
|
22
|
-
def read_register(reg, options = {})
|
23
|
-
arm_debug.mem_ap.read_register(reg, options)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|