-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Numerous enhancements: * Added passes to detect which functions are reachable and which exceptions might occur in an AST * Add landing page for cfg html doc * Actually parsing CSR read/write functinos * Add htimedelta and hcountern CSRs * Only show the implemented functions in the cfg html docs * Show which exceptions might be raised for each instruction in cfg html docs * Add String types to IDL so that configuration parameter strings can be compared * Improve IDL documentation * Improved pruning * Add gen_adoc for all AstNodes * Add action to publich cfg_html example and YARD docs to GitHub pages * find/replace links on the entire adoc document, rather than specific sections * Completed refactoring to make AstNodes independent of SyntaxNodes
- Loading branch information
Showing
277 changed files
with
5,152 additions
and
2,272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Deploy pages | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
jobs: | ||
pages: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Clone Github Repo Action | ||
uses: actions/checkout@v4 | ||
- name: Setup apptainer | ||
uses: eWaterCycle/[email protected] | ||
- name: Get container from cache | ||
id: cache-sif | ||
uses: actions/cache@v3 | ||
with: | ||
path: .singularity/image.sif | ||
key: ${{ hashFiles('container.def') }} | ||
- name: Get gems and node files from cache | ||
id: cache-bundle-npm | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.home/.gems | ||
node_modules | ||
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }} | ||
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }} | ||
name: Build container | ||
run: ./bin/build_container | ||
- name: Setup project | ||
run: ./bin/setup | ||
- name: Build html documentation for generic_rv64 | ||
run: ./do gen:html[generic_rv64] | ||
- name: Generate YARD docs | ||
run: ./do gen:tool_doc | ||
- name: Create _site | ||
run: mkdir -p _site | ||
- name: Copy cfg html | ||
run: cp -R gen/cfg_html_doc/generic_rv64/html _site | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: '_site' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
-o docs/ruby --embed-mixins 'lib/**/*.rb' | ||
-o _site/ruby --embed-mixins 'lib/**/*.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,5 @@ gem "yard" | |
group :development do | ||
gem "solargraph" | ||
gem 'rubocop-minitest' | ||
gem 'ruby-prof' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# yaml-language-server: $schema=../../../schemas/csr_schema.json | ||
|
||
hcounteren: | ||
long_name: Hypervisor Counter Enable | ||
address: 0x606 | ||
priv_mode: S | ||
length: 32 | ||
description: | | ||
Together with `scounteren`, delegates control of the hardware performance-monitoring counters | ||
to VS/VU-mode | ||
|
||
See `cycle` for a table describing how exceptions occur. | ||
definedBy: H | ||
fields: | ||
CY: | ||
location: 0 | ||
description: | | ||
When all of `scounteren.CY`, `mcounteren.CY`, and `hcounteren.CY` are set, | ||
the `cycle` CSR (an alias of `mcycle`) is accessible to VU-mode. | ||
|
||
When `mcounteren.CY` and `hcounteren.CY` are set, | ||
the `cycle` CSR (an alias of `mcycle`) is accessible to VS-mode. | ||
|
||
This bit is read-only 0 when `mcounteren.CY` is clear. | ||
|
||
Summary: | ||
|
||
!=== | ||
! `mcounteren.CY` ! `hcounteren.CY` behavior | ||
|
||
! 0 ! read-only 0 | ||
! 1 ! writeable | ||
!=== | ||
definedBy: Zicntr | ||
type: RW-H | ||
reset_value: UNDEFINED_LEGAL | ||
IR: | ||
location: 2 | ||
description: | | ||
When all of `scounteren.IR`, `mcounteren.IR`, and `hcounteren.IR` are set, | ||
the `instret` CSR (an alias of `minstret`) is accessible to VU-mode. | ||
|
||
When `mcounteren.IR` and `hcounteren.IR` are set, | ||
the `instret` CSR (an alias of `minstret`) is accessible to VS-mode. | ||
|
||
This bit is read-only 0 when `mcounteren.IR` is clear. | ||
|
||
Summary: | ||
|
||
!=== | ||
! `mcounteren.IR` ! `hcounteren.IR` behavior | ||
|
||
! 0 ! read-only 0 | ||
! 1 ! writeable | ||
!=== | ||
|
||
|
||
type: RW-H | ||
reset_value: UNDEFINED_LEGAL | ||
<%- (3..31).each do |hpm_num| -%> | ||
HPM<%= hpm_num %>: | ||
location: <%= hpm_num %> | ||
description: | | ||
When all of `scounteren.HPM<%= hpm_num %>`, `mcounteren.HPM<%= hpm_num %>`, and `hcounteren.HPM<%= hpm_num %>` are set, | ||
the `hpmcounter<%= hpm_num %>` CSR (an alias of `mhpmcounter<%= hpm_num %>`) is accessible to VU-mode. | ||
|
||
When `mcounteren.HPM<%= hpm_num %>` and `hcounteren.HPM<%= hpm_num %>` are set, | ||
the `hpmcounter<%= hpm_num %>` CSR (an alias of `mhpmconuter<%= hpm_num %>`) is accessible to VS-mode. | ||
|
||
This bit is read-only 0 when `mcounteren.HPM<%= hpm_num %>` is clear. | ||
|
||
Summary: | ||
|
||
!=== | ||
! `mcounteren.HPM<%= hpm_num %>` ! `hcounteren.HPM<%= hpm_num %>` behavior | ||
|
||
! 0 ! read-only 0 | ||
! 1 ! writeable | ||
!=== | ||
|
||
type: RW | ||
reset_value: UNDEFINED_LEGAL | ||
<%- end -%> | ||
sw_read(): | | ||
if (!implemented?(ExtensionName::Zicntr) && !implemented?(ExtensionName::Zihpm)) { | ||
# this CSR isn't supposed to exist when Zicntr and Zihpm are not implemented | ||
raise(ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
|
||
# any bit of mcounteren that is zero forces that same bit of hcounteren to 0 | ||
return $bits(CSR[hcounteren]) & $bits(CSR[mcounteren]); |
Oops, something went wrong.