Skip to content

Commit

Permalink
Merge branch '346-revert-to-crd-terminology' into reduce-duplicate-er…
Browse files Browse the repository at this point in the history
…b-and-rake
  • Loading branch information
james-ball-qualcomm committed Jan 10, 2025
2 parents 49e6c4d + f7f8236 commit 7b0bd31
Show file tree
Hide file tree
Showing 75 changed files with 2,400 additions and 1,760 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,33 +60,37 @@ jobs:
- name: Copy cfg html
run: cp -R gen/cfg_html_doc/generic_rv64/html _site/example_cfg
- name: Create RVA20 Profile Release PDF Spec
run: ./do gen:profile[RVA20]
run: ./do gen:profile_release_pdf[RVA20]
- name: Copy RVA20 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA20.pdf _site/pdfs/RVA20.pdf
- name: Create RVA22 Profile Release PDF Spec
run: ./do gen:profile[RVA22]
run: ./do gen:profile_release_pdf[RVA22]
- name: Copy RVA22 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA22.pdf _site/pdfs/RVA22.pdf
- name: Copy RVA23 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA23.pdf _site/pdfs/RVA23.pdf
- name: Copy RVB23 Profile Release PDF
run: cp gen/profile_doc/pdf/RVB23.pdf _site/pdfs/RVB23.pdf
- name: Create RVI20 Profile Release PDF Spec
run: ./do gen:profile[RVI20]
run: ./do gen:profile_release_pdf[RVI20]
- name: Copy RVI20 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA20.pdf _site/pdfs/RVI20.pdf
- name: Create MC100-32 PDF Spec
run: ./do gen:cert_model_pdf[MC100-32]
run: ./do gen:proc_cert_model_pdf[MC100-32]
- name: Copy MC100-32 PDF
run: cp gen/certificate_doc/pdf/MC100-32.pdf _site/pdfs/MC100-32.pdf
run: cp gen/crd/pdf/MC100-32.pdf _site/pdfs/MC100-32.pdf
- name: Create MC100-32 HTML Spec
run: ./do gen:cert_model_html[MC100-32]
run: ./do gen:proc_cert_model_html[MC100-32]
- name: Copy MC100-32 HTML
run: cp gen/certificate_doc/html/MC100-32.html _site/htmls/MC100-32.html
run: cp gen/crd/html/MC100-32.html _site/htmls/MC100-32.html
- name: Create MC100-64 PDF Spec
run: ./do gen:cert_model_pdf[MC100-64]
run: ./do gen:proc_cert_model_pdf[MC100-64]
- name: Copy MC100-64 PDF
run: cp gen/certificate_doc/pdf/MC100-64.pdf _site/pdfs/MC100-64.pdf
run: cp gen/crd/pdf/MC100-64.pdf _site/pdfs/MC100-64.pdf
- name: Create MC100-64 HTML Spec
run: ./do gen:cert_model_html[MC100-64]
run: ./do gen:proc_cert_model_html[MC100-64]
- name: Copy MC100-64 HTML
run: cp gen/certificate_doc/html/MC100-64.html _site/htmls/MC100-64.html
un: cp gen/crd/html/MC100-64.html _site/htmls/MC100-64.html
- name: Copy manual html
run: cp -R gen/manual/isa/top/all/html _site/manual
- name: Setup Pages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
name: Build container
run: ./bin/build_container
- name: Generate extension PDF
run: ./do gen:cert_model_pdf[MockCertificateModel]
run: ./do gen:proc_cert_model_pdf[MockProcCertModel]
regress-gen-profile:
runs-on: ubuntu-latest
needs: regress-smoke
Expand Down Expand Up @@ -160,4 +160,4 @@ jobs:
name: Build container
run: ./bin/build_container
- name: Generate extension PDF
run: ./do gen:profile[MockProfileRelease]
run: ./do gen:profile_release_pdf[MockProfileRelease]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ resolved_arch
node_modules
_site
images
*.bak
*.log
*.bak
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ repos:
args: ["--schemafile", "schemas/ext_schema.json"]
- id: check-jsonschema
alias: check-jsonschema-cert-model
files: ^arch/certificate_model/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/cert_model_schema.json"]
files: ^arch/proc_cert_model/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/proc_cert_model_schema.json"]
- id: check-jsonschema
alias: check-jsonschema-cert-class
files: ^arch/certificate_class/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/cert_class_schema.json"]
files: ^arch/proc_cert_class/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/proc_cert_class_schema.json"]
# Commenting because throwing errors and not sure this is complete yet
# - id: check-jsonschema
# alias: check-jsonschema-manual-version
Expand Down
24 changes: 21 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "MC100-32",
"request": "launch",
"command": "bundle exec rake",
"script": "gen:cert_model_pdf[MC100-32]",
"script": "gen:proc_cert_model_pdf[MC100-32]",
"args": [],
"askParameters": false
},
Expand All @@ -15,7 +15,16 @@
"name": "MC200-32",
"request": "launch",
"command": "bundle exec rake",
"script": "gen:cert_model_pdf[MC200-32]",
"script": "gen:proc_cert_model_pdf[MC200-32]",
"args": [],
"askParameters": false
},
{
"type": "rdbg",
"name": "portfolios",
"request": "launch",
"command": "bundle exec rake",
"script": "portfolios",
"args": [],
"askParameters": false
},
Expand All @@ -24,7 +33,16 @@
"name": "RVA20",
"request": "launch",
"command": "bundle exec rake",
"script": "gen:profile[RVA20]",
"script": "gen:profile_release_pdf[RVA20]",
"args": [],
"askParameters": false
},
{
"type": "rdbg",
"name": "Smoke test",
"request": "launch",
"command": "bundle exec rake",
"script": "test:smoke",
"args": [],
"askParameters": false
}
Expand Down
68 changes: 39 additions & 29 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ require "yard"
require "minitest/test_task"

