Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
102 changes: 79 additions & 23 deletions .github/actions/singularity-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,82 @@ description: All steps to use/build Singularity container
runs:
using: composite
steps:
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v4
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v4
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
shell: bash
- name: Setup project
run: ./bin/setup
shell: bash
- name: Setup apptainer
uses: eWaterCycle/[email protected]

- name: Get container from cache
id: cache-sif
uses: actions/cache@v4
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libruby3.2 ruby3.2-dev ruby3.2 ruby-dev
sudo gem update --system
shell: bash

- name: Set up Ruby
id: setup-ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: false # We'll handle gem installation manually for better control

- name: Install base gems
run: |
gem install bundler -v 2.4.20
gem install bigdecimal -v 3.2.2
gem install concurrent-ruby-ext -v 1.3.5
gem install debug -v 1.10.0
gem install ruby-prof -v 1.7.2
gem install nkf -v 0.2.0
gem install jaro_winkler -v 1.6.1
gem install prism -v 1.4.0
gem install rbs -v 3.9.4
gem install io-console -v 0.8.0
gem install json -v 2.12.2
gem install racc -v 1.8.1
gem install erb -v 5.0.1
gem install psych -v 5.2.6
gem install date -v 3.4.1
gem install stringio -v 3.1.7
shell: bash

- name: Bundle install
run: |
bundle config set --local path 'vendor/bundle'
bundle install
shell: bash

- name: Rebuild native extensions
run: |
for ext in bigdecimal concurrent-ruby-ext debug ruby-prof nkf jaro_winkler prism rbs io-console json racc erb psych date stringio; do
bundle exec gem pristine $ext || true
done
shell: bash

- name: Get node_modules cache
id: cache-node
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install node dependencies
if: steps.cache-node.outputs.cache-hit != 'true'
run: npm ci
shell: bash

- name: Build container
if: steps.cache-sif.outputs.cache-hit != 'true'
run: ./bin/build_container
shell: bash

- name: Setup project
run: ./bin/setup
shell: bash
7 changes: 1 addition & 6 deletions .github/workflows/regress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,7 @@ jobs:
rm -rf ext/llvm-project
git submodule sync --recursive
git submodule update --init --recursive --depth=1 ext/llvm-project
- name: Check for required directories and files
if: ${{ steps.cache-riscv.outputs.cache-hit != 'true' }}
run: |
ls -l ext/llvm-project/llvm/include
ls -l ext/llvm-project/llvm/lib/Target/RISCV
ls -l ext/llvm-project/llvm/lib/Target/RISCV/RISCV.td
# Dependencies are handled by setup script
- name: Configure and build llvm-tblgen
if: ${{ steps.cache-riscv.outputs.cache-hit != 'true' }}
run: |
Expand Down
1 change: 1 addition & 0 deletions backends/cpp_hart_gen/cpp/test/test_csr.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 3 additions & 7 deletions bin/build_container
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,11 @@ if [ $? -ne 0 ]; then
exit 1
fi


# build the container image
echo "Building container..."
if [ ! -d "${ROOT}/.singularity" ]; then
mkdir -p ${ROOT}/.singularity
fi
if [ -e ${CONTAINER_PATH} ]; then
rm -f ${CONTAINER_PATH}
fi
# Create .singularity directory if it doesn't exist and ensure clean container path
mkdir -p $(dirname ${CONTAINER_PATH})
rm -f ${CONTAINER_PATH}

$SUDO singularity build --force \
$FAKEROOT \
Expand Down
14 changes: 2 additions & 12 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,11 @@ if [ ! -d $ROOT/.home ]; then
mkdir $ROOT/.home
fi

if [ $PRESERVE_CONFIG -eq 0 ] || [ ! -f $ROOT/.bundle/config ]; then
if [ -f $ROOT/.bundle/config ] && [ $PRESERVE_CONFIG -eq 0 ]; then
echo "Recreating bundle config..."
fi
OLDDIR=$PWD
cd $ROOT
${RUN} bundle config set --local path ${ROOT}/.home/.gems
${RUN} bundle config set --local cache_path ${ROOT}/.home/.cache
${RUN} bundle config set --local with development
cd $OLDDIR
fi

if [ ! -d $ROOT/.home/.gems ]; then
OLDDIR=$PWD
cd $ROOT
echo "Installing Ruby gems..."
${RUN} bundle config set --local with development
${RUN} bundle install
cd $OLDDIR
fi
Expand Down
6 changes: 6 additions & 0 deletions spec/schemas/ext_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@
"$ref": "schema_defs.json#/$defs/spec_state",
"description": "Current state of this version"
},
"specification_source": {
"type": "string",
"enum": ["ISA Manual", "UDB"],
"default": "ISA Manual",
"description": "Who defines this extension: 'ISA Manual' for RISC-V International Privileged or Unprivileged ISA Manual, 'UDB' for UDB-defined extensions"
},
"repositories": {
"description": "Repositories associated with this extension",
"type": "array",
Expand Down
3 changes: 3 additions & 0 deletions spec/std/isa/ext/Smpmp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ versions:
- version: "1.11.0"
state: ratified
ratification_date: 2019-12
specification_source: "UDB"
changes:
- Made the unused `pmpaddr` and `pmpcfg` fields *WARL*, rather than *WIRI*.
- Specified semantics for PMP regions coarser than four bytes.
- version: "1.12.0"
state: ratified
ratification_date: 2021-12
specification_source: "UDB"
changes:
- PMP changes require an SFENCE.VMA on any hart that implements
page-based virtual memory, even if VM is not currently enabled.
Expand All @@ -26,6 +28,7 @@ versions:
- version: "1.13.0"
state: frozen
ratification_date: 2023-12
specification_source: "UDB"
description: |
To support secure processing and contain faults, it is desirable to limit the physical addresses
accessible by software running on a hart. The optional PMP (Physical Memory Protection) unit
Expand Down
2 changes: 2 additions & 0 deletions spec/std/isa/ext/Xmock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ description: This is just for testing
versions:
- version: "0.9.9"
state: development
specification_source: "UDB"
- version: "1.0.0"
state: ratified
specification_source: "UDB"
ratification_date: 2024-04
params:
MOCK_ENUM_2_INTS:
Expand Down
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions tools/ruby-gems/udb/doc/cli.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading