origen_app_generators 0.0.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.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/config/application.rb +146 -0
  3. data/config/commands.rb +75 -0
  4. data/config/environment.rb +1 -0
  5. data/config/users.rb +19 -0
  6. data/config/version.rb +8 -0
  7. data/lib/origen_app_generators/application.rb +62 -0
  8. data/lib/origen_app_generators/base.rb +201 -0
  9. data/lib/origen_app_generators/generic_application.rb +15 -0
  10. data/lib/origen_app_generators/generic_plugin.rb +15 -0
  11. data/lib/origen_app_generators/new.rb +137 -0
  12. data/lib/origen_app_generators/plugin.rb +39 -0
  13. data/lib/origen_app_generators/test_engineering/generic_test_block.rb +68 -0
  14. data/lib/origen_app_generators.rb +67 -0
  15. data/lib/tasks/app_generators.rake +50 -0
  16. data/lib/tasks/boot.rb +42 -0
  17. data/templates/app_generators/application/Gemfile +12 -0
  18. data/templates/app_generators/application/Rakefile +10 -0
  19. data/templates/app_generators/application/config/application.rb +110 -0
  20. data/templates/app_generators/application/config/commands.rb +76 -0
  21. data/templates/app_generators/application/config/environment.rb +4 -0
  22. data/templates/app_generators/application/config/users.rb +29 -0
  23. data/templates/app_generators/application/config/version.rb +8 -0
  24. data/templates/app_generators/application/doc/history +0 -0
  25. data/templates/app_generators/application/lib/app.rake +6 -0
  26. data/templates/app_generators/application/lib/module.rb +17 -0
  27. data/templates/app_generators/application/lib/top_level.rb +12 -0
  28. data/templates/app_generators/application/spec/spec_helper.rb +98 -0
  29. data/templates/app_generators/application/target/debug.rb +8 -0
  30. data/templates/app_generators/application/target/production.rb +9 -0
  31. data/templates/app_generators/application/templates/web/archive.md.erb +11 -0
  32. data/templates/app_generators/application/templates/web/contact.md.erb +36 -0
  33. data/templates/app_generators/application/templates/web/docs/environment/definitions.md.erb +17 -0
  34. data/templates/app_generators/application/templates/web/docs/environment/installation.md.erb +22 -0
  35. data/templates/app_generators/application/templates/web/docs/environment/introduction.md.erb +5 -0
  36. data/templates/app_generators/application/templates/web/index.md.erb +12 -0
  37. data/templates/app_generators/application/templates/web/layouts/_basic.html.erb +14 -0
  38. data/templates/app_generators/application/templates/web/layouts/_doc.html.erb +35 -0
  39. data/templates/app_generators/application/templates/web/partials/_navbar.html.erb +23 -0
  40. data/templates/app_generators/application/templates/web/references.md.erb +39 -0
  41. data/templates/app_generators/application/templates/web/release_notes.md.erb +5 -0
  42. data/templates/app_generators/new/generator.rb +78 -0
  43. data/templates/app_generators/new/info.md.erb +9 -0
  44. data/templates/app_generators/plugin/Gemfile +12 -0
  45. data/templates/app_generators/plugin/config/development.rb +12 -0
  46. data/templates/app_generators/plugin/gemspec.rb +36 -0
  47. data/templates/app_generators/plugin/templates/web/index.md.erb +60 -0
  48. data/templates/app_generators/plugin/templates/web/partials/_navbar.html.erb +22 -0
  49. data/templates/app_generators/test_engineering/generic_test_block/lib/interface.rb +6 -0
  50. data/templates/app_generators/test_engineering/generic_test_block/program/prb1.rb +9 -0
  51. data/templates/app_generators/test_engineering/generic_test_block/target/j750.rb +10 -0
  52. data/templates/app_generators/test_engineering/generic_test_block/target/ultraflex.rb +10 -0
  53. data/templates/app_generators/test_engineering/generic_test_block/target/v93k.rb +10 -0
  54. data/templates/web/_history.md +166 -0
  55. data/templates/web/archive.md.erb +11 -0
  56. data/templates/web/contact.md.erb +36 -0
  57. data/templates/web/docs/developers/creating.md.erb +290 -0
  58. data/templates/web/docs/environment/installation.md.erb +12 -0
  59. data/templates/web/docs/environment/introduction.md.erb +10 -0
  60. data/templates/web/example.md.erb +73 -0
  61. data/templates/web/index.md.erb +48 -0
  62. data/templates/web/layouts/_basic.html.erb +18 -0
  63. data/templates/web/layouts/_doc.html.erb +37 -0
  64. data/templates/web/origen_app_generators/application.md.erb +116 -0
  65. data/templates/web/origen_app_generators/plugin.md.erb +29 -0
  66. data/templates/web/origen_app_generators/test_engineering/generic_test_block.md.erb +16 -0
  67. data/templates/web/partials/_navbar.html.erb +22 -0
  68. data/templates/web/release_notes.md.erb +5 -0
  69. metadata +126 -0