require_relative $root / "lib" / "architecture"
require_relative $root / "lib" / "design"
require_relative $root / "lib" / "portfolio_design"

directory "#{$root}/.stamps"

# Load and execute Rakefile for each backend.
Dir.glob("#{$root}/backends/*/tasks.rake") do |rakefile|
puts "UPDATE: Loading #{rakefile}"
load rakefile
end

directory "#{$root}/.stamps"

# @param config_name [String] Name of configuration
# @return [ConfiguredArchitecture]
def cfg_arch_for(config_name)
Rake::Task["#{$root}/.stamps/resolve-#{config_name}.stamp"].invoke

Expand Down Expand Up @@ -117,7 +123,7 @@ namespace :test do
end
task schema: "gen:resolved_arch" do
puts "Checking arch files against schema.."
Architecture.new("#{$root}/resolved_arch").validate(show_progress: true)
Architecture.new("rv64", "#{$root}/resolved_arch").validate(show_progress: true)
puts "All files validate against their schema"
end
task idl: ["gen:resolved_arch", "#{$root}/.stamps/resolve-rv32.stamp", "#{$root}/.stamps/resolve-rv64.stamp"] do
Expand Down Expand Up @@ -289,9 +295,13 @@ namespace :test do
These are basic but fast-running tests to check the database and tools
DESC
task :smoke do
puts "UPDATE: Running test:idl_compiler"
Rake::Task["test:idl_compiler"].invoke
puts "UPDATE: Running test:lib"
Rake::Task["test:lib"].invoke
puts "UPDATE: Running test:schema"
Rake::Task["test:schema"].invoke
puts "UPDATE: Running test:idl"
Rake::Task["test:idl"].invoke
end

Expand All @@ -313,7 +323,7 @@ namespace :test do

Rake::Task["gen:html"].invoke("generic_rv64")

Rake::Task["#{$root}/gen/certificate_doc/pdf/MockCertificateModel.pdf"].invoke
Rake::Task["#{$root}/gen/crd/pdf/MockProcCertModel.pdf"].invoke
Rake::Task["#{$root}/gen/profile_doc/pdf/MockProfileRelease.pdf"].invoke

puts
Expand All @@ -337,31 +347,31 @@ desc <<~DESC
Generate all portfolio-based PDF artifacts (certificates and profiles)
DESC
task :portfolios do
portfolio_start_msg("MockCertificateModel")
Rake::Task["#{$root}/gen/certificate_doc/pdf/MockCertificateModel.pdf"].invoke
portfolio_start_msg("MockProfileRelease")
portfolio_start_msg("MockProcCertModel CRD")
Rake::Task["#{$root}/gen/crd/pdf/MockProcCertModel.pdf"].invoke
portfolio_start_msg("MockProfileRelease CRD")
Rake::Task["#{$root}/gen/profile_doc/pdf/MockProfileRelease.pdf"].invoke
portfolio_start_msg("MC100-32")
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC100-32.pdf"].invoke
portfolio_start_msg("MC100-64")
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC100-64.pdf"].invoke
portfolio_start_msg("MC200-32")
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC200-32.pdf"].invoke
portfolio_start_msg("MC200-64")
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC200-64.pdf"].invoke
portfolio_start_msg("MC300-32")
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC300-32.pdf"].invoke
portfolio_start_msg("MC300-64")
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC300-64.pdf"].invoke
portfolio_start_msg("RVI20")
portfolio_start_msg("MC100-32 CRD")
Rake::Task["#{$root}/gen/crd/pdf/MC100-32.pdf"].invoke
portfolio_start_msg("MC100-64 CRD")
Rake::Task["#{$root}/gen/crd/pdf/MC100-64.pdf"].invoke
portfolio_start_msg("MC200-32 CRD")
Rake::Task["#{$root}/gen/crd/pdf/MC200-32.pdf"].invoke
portfolio_start_msg("MC200-64 CRD")
Rake::Task["#{$root}/gen/crd/pdf/MC200-64.pdf"].invoke
portfolio_start_msg("MC300-32 CRD")
Rake::Task["#{$root}/gen/crd/pdf/MC300-32.pdf"].invoke
portfolio_start_msg("MC300-64 CRD")
Rake::Task["#{$root}/gen/crd/pdf/MC300-64.pdf"].invoke
portfolio_start_msg("RVI20 Profile Release")
Rake::Task["#{$root}/gen/profile_doc/pdf/RVI20.pdf"].invoke
portfolio_start_msg("RVA20")
portfolio_start_msg("RVA20 Profile Release")
Rake::Task["#{$root}/gen/profile_doc/pdf/RVA20.pdf"].invoke
portfolio_start_msg("RVA22")
portfolio_start_msg("RVA22 Profile Release")
Rake::Task["#{$root}/gen/profile_doc/pdf/RVA22.pdf"].invoke
portfolio_start_msg("RVA23")
portfolio_start_msg("RVA23 Profile Release")
Rake::Task["#{$root}/gen/profile_doc/pdf/RVA23.pdf"].invoke
portfolio_start_msg("RVB23")
portfolio_start_msg("RVB23 Profile Release")
Rake::Task["#{$root}/gen/profile_doc/pdf/RVB23.pdf"].invoke
end

Expand All @@ -374,13 +384,13 @@ def portfolio_start_msg(name)
end

# Shortcut targets for building profiles and certificates.
task "MockCertificateModel": "#{$root}/gen/certificate_doc/pdf/MockCertificateModel.pdf"
task "MC100-32": "#{$root}/gen/certificate_doc/pdf/MC100-32.pdf"
task "MC100-64": "#{$root}/gen/certificate_doc/pdf/MC100-64.pdf"
task "MC200-32": "#{$root}/gen/certificate_doc/pdf/MC200-32.pdf"
task "MC200-64": "#{$root}/gen/certificate_doc/pdf/MC200-64.pdf"
task "MC300-32": "#{$root}/gen/certificate_doc/pdf/MC300-32.pdf"
task "MC300-64": "#{$root}/gen/certificate_doc/pdf/MC300-64.pdf"
task "MockProcCertModel": "#{$root}/gen/crd/pdf/MockProcCertModel.pdf"
task "MC100-32": "#{$root}/gen/crd/pdf/MC100-32.pdf"
task "MC100-64": "#{$root}/gen/crd/pdf/MC100-64.pdf"
task "MC200-32": "#{$root}/gen/crd/pdf/MC200-32.pdf"
task "MC200-64": "#{$root}/gen/crd/pdf/MC200-64.pdf"
task "MC300-32": "#{$root}/gen/crd/pdf/MC300-32.pdf"
task "MC300-64": "#{$root}/gen/crd/pdf/MC300-64.pdf"
task "MockProfileRelease": "#{$root}/gen/profile_doc/pdf/MockProfileRelease.pdf"
task "RVI20": "#{$root}/gen/profile_doc/pdf/RVI20.pdf"
task "RVA20": "#{$root}/gen/profile_doc/pdf/RVA20.pdf"
Expand Down
13 changes: 0 additions & 13 deletions arch/certificate_class/MC.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions arch/certificate_class/MockCertificateClass.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions arch/certificate_model/MC100-64.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions arch/certificate_model/MC200-64.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions arch/certificate_model/MC300-64.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions arch/proc_cert_class/MC.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yaml-language-server: $schema=../../schemas/proc_cert_class_schema.json

$schema: proc_cert_class_schema.json#
kind: Processor Certificate Class
processor_kind: Microcontroller
name: MC
long_name: Microcontroller Processor Certificate Class

introduction: |
The MC (Microcontroller Class) targets processors running low-level software on an RTOS or bare-metal.
mandatory_priv_modes:
- M
13 changes: 13 additions & 0 deletions arch/proc_cert_class/MockProcCertClass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yaml-language-server: $schema=../../schemas/proc_cert_class_schema.json

$schema: proc_cert_class_schema.json#
kind: Processor Certificate Class
processor_kind: Apps Processor
name: MockProcCertClass
long_name: Mock Processor Certificate Class Long Name

introduction: |
Here's the Mock Certificate Class introduction.
mandatory_priv_modes:
- M
Loading

0 comments on commit 7b0bd31

Please sign in to comment.