Skip to content

Commit 9a2e513

Browse files
authored
Merge branch 'main' into Ali/sverilog
Signed-off-by: Alieldin Alaa <[email protected]>
2 parents 9466b54 + e52bf81 commit 9a2e513

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1055
-155
lines changed

.devcontainer/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,19 @@ RUN apt-get clean autoclean
4242
RUN apt-get autoremove -y
4343
RUN rm -rf /var/lib/{apt,dpkg,cache,log}/*
4444

45+
# Create Python virtual environment and install packages
46+
COPY requirements.txt /tmp/requirements.txt
47+
RUN /usr/bin/python3 -m venv /opt/venv && \
48+
/opt/venv/bin/pip install -r /tmp/requirements.txt && \
49+
rm /tmp/requirements.txt
50+
ENV PATH="/opt/venv/bin:$PATH"
51+
52+
# Install npm packages globally in the container
53+
COPY package.json package-lock.json /opt/node/
54+
RUN cd /opt/node && \
55+
/usr/bin/npm ci && \
56+
rm /opt/node/package.json /opt/node/package-lock.json
57+
ENV NODE_PATH="/opt/node/node_modules"
58+
ENV PATH="/opt/node/node_modules/.bin:$PATH"
59+
4560
WORKDIR /workspace

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "RISC-V UnifiedDB Dev",
3-
"build": { "dockerfile": "Dockerfile" },
3+
"build": { "dockerfile": "Dockerfile", "context": ".." },
44
"updateContentCommand": "${containerWorkspaceFolder}/.devcontainer/updateContentCommand.sh",
55
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/onCreateCommand.sh",
66
"remoteEnv": {

.devcontainer/onCreateCommand.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/bin/bash
22

3-
npm i
43
bundle install

.github/workflows/deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,38 @@ jobs:
316316
with:
317317
name: ac200-crd
318318
path: gen/proc_crd/pdf/AC200-CRD.pdf
319+
build-rvi20-32-crd:
320+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
321+
runs-on: ubuntu-latest
322+
steps:
323+
- name: Clone Github Repo Action
324+
uses: actions/checkout@v4
325+
- name: singularity setup
326+
uses: ./.github/actions/singularity-setup
327+
- name: Generate RVI20-32 CRD
328+
run: ./do gen:proc_crd_pdf[RVI20-32]
329+
- name: Upload RVI20-32 CRD
330+
uses: actions/upload-artifact@v4
331+
if: (github.event_name == 'push') && (github.ref_name == 'main')
332+
with:
333+
name: rvi20-32-crd
334+
path: gen/proc_crd/pdf/RVI20-32-CRD.pdf
335+
build-rvi20-64-crd:
336+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
337+
runs-on: ubuntu-latest
338+
steps:
339+
- name: Clone Github Repo Action
340+
uses: actions/checkout@v4
341+
- name: singularity setup
342+
uses: ./.github/actions/singularity-setup
343+
- name: Generate RVI20-64 CRD
344+
run: ./do gen:proc_crd_pdf[RVI20-64]
345+
- name: Upload RVI20-64 CRD
346+
uses: actions/upload-artifact@v4
347+
if: (github.event_name == 'push') && (github.ref_name == 'main')
348+
with:
349+
name: rvi20-64-crd
350+
path: gen/proc_crd/pdf/RVI20-64-CRD.pdf
319351
build-mc100-32-crd:
320352
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
321353
runs-on: ubuntu-latest

.github/workflows/pages.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,20 @@ jobs:
148148
path: _site/pdfs
149149
github-token: ${{ secrets.GITHUB_TOKEN }}
150150
run-id: ${{ github.event.workflow_run.id }}
151+
- name: Download RVI20-32-CRD
152+
uses: actions/download-artifact@v5
153+
with:
154+
name: RVI20-32-crd
155+
path: _site/pdfs
156+
github-token: ${{ secrets.GITHUB_TOKEN }}
157+
run-id: ${{ github.event.workflow_run.id }}
158+
- name: Download RVI20-64-CRD
159+
uses: actions/download-artifact@v5
160+
with:
161+
name: RVI20-64-crd
162+
path: _site/pdfs
163+
github-token: ${{ secrets.GITHUB_TOKEN }}
164+
run-id: ${{ github.event.workflow_run.id }}
151165
- name: Download MC100-32
152166
uses: actions/download-artifact@v5
153167
with:

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Additionally, developers will be interested in the following:
6060

6161
=== Prerequisites
6262

63-
UnifiedDB tools are set up to run in a container. Both Docker (any version) and Singularity/Apptainer (`Singularity CE >= 3.3` or `Apptainer >= 1.0`) are supported.
63+
UnifiedDB tools are set up to run in a container. Docker (any version), Podman (any version), and Singularity/Apptainer (`Singularity CE >= 3.3` or `Apptainer >= 1.0`) are supported.
6464

6565
=== Devcontainer
6666

Rakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ namespace :test do
119119
# "Run the cross-validation against LLVM"
120120
task :llvm do
121121
begin
122-
sh "#{$root}/.home/.venv/bin/python3 -m pytest ext/auto-inst/test_parsing.py -v"
122+
sh "/opt/venv/bin/python3 -m pytest ext/auto-inst/test_parsing.py -v"
123123
rescue => e
124124
raise unless e.message.include?("status (5)") # don't fail on skipped tests
125125
end
@@ -546,6 +546,8 @@ task "RVI20-32-CTP": "#{$root}/gen/proc_ctp/pdf/RVI20-32-CTP.pdf"
546546
task "RVI20-64-CTP": "#{$root}/gen/proc_ctp/pdf/RVI20-64-CTP.pdf"
547547
task "MC100-32-CTP": "#{$root}/gen/proc_ctp/pdf/MC100-32-CTP.pdf"
548548
task "MC100-32-CTP-HTML": "#{$root}/gen/proc_ctp/pdf/MC100-32-CTP.html"
549+
task "RVI20-32-CRD": "#{$root}/gen/proc_crd/pdf/RVI20-32-CRD.pdf"
550+
task "RVI20-64-CRD": "#{$root}/gen/proc_crd/pdf/RVI20-64-CRD.pdf"
549551
task "MC100-32-CRD": "#{$root}/gen/proc_crd/pdf/MC100-32-CRD.pdf"
550552
task "MC100-64-CRD": "#{$root}/gen/proc_crd/pdf/MC100-64-CRD.pdf"
551553
task "MC200-32-CRD": "#{$root}/gen/proc_crd/pdf/MC200-32-CRD.pdf"

backends/cfg_html_doc/html_gen.rake

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ rule %r{#{$root}/gen/cfg_html_doc/.*/antora/playbook.yaml} => proc { |tname|
119119
snapshot: true
120120
supplemental_files:
121121
- path: css/vendor/tabs.css
122-
contents: #{$root}/node_modules/@asciidoctor/tabs/dist/css/tabs.css
122+
contents: /opt/node/node_modules/@asciidoctor/tabs/dist/css/tabs.css
123123
- path: js/vendor/tabs.js
124-
contents: #{$root}/node_modules/@asciidoctor/tabs/dist/js/tabs.js
124+
contents: /opt/node/node_modules/@asciidoctor/tabs/dist/js/tabs.js
125125
- path: partials/footer-scripts.hbs
126126
contents: |
127127
<script id="site-script" src="{{{uiRootPath}}}/js/site.js" data-ui-root-path="{{{uiRootPath}}}"></script>
@@ -234,10 +234,9 @@ rule %r{#{$root}/\.stamps/html-gen-.*\.stamp} => proc { |tname|
234234
playbook_path = $root / "gen" / "cfg_html_doc" / config_name / "antora" / "playbook.yaml"
235235
Rake::Task[playbook_path].invoke
236236

237-
$logger.info "Running Antora under npm to create #{config_name}"
238-
237+
$logger.info "Running Antora to create #{config_name}"
239238
sh [
240-
"npm exec -- antora",
239+
"/opt/node/node_modules/.bin/antora",
241240
"--stacktrace",
242241
"generate",
243242
"--cache-dir=#{$root}/.home/.antora",
@@ -247,7 +246,7 @@ rule %r{#{$root}/\.stamps/html-gen-.*\.stamp} => proc { |tname|
247246
playbook_path
248247
].join(" ")
249248

250-
$logger.info "Done running Antora under npm to create #{config_name}"
249+
$logger.info "Done running Antora to create #{config_name}"
251250

252251
FileUtils.touch t.name
253252
end

backends/ext_pdf_doc/tasks.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ rule %r{#{$resolver.gen_path}/ext_pdf_doc/.*/pdf/.*_extension\.pdf} => proc { |t
3434
"-a pdf-theme=#{ENV['THEME']}",
3535
"-a pdf-fontsdir=#{$root}/ext/docs-resources/fonts",
3636
"-a imagesdir=#{$root}/ext/docs-resources/images",
37-
"-a wavedrom=#{$root}/node_modules/.bin/wavedrom-cli",
37+
"-a wavedrom=/opt/node/node_modules/.bin/wavedrom-cli",
3838
"-r asciidoctor-diagram",
3939
"-r idl_highlighter",
4040
"-o #{t.name}",
@@ -63,7 +63,7 @@ rule %r{#{$resolver.gen_path}/ext_pdf_doc/.*/html/.*_extension\.html} => proc {
6363
"-v",
6464
"-a toc",
6565
"-r asciidoctor-diagram",
66-
"-a wavedrom=#{$root}/node_modules/.bin/wavedrom-cli",
66+
"-a wavedrom=/opt/node/node_modules/.bin/wavedrom-cli",
6767
"-o #{t.name}",
6868
adoc_file
6969
].join(" ")

backends/generators/tasks.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ namespace :gen do
6464
inst_dir = cfg_arch.path / "inst"
6565
csr_dir = cfg_arch.path / "csr"
6666

67-
# Run the Go generator script using the same Python environment
67+
# Run the Go generator script
6868
# Note: The script uses --output not --output-dir
69-
sh "#{$root}/.home/.venv/bin/python3 #{$root}/backends/generators/Go/go_generator.py --inst-dir=#{inst_dir} --csr-dir=#{csr_dir} --output=#{output_dir}inst.go"
69+
sh "/opt/venv/bin/python3 #{$root}/backends/generators/Go/go_generator.py --inst-dir=#{inst_dir} --csr-dir=#{csr_dir} --output=#{output_dir}inst.go"
7070
end
7171

7272
desc <<~DESC

0 commit comments

Comments
 (0)