@@ -0,0 +1,17 @@
1
+ require 'origen'
2
+ <% if @type == :plugin -%>
3
+ require_relative '../config/application.rb'
4
+ <% end -%>
5
+ module <%= @namespace %>
6
+
7
+ # Load all files in the lib directory via a wildcard, if your project becomes
8
+ # large or load order dependencies start to creep in then you may need to
9
+ # start taking control of this manually as described above.
10
+ # Note that there is no problem from requiring a file twice (Ruby will ignore
11
+ # the second require), so if you have a file that must be required up front
12
+ # you can do that one manually and the let the wildcard take care of the rest.
13
+ Dir.glob("#{File.dirname(__FILE__)}/**/*.rb").sort.each do |file|
14
+ require file
15
+ end
16
+
17
+ end
@@ -0,0 +1,12 @@
1
+ module <%= @namespace %>
2
+ class TopLevel
3
+ # A simple method to get you going, to see this in action run a console session like this:
4
+ #
5
+ # origen i
6
+ #
7
+ # > $dut.hi
8
+ def hi
9
+ puts "Hello master!"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,98 @@
1
+ $VERBOSE=nil # Don't care about world writable dir warnings and the like
2
+
3
+ require 'pathname'
4
+ if File.exist? File.expand_path("../Gemfile", Pathname.new(__FILE__).realpath)
5
+ require 'rubygems'
6
+ require 'bundler/setup'
7
+ else
8
+ # If running on windows, can't use Origen helpers 'till we load it...
9
+ if RUBY_PLATFORM == 'i386-mingw32'
10
+ `where origen`.split("\n").find do |match|
11
+ match =~ /(.*)\\bin\\origen$/
12
+ end
13
+ origen_top = $1.gsub("\\", "/")
14
+ else
15
+ origen_top = `which origen`.strip.sub("/bin/origen", "")
16
+ end
17
+
18
+ $LOAD_PATH.unshift "#{origen_top}/lib"
19
+ end
20
+
21
+ require "origen"
22
+
23
+ require "rspec/legacy_formatters"
24
+ require "#{Origen.top}/spec/format/origen_formatter"
25
+
26
+ if RUBY_VERSION >= '2.0.0'
27
+ require "byebug"
28
+ else
29
+ require 'debugger'
30
+ end
31
+ require 'pry'
32
+
33
+ def load_target(target="default")
34
+ Origen.target.switch_to target
35
+ Origen.target.load!
36
+ end
37
+
38
+ RSpec.configure do |config|
39
+ config.formatter = OrigenFormatter
40
+ # rspec-expectations config goes here. You can use an alternate
41
+ # assertion/expectation library such as wrong or the stdlib/minitest
42
+ # assertions if you prefer.
43
+ config.expect_with :rspec do |expectations|
44
+ # Enable only the newer, non-monkey-patching expect syntax.
45
+ # For more details, see:
46
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
47
+ expectations.syntax = :should
48
+ end
49
+ end
50
+ $VERBOSE=nil # Don't care about world writable dir warnings and the like
51
+
52
+ require 'pathname'
53
+ if File.exist? File.expand_path("../Gemfile", Pathname.new(__FILE__).realpath)
54
+ require 'rubygems'
55
+ require 'bundler/setup'
56
+ else
57
+ # If running on windows, can't use Origen helpers 'till we load it...
58
+ if RUBY_PLATFORM == 'i386-mingw32'
59
+ `where origen`.split("\n").find do |match|
60
+ match =~ /(.*)\\bin\\origen$/
61
+ end
62
+ origen_top = $1.gsub("\\", "/")
63
+ else
64
+ origen_top = `which origen`.strip.sub("/bin/origen", "")
65
+ end
66
+
67
+ $LOAD_PATH.unshift "#{origen_top}/lib"
68
+ end
69
+
70
+ require "origen"
71
+
72
+ require "rspec/legacy_formatters"
73
+ require "#{Origen.top}/spec/format/origen_formatter"
74
+
75
+ if RUBY_VERSION >= '2.0.0'
76
+ require "byebug"
77
+ else
78
+ require 'debugger'
79
+ end
80
+ require 'pry'
81
+
82
+ def load_target(target="default")
83
+ Origen.target.switch_to target
84
+ Origen.target.load!
85
+ end
86
+
87
+ RSpec.configure do |config|
88
+ config.formatter = OrigenFormatter
89
+ # rspec-expectations config goes here. You can use an alternate
90
+ # assertion/expectation library such as wrong or the stdlib/minitest
91
+ # assertions if you prefer.
92
+ config.expect_with :rspec do |expectations|
93
+ # Enable only the newer, non-monkey-patching expect syntax.
94
+ # For more details, see:
95
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
96
+ expectations.syntax = :should
97
+ end
98
+ end
@@ -0,0 +1,8 @@
1
+ # Production mode will require that there are no modified files in the workspace
2
+ # and any other conditions that you add to your application.
3
+ # Normally production targets define the target and then debug targets
4
+ # are setup to load the production target before switching Origen to debug
5
+ # mode as shown below.
6
+ load "#{Origen.root}/target/production.rb"
7
+
8
+ Origen.mode = :debug
@@ -0,0 +1,9 @@
1
+ # The target file is run before *every* Origen operation and is used to instantiate
2
+ # the runtime environment - usually this means instantiating a top-level SoC or
3
+ # IP model.
4
+ #
5
+ # Naming is arbitrary but instances names should be prefixed with $ which indicates a
6
+ # global variable in Ruby, and this is required in order for the objects instantiated
7
+ # here to be visible throughout your application code.
8
+
9
+ $dut = <%= @namespace %>::TopLevel.new # Instantiate a DUT instance
@@ -0,0 +1,11 @@
1
+ % render "layouts/basic.html", tab: :archive do
2
+
3
+ ## Archive
4
+
5
+ Documentation from previous releases is available via the links below:
6
+
7
+ % Origen.app.versions.reverse_each do |version|
8
+ * [<%= version %>](<%= Origen.app.config.web_domain %>/<%= version.gsub(".", "_") %>)
9
+ % end
10
+
11
+ % end
@@ -0,0 +1,36 @@
1
+ % render "layouts/basic.html", tab: :contact do
2
+
3
+ ## Contact Us
4
+
5
+ The following engineers can be contacted about this application:
6
+
7
+ % Origen.app.developers.each do |user|
8
+ * [<%= user.name %>](http://freeshare.freescale.net:2222/my/Person.aspx?accountname=fsl\<%= user.r_number %>)
9
+ % end
10
+
11
+ %# An example of how to manually write a more detailed contact page:
12
+ %#Please use PDM For any bug reports or change/feature requests:
13
+ %#
14
+ %#* [C90TFS_NVM_tester on PDM](http://designpdm.freescale.net/Agile/PLMServlet?fromPCClient=true&module=PartFamilyHandler&requestUrl=module%3DPartFamilyHandler%26opcode%3DdisplayObject%26classid%3D2000004409%26objid%3D17718323%26tabid%3D2%26)
15
+ %#
16
+ %#For test related issues you can contact:
17
+ %#
18
+ %#* [Stephen McGinty](http://freeshare.freescale.net:2222/my/Person.aspx?accountname=fsl\r49409)
19
+ %#* [Thao Huynh](http://freeshare.freescale.net:2222/my/Person.aspx?accountname=fsl\R6AANF)
20
+ %#
21
+ %#For product/yield issues contact:
22
+ %#
23
+ %#* [Andrew Hardell](http://freeshare.freescale.net:2222/my/Person.aspx?accountname=fsl\R12635)
24
+ %#* [Eddie Lepore](http://freeshare.freescale.net:2222/my/Person.aspx?accountname=fsl\B06626)
25
+ %#
26
+ %#The manager of this project is:
27
+ %#
28
+ %#* [Wendy Malloch](http://freeshare.freescale.net:2222/my/Person.aspx?accountname=fsl\TTZ231)
29
+ %#
30
+ %#
31
+ %#Finally if you are not sure who to contact, or if your question may have device/reliability
32
+ %#implications, then you can use the Split Gate Flash Test and Reliability mailing list:
33
+ %#
34
+ %#* [Email SGFTANDR](mailto:SGFTANDR@freescale.com)
35
+
36
+ % end
@@ -0,0 +1,17 @@
1
+ % render "../../layouts/doc.html" do
2
+
3
+ %# Add any new entries anywhere in this list, it will get sorted into
4
+ %# alphabetical order during compilation:
5
+ %
6
+ % terms = {
7
+ % "Origen" => "A general purpose semiconductor engineering framework that uses the Ruby programming language, read more at http://origen.freescale.net",
8
+ % "Application" => "The generic name given to a project that uses Origen",
9
+ % }
10
+
11
+ | Term or Acronym | Definition
12
+ |:----------------|:----------
13
+ % terms.sort.each do |term|
14
+ | <%= term[0] %> | <%= term[1] %>
15
+ % end
16
+
17
+ % end
@@ -0,0 +1,22 @@
1
+ % render "../../layouts/doc.html" do
2
+
3
+ Follow the steps below to setup a new environment.
4
+
5
+ #### 1. Install Origen
6
+
7
+ Follow these instructions to install Origen: [How to Install Origen](http://origen.freescale.net/origen/latest/guides/starting/installing)
8
+
9
+ #### 2. Create the application workspace
10
+
11
+ This workspace must be situated outside of the Origen workspace that you have just created.
12
+
13
+ Execute the following commands:
14
+
15
+ ~~~
16
+ mkdir <%= Origen.app.name %>
17
+ cd <%= Origen.app.name %>
18
+ dssc setvault <%= Origen.config.vault %> .
19
+ dssc pop -rec -uni -get -force -ver <%= Origen.app.version %> .
20
+ ~~~
21
+
22
+ % end
@@ -0,0 +1,5 @@
1
+ % render "../../layouts/doc.html" do
2
+
3
+ Welcome to the docs...
4
+
5
+ % end
@@ -0,0 +1,12 @@
1
+ % render "layouts/basic.html" do
2
+
3
+ %# HTML tags can be embedded in mark down files if you want to do specific custom
4
+ %# formatting like this, but in most cases that is not required.
5
+ <h1><%= Origen.app.namespace %> <span style="font-size: 14px">(<%= Origen.app.version %>)</span></h1>
6
+
7
+ ### Introduction
8
+
9
+ Use this page to give a brief overview of what your application does, put the detail
10
+ in the docs section.
11
+
12
+ % end
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: bootstrap
3
+ title: <%= options[:title] || Origen.app.namespace %>
4
+ ---
5
+ <%= render "templates/web/partials/navbar.html", tab: options[:tab] %>
6
+
7
+ <div class="row">
8
+ %# The markdown attribute is important if you are going to include content written
9
+ %# in markdown, without this is will be included verbatim
10
+ <div class="span12" markdown="1">
11
+ <%= yield %>
12
+
13
+ </div>
14
+ </div>
@@ -0,0 +1,35 @@
1
+ ---
2
+ layout: bootstrap
3
+ title: <%= options[:title] || "#{Origen.app.namespace} - Docs" %>
4
+ ---
5
+ <%= render "templates/web/partials/navbar.html", tab: :docs %>
6
+ % s = {}
7
+
8
+ %# This creates the index on the left of your doc pages
9
+ %#
10
+ %# Naming of the keys is very important and must be of the form:
11
+ %# <section>_<page> with no other underscores
12
+ %# Origen will then look for the corresponding page in:
13
+ %# templates/web/docs/<section>/<page>.md.erb
14
+ %#
15
+ %# See here for more info: http://origen.freescale.net/doc_helpers/latest/examples/searchable/intro/
16
+
17
+ % s["Environment"] = {
18
+ % environment_introduction: "Introduction",
19
+ % environment_installation: "Installation",
20
+ % environment_definitions: "Definitions and Acronyms",
21
+ % }
22
+ %
23
+ %# Define additional sections as required, e.g.
24
+ %# s["Registers"] = {
25
+ %# registers_map: "Register Map",
26
+ %# }
27
+
28
+
29
+ % render "doc_helpers/searchable.html", options.merge(:index => s) do
30
+
31
+ <%= yield %>
32
+
33
+ <%= yammer_comments %>
34
+
35
+ % end
@@ -0,0 +1,23 @@
1
+ <div class="navbar navbar-inverse navbar-fixed-top">
2
+ <div class="navbar-inner">
3
+ <div class="container">
4
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
5
+ <span class="icon-bar"></span>
6
+ <span class="icon-bar"></span>
7
+ <span class="icon-bar"></span>
8
+ </a>
9
+ <a class="brand" href="<%= path "/" %>">Home</a>
10
+ <div class="nav-collapse collapse">
11
+ <ul class="nav">
12
+ <li class="<%= options[:tab] == :docs ? 'active' : '' %>"><a href="<%= path("/docs/environment/introduction") %>">Docs</a></li>
13
+ <li class="<%= options[:tab] == :api ? 'active' : '' %>"><a href="<%= path "/api/" %>">API</a></li>
14
+ <li class="<%= options[:tab] == :references ? 'active' : '' %>"><a href="<%= path "/references" %>">References</a></li>
15
+ <li class="<%= options[:tab] == :archive ? 'active' : '' %>"><a href="<%= path "/archive" %>">Archive</a></li>
16
+ <li class="<%= options[:tab] == :release ? 'active' : '' %>"><a href="<%= path "/release_notes" %>">Release Notes</a></li>
17
+ <li class="<%= options[:tab] == :contact ? 'active' : '' %>"><a href="<%= path "/contact" %>">Contact</a></li>
18
+ </ul>
19
+ <%= import "origen/web/logo.html" %>
20
+ </div><!--/.nav-collapse -->
21
+ </div>
22
+ </div>
23
+ </div>
@@ -0,0 +1,39 @@
1
+ % render "layouts/basic.html", tab: :references do
2
+
3
+ ## References
4
+
5
+ %# An example of how to write a references page:
6
+ %#### Documents
7
+ %#
8
+ %#* Block Guides
9
+ %# * [FTFL Block Guide](http://compass.freescale.net/go/ftflspecs)
10
+ %# * [FTFE Block Guide](http://compass.freescale.net/go/ftfespecs)
11
+ %# * [FTFA Block Guide](http://compass.freescale.net/go/ftflspecs)
12
+ %#* Hardmacro Creation Guides
13
+ %# * [TFSL Creation Guide](http://compass.freescale.net/go/tfsspec)
14
+ %# * [TFSE Creation Guide](http://compass.freescale.net/go/tfsspec)
15
+ %#* Training
16
+ %# * [FTFL Overview](http://compass.freescale.net/livelink/livelink/207024304/FTFL_Overview.ppt?func=doc.Fetch&nodeid=207024304)
17
+ %#* Quality
18
+ %# * [Quality Level Cheatsheet](http://compass.freescale.net/livelink/livelink/227376170/SOC_3.6_NVM_Quality_Level_1409_C90TFS.xlsx?func=doc.Fetch&nodeid=227376170)
19
+ %#
20
+ %#### Origen
21
+ %#
22
+ %#* [Origen Documentation](http://origen.freescale.net)
23
+ %#* [Origen Freeshare Commmunity](http://freeshare.freescale.net:2222/public/origen-cmty-svc/Pages/PublicHome.aspx)
24
+ %#
25
+ %#### Design Sync Vaults
26
+ %#
27
+ %#* C90TFS NVM Test Module
28
+ %# * <%= Origen.config.vault %>
29
+ %#* FTFL Design
30
+ %# * sync://sync-15040:15040/Projects/nvm_c90tfsw/ftfl
31
+ %# * sync://sync-15040:15040/Projects/nvm_c90tfsw/ftfl_firmware
32
+ %#* FTFE Design
33
+ %# * sync://sync-15040:15040/Projects/nvm_c90ftfe/ftfe
34
+ %# * sync://sync-15040:15040/Projects/nvm_c90ftfe/ftfe_firmware
35
+ %#* FTFA Design
36
+ %# * sync://sync-15040:15040/Projects/nvm_c90tfsw/ftfa
37
+ %# * sync://sync-15040:15040/Projects/nvm_c90tfsw/ftfa_firmware
38
+
39
+ % end
@@ -0,0 +1,5 @@
1
+ % render "layouts/basic.html", tab: :release do
2
+
3
+ <%= render "#{Origen.root}/doc/history" %>
4
+
5
+ % end
@@ -0,0 +1,78 @@
1
+ module OrigenAppGenerators
2
+ module <%= @domain_namespace %>
3
+ # Generates a generic application shell
4
+ class <%= @classname %> < <%= @parentclass %>
5
+
6
+ desc "<%= @summary %>"
7
+
8
+ # Any methods that are not protected will get invoked in the order that they are
9
+ # defined when the generator is run, method naming is irrelevant unless you want
10
+ # to override a method that is defined by the parent class
11
+
12
+ def get_user_input
13
+ # The methods to get the common user input that applies to all applications will
14
+ # get called at the start automatically, you have a chance here to ask any additional
15
+ # questions that are specific to the type of application being generated
16
+ end
17
+
18
+ def generate_files
19
+ # Calling this will build all files, directories and symlinks contained in the
20
+ # hash returned by the filelist method
21
+ build_filelist
22
+ end
23
+
24
+ def modify_files
25
+ # If you want to modify any of the generated files you can do so now, you have access
26
+ # to all of the Thor Action methods described here:
27
+ # http://www.rubydoc.info/github/wycats/thor/Thor/Actions
28
+ # See the enable method in lib/app_generators/new.rb for some examples of using these.
29
+ end
30
+
31
+ def conclude
32
+ # Print out anything you think the user should know about their new application at the end
33
+ puts "New app created at: #{destination_root}"
34
+ end
35
+
36
+ protected
37
+
38
+ # Defines the filelist for the generator, the default list is inherited from the
39
+ # parent class (<%= @parentclass %>).
40
+ # The filelist can contain references to generate files, directories or symlinks in the
41
+ # new application.
42
+ #
43
+ # Generally to make your generator more maintainable try and re-use as much as possible
44
+ # from the parent generator, this means that your generator will automatically stay up
45
+ # to date with the latest conventions
46
+ #
47
+ # The master templates live in templates/app_generators/<%= @parentclass.downcase %>, but
48
+ # DO NOT MODIFY THESE FILES DIRECTLY.
49
+ # Either add or remove things post-generation in the modify_files method or copy the
50
+ # master file to the equivalent sub-directory of templates/app_generators/<%= @domain_namespace.underscore %>/<%= @classname.underscore %>
51
+ # which will override the version in the master directory.
52
+ #
53
+ # Additional files can be added or removed from the filelist as shown below.
54
+ def filelist
55
+ @filelist ||= begin
56
+ list = super # Always pick up the parent list
57
+ # Example of how to remove a file from the parent list
58
+ #list.delete(:web_doc_layout)
59
+ # Example of how to add a file, in this case the file will be compiled and copied to
60
+ # the same location in the new app
61
+ #list[:config_shared_commands] = { source: 'config/shared_commands.rb' }
62
+ # Alternatively specifying a different destination, typically you would do this when
63
+ # the final location is dynamic
64
+ #list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
65
+ # Example of how to create a directory
66
+ #list[:pattern_dir] = { dest: "pattern", type: :directory }
67
+ # Example of how to create a symlink
68
+ #list[:target_default] = { source: 'debug.rb', # Relative to the file being linked to
69
+ # dest: 'target/default.rb', # Relative to destination_root
70
+ # type: :symlink }
71
+ # Remember to return the final list
72
+ list
73
+ end
74
+ end
75
+
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,9 @@
1
+ % render "templates/web/layouts/basic.html" do
2
+
3
+ ### OrigenAppGenerators
4
+
5
+ ## TITLE_GOES_HERE
6
+
7
+ INTRO_GOES_HERE
8
+
9
+ % end
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+ source 'http://origen-hub.am.freescale.net:9292'
3
+
4
+ # Specify your gem's dependencies in <%= @name %>.gemspec
5
+ gemspec
6
+
7
+ # Only these gems should be added here
8
+ if RUBY_VERSION >= '2.0.0'
9
+ gem 'byebug', '~>3.5'
10
+ else
11
+ gem 'debugger', '~>1.6'
12
+ end
@@ -0,0 +1,12 @@
1
+ # This file is similar to environment.rb and will be loaded
2
+ # automatically at the start of each invocation of Origen.
3
+ #
4
+ # However the major difference is that it will not be loaded
5
+ # if the application is imported by a 3rd party app - in that
6
+ # case only environment.rb is loaded.
7
+ #
8
+ # Therefore this file should be used to load anything you need
9
+ # to setup a development environment for this app, normally
10
+ # this would be used to load some dummy classes to instantiate
11
+ # your objects so that they can be tested and/or interacted with
12
+ # in the console.
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+ config = File.expand_path('../config', __FILE__)
3
+ require "#{config}/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "<%= @name %>"
7
+ spec.version = <%= @namespace %>::VERSION
8
+ spec.authors = ["<%= User.current.name %>"]
9
+ spec.email = ["<%= User.current.email %>"]
10
+ spec.summary = "<%= @summary %>"
11
+ spec.homepage = "http://origen.freescale.net/<%= @name %>"
12
+
13
+ spec.required_ruby_version = '>= 1.9.3'
14
+ spec.required_rubygems_version = '>= 1.8.11'
15
+
16
+ # Only the files that are hit by these wildcards will be included in the
17
+ # packaged gem, the default should hit everything in most cases but this will
18
+ # need to be added to if you have any custom directories
19
+ spec.files = Dir["lib/**/*.rb", "templates/**/*", "config/**/*.rb",
20
+ "bin/*", "lib/tasks/**/*.rake", "pattern/**/*.rb",
21
+ "program/**/*.rb"
22
+ ]
23
+ spec.executables = []
24
+ spec.require_paths = ["lib"]
25
+
26
+ # Add any gems that your plugin needs to run within a host application
27
+ spec.add_runtime_dependency "origen_core", ">= <%= @latest_origen_version %>"
28
+ <% if @runtime_dependencies -%>
29
+ <% @runtime_dependencies.each do |dep| -%>
30
+ spec.add_runtime_dependency <%= dep.map{ |d| "\"#{d}\"" }.join(', ') %>
31
+ <% end -%>
32
+ <% end -%>
33
+
34
+ # Add any gems that your plugin needs for its development environment only
35
+ #spec.add_development_dependency "doc_helpers", ">= 1.7.0"
36
+ end
@@ -0,0 +1,60 @@
1
+ % render "layouts/basic.html" do
2
+
3
+ %# HTML tags can be embedded in mark down files if you want to do specific custom
4
+ %# formatting like this, but in most cases that is not required.
5
+ <h1><%= Origen.app.namespace %> <span style="font-size: 14px">(<%= Origen.app.version %>)</span></h1>
6
+
7
+ ### Purpose
8
+
9
+ This plugin provides...
10
+
11
+ ### How To Import
12
+
13
+ ##### To use in an application:
14
+
15
+ Add the following to your application's <code>Gemfile</code>:
16
+
17
+ ~~~ruby
18
+ gem '<%= Origen.app.name %>', '<%= Origen.app.version %>'
19
+ ~~~
20
+
21
+ ##### To use in a plugin:
22
+
23
+ Add the following to your plugin's gemspec:
24
+
25
+ ~~~ruby
26
+ spec.add_runtime_dependency '<%= Origen.app.name %>', '~> <%= Origen.app.version.major %>', '>= <%= Origen.app.version %>'
27
+ ~~~
28
+
29
+ and require the gem in your code:
30
+
31
+ ~~~ruby
32
+ require '<%= Origen.app.name %>'
33
+ ~~~
34
+
35
+
36
+ ### How To Use
37
+
38
+ Give some quick start description here on how to use your plugin, providing
39
+ links to the API documents where necessary for further details.
40
+
41
+ Here is an example integration:
42
+
43
+ ~~~ruby
44
+ # Include some code examples here
45
+ ~~~
46
+
47
+ ### How To Setup a Development Environment
48
+
49
+ ~~~text
50
+ mkdir <%= Origen.app.name %>
51
+ cd <%= Origen.app.name %>
52
+ dssc setvault <%= Origen.app.config.vault %> .
53
+ dssc pop -rec -get .
54
+ ~~~
55
+
56
+ Follow the instructions here if you want to make a 3rd party app
57
+ workspace use your development copy of the <%= Origen.app.name %> plugin:
58
+ [Setting up a Plugin Development Environment](http://origen.freescale.net/origen/latest/guides/libraries/environment)
59
+
60
+ % end
@@ -0,0 +1,22 @@
1
+ <div class="navbar navbar-inverse navbar-fixed-top">
2
+ <div class="navbar-inner">
3
+ <div class="container">
4
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
5
+ <span class="icon-bar"></span>
6
+ <span class="icon-bar"></span>
7
+ <span class="icon-bar"></span>
8
+ </a>
9
+ <a class="brand" href="<%= path "/" %>">Home</a>
10
+ <div class="nav-collapse collapse">
11
+ <ul class="nav">
12
+ <li class="<%= options[:tab] == :api ? 'active' : '' %>"><a href="<%= path "/api/" %>">API</a></li>
13
+ <li class="<%= options[:tab] == :coverage ? 'active' : '' %>"><a href="<%= path "/coverage" %>">Coverage</a></li>
14
+ <li class="<%= options[:tab] == :archive ? 'active' : '' %>"><a href="<%= path "/archive" %>">Archive</a></li>
15
+ <li class="<%= options[:tab] == :release ? 'active' : '' %>"><a href="<%= path "/release_notes" %>">Release Notes</a></li>
16
+ <li class="<%= options[:tab] == :contact ? 'active' : '' %>"><a href="<%= path "/contact" %>">Contact</a></li>
17
+ </ul>
18
+ <%= import "origen/web/logo.html" %>
19
+ </div><!--/.nav-collapse -->
20
+ </div>
21
+ </div>
22
+ </div>
@@ -0,0 +1,6 @@
1
+ module <%= @namespace %>
2
+ class Interface
3
+ include Testers::ProgramGenerators
4
+ include Testers::BasicTestSetups
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ Flow.create interface: '<%= @namespace %>::Interface' do
2
+
3
+ if_job :p1 do
4
+ functional :test1, bin: 10, id: :t1
5
+
6
+ functional :test2, bin: 15, if_failed: :t1
7
+ end
8
+
9
+ end
@@ -0,0 +1,10 @@
1
+ # The target file is run before *every* Origen operation and is used to instantiate
2
+ # the runtime environment - usually this means instantiating a top-level SoC or
3
+ # IP model.
4
+ #
5
+ # Naming is arbitrary but instances names should be prefixed with $ which indicates a
6
+ # global variable in Ruby, and this is required in order for the objects instantiated
7
+ # here to be visible throughout your application code.
8
+
9
+ $dut = <%= @namespace %>::TopLevel.new # Instantiate a DUT instance
10
+ $tester = Testers::J750.new