Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Big beautiful refactoring #386

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d7e4468
Finally able to generate MC100-32 PDF and it looks good.
james-ball-qualcomm Jan 1, 2025
99a683c
Forgot to switch profile_class method of a profile_release to use the…
james-ball-qualcomm Jan 1, 2025
f9b9c1f
Forgot to make dest directory in profiles tasks.rake
james-ball-qualcomm Jan 1, 2025
9cb57ea
Fixing comments
james-ball-qualcomm Jan 1, 2025
b9d6bb3
Merge branch 'big-beautiful-refactoring' of https://github.com/riscv-…
james-ball-qualcomm Jan 1, 2025
4cfcda5
Fixes to uniq! (returns nil sometimes, not good).
james-ball-qualcomm Jan 2, 2025
e8465dd
Improve tasks.rake message
james-ball-qualcomm Jan 2, 2025
0674ef7
Found some extra places to rename cfg_arch to design.
james-ball-qualcomm Jan 2, 2025
70c1d79
Looks like I found a bug in the csr_field type_cache. It was barfing …
james-ball-qualcomm Jan 2, 2025
47fff49
Merge branch 'big-beautiful-refactoring' of https://github.com/riscv-…
james-ball-qualcomm Jan 2, 2025
e06c4f5
Rename routines ending in _extensions to _ext_reqs or _ext_vers to ma…
james-ball-qualcomm Jan 2, 2025
df2a905
RVB23 listed RVA as its class erroneously
james-ball-qualcomm Jan 3, 2025
d990076
Renamed mandatory_extensions to mandatory_ext_reqs in places I should…
james-ball-qualcomm Jan 3, 2025
924ffde
Fixed instructions and CSRs in #291 (CRDs list things like instructio…
james-ball-qualcomm Jan 3, 2025
05d7ed9
Working on getting list of exceptions and interrupts correct for the …
james-ball-qualcomm Jan 4, 2025
7e3d811
Merge branch 'main' into big-beautiful-refactoring
james-ball-qualcomm Jan 7, 2025
8ad584b
Merge remote-tracking branch 'origin' into big-beautiful-refactoring
james-ball-qualcomm Jan 7, 2025
e459230
Merge branch 'issue-276-retire-MC-1-Google-Doc' into big-beautiful-re…
james-ball-qualcomm Jan 8, 2025
2a113a0
Created IDesign that unit-level and Design can both use.
james-ball-qualcomm Jan 8, 2025
989db17
Fixes due to introduction of Design class and removal of ConfiguredAr…
james-ball-qualcomm Jan 9, 2025
953785a
One more fix
james-ball-qualcomm Jan 9, 2025
5434a14
Merge remote-tracking branch 'origin' into big-beautiful-refactoring
james-ball-qualcomm Jan 9, 2025
4db2d68
Fix to bug found after merging in main.
james-ball-qualcomm Jan 9, 2025
4b1876f
Merge remote-tracking branch 'origin' into big-beautiful-refactoring
james-ball-qualcomm Jan 9, 2025
c9b2d6b
Change comment to kick off another regression test on GitHub server (…
james-ball-qualcomm Jan 9, 2025
57d5f08
task for profile is now profile_release_pdf.
james-ball-qualcomm Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,19 @@ 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
Expand All @@ -86,7 +90,7 @@ jobs:
- name: Create MC100-64 HTML Spec
run: ./do gen: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/certificate_doc/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
2 changes: 1 addition & 1 deletion .github/workflows/regress.yml
Original file line number Diff line number Diff line change
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 @@ -11,6 +11,7 @@
diag-ditaa-*
arch/manual/isa/**/riscv-isa-manual
gen
resolved_arch
node_modules
_site
images
Expand Down
20 changes: 19 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,30 @@
"args": [],
"askParameters": false
},
{
"type": "rdbg",
"name": "portfolios",
"request": "launch",
"command": "bundle exec rake",
"script": "portfolios",
"args": [],
"askParameters": false
},
{
"type": "rdbg",
"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
52 changes: 48 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ 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"

Expand All @@ -19,7 +21,44 @@ end

directory "#{$root}/.stamps"

def cfg_arch_for(config_name)
# @param base_isa_name [String] rv32 or rv64
# @param base [Integer] 32 or 64
# @return [Architecture]
def arch_for(base_isa_name, base)
Rake::Task["#{$root}/.stamps/resolve-#{base_isa_name}.stamp"].invoke

@archs ||= {}
return @archs[base_isa_name] if @archs.key?(base_isa_name)

@archs[base_isa_name] =
Architecture.new(
base_isa_name,
base,
$root / "gen" / "resolved_arch" / base_isa_name,
)
end

# @param design_name [String] Profile release name for profiles and certificate model name for certificates
# @param arch [Architecture] The architecture database
# @param base [Integer] 32 or 64
# @param portfolios [Array<Portfolio>] Portfolios in this design
# @return [PortfolioDesign]
def portfolio_design_for(design_name, arch, base, portfolios)
Rake::Task["#{$root}/.stamps/resolve-#{design_name}.stamp"].invoke

@portfolio_designs ||= {}
return @portfolio_designs[design_name] if @portfolio_designs.key?(design_name)

@portfolio_designs[design_name] =
PortfolioDesign.new(
design_name,
arch,
base,
portfolios
)
end

def cfg_arch_for(config_name, base = nil)
Rake::Task["#{$root}/.stamps/resolve-#{config_name}.stamp"].invoke

@cfg_archs ||= {}
Expand All @@ -28,6 +67,7 @@ def cfg_arch_for(config_name)
@cfg_archs[config_name] =
ConfiguredArchitecture.new(
config_name,
base,
$root / "gen" / "resolved_arch" / config_name,
overlay_path: $root / "cfgs" / config_name / "arch_overlay"
)
Expand Down Expand Up @@ -117,18 +157,18 @@ 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", nil, "#{$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
print "Parsing IDL code for RV32..."
cfg_arch32 = cfg_arch_for("rv32")
cfg_arch32 = cfg_arch_for("rv32", 32)
puts "done"

cfg_arch32.type_check

print "Parsing IDL code for RV64..."
cfg_arch64 = cfg_arch_for("rv64")
cfg_arch64 = cfg_arch_for("rv64", 64)
puts "done"

cfg_arch64.type_check
Expand Down Expand Up @@ -289,9 +329,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 Down
3 changes: 2 additions & 1 deletion arch/profile_release/MockProfileRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ $schema: profile_release_schema.json#
kind: profile release
name: MockProfileRelease
marketing_name: MockProfileRelease Marketing Name
class: MockProfileClass
class:
$ref: profile_class/MockProfileClass.yaml#
release: 20
state: ratified # current status ["ratified", "development"]
versions:
Expand Down
3 changes: 2 additions & 1 deletion arch/profile_release/RVA20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ $schema: profile_release_schema.json#
kind: profile release
name: RVA20
marketing_name: RVA20
class: RVA
class:
$ref: profile_class/RVA.yaml#
release: 20
state: ratified # current status ["ratified", "development"]
ratification_date: "2023-04-03"
Expand Down
3 changes: 2 additions & 1 deletion arch/profile_release/RVA22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ $schema: profile_release_schema.json#
kind: profile release
name: RVA22
marketing_name: RVA22
class: RVA
class:
$ref: profile_class/RVA.yaml#
release: 22
state: ratified # current status ["ratified", "development"]
ratification_date: "2023-04-03"
Expand Down
7 changes: 4 additions & 3 deletions arch/profile_release/RVA23.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
$schema: profile_schema.json#
kind: profile
$schema: profile_release_schema.json#
kind: profile release
name: RVA23
marketing_name: RVA23
class: RVA
class:
$ref: profile_class/RVA.yaml#
release: 23
state: ratified # current status ["ratified", "development"]
ratification_date: "2023-04-03"
Expand Down
7 changes: 4 additions & 3 deletions arch/profile_release/RVB23.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
$schema: profile_schema.json#
kind: profile
$schema: profile_release_schema.json#
kind: profile release
name: RVB23
marketing_name: RVB23
class: RVB
class:
$ref: profile_class/RVB.yaml#
release: 23
state: ratified # current status ["ratified", "development"]
ratification_date: "2023-04-03"
Expand Down
5 changes: 3 additions & 2 deletions arch/profile_release/RVI20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ $schema: profile_release_schema.json#
kind: profile release
name: RVI20
marketing_name: RVI20
class: RVI
release: 20
class:
$ref: profile_class/RVI.yaml#
base: null
state: ratified # current status ["ratified", "development"]
ratification_date: "2023-04-03"

Expand Down
Loading
Loading