origen_doc_helpers 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/config/boot.rb +19 -0
  3. data/config/version.rb +1 -1
  4. data/lib/origen_doc_helpers.rb +21 -1
  5. data/lib/origen_doc_helpers/flow_page_generator.rb +110 -0
  6. data/lib/{helpers.rb → origen_doc_helpers/helpers.rb} +0 -0
  7. data/lib/origen_doc_helpers/model_page_generator.rb +151 -0
  8. data/templates/flow_index.md.erb +19 -0
  9. data/templates/flow_page.md.erb +4 -0
  10. data/templates/model_index.md.erb +24 -0
  11. data/templates/model_page.md.erb +125 -0
  12. data/templates/shared/_register.html.erb +51 -7
  13. data/templates/shared/_searchable.html.erb +1 -1
  14. data/templates/shared/test/_flow.md.erb +3 -230
  15. data/templates/web/helpers.md.erb +25 -0
  16. data/templates/web/{examples → helpers}/disqus.md.erb +3 -3
  17. data/templates/web/helpers/flow.md.erb +113 -0
  18. data/templates/web/helpers/model.md.erb +81 -0
  19. data/templates/web/{examples → helpers}/register.md.erb +5 -5
  20. data/templates/web/{examples → helpers}/searchable/intro.md.erb +4 -4
  21. data/templates/web/{examples → helpers}/searchable/page2.md.erb +0 -0
  22. data/templates/web/{examples → helpers}/searchable/topic1/item1.md.erb +0 -0
  23. data/templates/web/{examples → helpers}/searchable/topic1/item2.html.erb +0 -0
  24. data/templates/web/{examples → helpers}/spec.md.erb_NOT_WORKING +2 -2
  25. data/templates/web/{examples → helpers}/yammer.md.erb +1 -1
  26. data/templates/web/index.md.erb +1 -1
  27. data/templates/web/layouts/_doc.html.erb +2 -2
  28. data/templates/web/layouts/{_examples.html.erb → _helpers.html.erb} +1 -1
  29. data/templates/web/partials/_navbar.html.erb +1 -1
  30. metadata +27 -26
  31. data/config/development.rb +0 -16
  32. data/config/environment.rb +0 -32
  33. data/lib/origen_doc_helpers/doc_interface.rb +0 -74
  34. data/program/_func.rb +0 -12
  35. data/program/_hvst.rb +0 -12
  36. data/program/_para.rb +0 -26
  37. data/program/probe_1.rb +0 -7
  38. data/templates/web/examples.md.erb +0 -20
  39. data/templates/web/examples/test/flow.md.erb +0 -35
data/program/_func.rb DELETED
@@ -1,12 +0,0 @@
1
- # Functional test of the Vreg
2
- Flow.create do
3
- # This test verifies that the following things work:
4
- #
5
- # * The vreg can be disabled
6
- # * The trim register can be written to and read from
7
- func :vreg_functional, vdd: :min, bin: 101
8
-
9
- func :vreg_functional, vdd: :max, bin: 101, continue: true
10
-
11
- import "hvst"
12
- end
data/program/_hvst.rb DELETED
@@ -1,12 +0,0 @@
1
- # HVST
2
- Flow.create do
3
- # Check if this device has already had the Vreg HVST
4
- func :rd_vreg_hvst_passcode, bin: 50, vdd: :nom, id: :vreg_hvst_done
5
-
6
- # Apply HVST to the vreg module
7
- func :vreg_hvst, bin: 101, hv: 10.V, vdd: :max, unless_passed: :vreg_hvst_done
8
-
9
- # Program a passcode to the device to record that the HVST
10
- # has been applied
11
- func :pgm_vreg_hvst_passcode, bin: 51, vdd: :nom, unless_passed: :vreg_hvst_done
12
- end
data/program/_para.rb DELETED
@@ -1,26 +0,0 @@
1
- # Parametric flow
2
- #
3
- # Blah blah, this is marked down:
4
- #
5
- # * blah
6
- # * blah
7
- Flow.create do
8
- # Measure the output of the vreg under no load, this is a simple
9
- # test to catch any gross defects that prevent the vreg from working
10
- #
11
- # Blah blah, this is marked down:
12
- #
13
- # * blah
14
- # * blah
15
- pp "No load tests" do
16
- para :vreg_meas, bin: 105, lo: 1.12, hi: 1.34
17
-
18
- para :vreg_meas, bin: 105, cz: true, if_enable: "vreg_cz"
19
- end
20
-
21
- # Measure the output of the vreg under the given load, this is approximately
22
- # equivalent to 1.5x the maximum load anticipated in a customer application.
23
- para :vreg_meas, vdd: :min, bin: 105, load: 5.mA, lo: 1.10, hi: 1.34
24
-
25
- para :vreg_meas, vdd: :max, bin: 105, load: 5.mA, lo: 1.12, hi: 1.34
26
- end
data/program/probe_1.rb DELETED
@@ -1,7 +0,0 @@
1
- Flow.create do
2
- log "Vreg test module"
3
-
4
- import "func"
5
-
6
- import "para"
7
- end
@@ -1,20 +0,0 @@
1
- % render "layouts/basic.html", :tab => :examples do
2
-
3
- # Examples
4
-
5
- The available helpers are split by engineering function below, click the
6
- helper of interest to see a live example of it and the application code
7
- that should be used to generate it.
8
-
9
- ### General
10
-
11
- * [Searchable Documents](<%= path "/examples/searchable/intro" %>)
12
- * [Register Descriptions](<%= path "/examples/register" %>)
13
- * [Yammer Comments](<%= path "/examples/yammer" %>)
14
- * [Disqus Comments](<%= path "/examples/disqus" %>)
15
-
16
- ### Test Engineering
17
-
18
- * [Test Flow](<%= path "/examples/test/flow" %>)
19
-
20
- % end
@@ -1,35 +0,0 @@
1
- % render "../../layouts/examples.html" do
2
-
3
- # Test Flow
4
-
5
- Documentation of an Origen-generated test program can be created as follows (requires a
6
- documentation interface to be setup):
7
-
8
- ~~~eruby
9
- <%= "%" %> prog = OrigenTesters::Doc.generate_program_model("program/probe_1.rb", :target => "default")
10
-
11
- <%= "<" + "%= render \"doc_helpers/test/flow.md\", :heading => \"Probe 1\", :program => prog, :flow => :probe_1_flow %" + ">" %>
12
- ~~~
13
-
14
- The test flow helper takes the following required options:
15
-
16
- * **heading** - The page heading, generally the name of the flow
17
- * **program** - Supply a pre-generated program model
18
- * **flow(s)** - The name of the flow(s) to document, supply multiple in an array
19
-
20
- Additionally these options are available to customize the output:
21
-
22
- * **link_to_pattern_docs** - Set this to <code>true</code> to generate links to documentation of the patterns
23
- in place of the pattern name. Pattern docs should be placed in <code>templates/web/patterns</code> and the
24
- files should be called \<pattern_name\>.md
25
- * **context** - Supply an execution context to document only the test where the context is true. For example to
26
- document the tests that will run when job is "P1"is set
27
- supply <code>{ :job => "P1" }</code>
28
-
29
- Here is a live example:
30
-
31
- % prog = OrigenTesters::Doc.generate_program_model("program/probe_1.rb", :target => "debug")
32
-
33
- <%= render "templates/shared/test/flow.md", :heading => "Probe 1", :program => prog, :flow => :probe_1_flow %>
34
-
35
- % end