Skip to content
Closed
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
6 changes: 6 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
run: mkdir -p _site/example_cfg
- name: Create _site/manual
run: mkdir -p _site/manual
- name: Create _site/dash
run: mkdir -p _site/dash
- name: Create _site/pdfs
run: mkdir -p _site/pdfs
- name: Create _site/htmls
Expand All @@ -71,6 +73,10 @@ jobs:
run: cp gen/crd_doc/html/MC-1.html _site/htmls/MC-1.html
- name: Copy manual html
run: cp -R gen/manual/isa/top/all/html _site/manual
- name: Generate dashboard
run: ./do gen:dash
- name: Copy dashboard
run: cp -R gen/dashboard/* _site/dash
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
Expand Down
18 changes: 18 additions & 0 deletions backends/dashboard/tasks.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true

require "pathname"

namespace :gen do
desc "Generate status dashboard"
task dash: ["#{$root}/.stamps/arch-gen-_64.stamp"] do
template_path = Pathname.new("#{$root}/backends/dashboard/templates/index.html.erb")
erb = ERB.new template_path.read, trim_mode: "-"
erb.filename = template_path.to_s

arch_def = arch_def_for("_64")

result_path = Pathname.new("#{$root}/gen/dashboard/index.html")
FileUtils.mkdir_p result_path.dirname
File.write result_path, erb.result(binding)
end
end
86 changes: 86 additions & 0 deletions backends/dashboard/templates/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="apple-touch-icon" sizes="76x76" href="../assets/img/apple-icon.png">
<link rel="icon" type="image/png" href="../assets/img/favicon.png">
<title>
RISC-V Unified DB Status
</title>

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

</head>

<body class="container">

<h1><span class="font-monospace">riscv-unified-db</span> Status Dashboard <br/><small class="text-muted">Commit <a href="https://github.com/riscv-software-src/riscv-unified-db/tree/<%= `git rev-parse HEAD`.strip %>"><%= `git rev-parse --short HEAD`.strip %></a></small></h1>


<div class="card">
<div class="card-body">
<h5 class="card-title">Instruction Status</h5>

<h6 class="card-subtitle mb-2 text-muted">Of <strong><%= arch_def.instructions.size %></strong> known instructions</h6>

<div class="card-body">
<%- idl_insts = arch_def.instructions.select { |i| !i.data["operation()"].nil? && !i.data["operation()"].empty? } -%>
<%- idl_insts_pct = (idl_insts.size*100) / arch_def.instructions.size -%>
<div class="progress-wrapper">
<div class="progress-info">
<div class="progress-percentage">
<span class="text-sm font-weight-bold">IDL implementation (<%= idl_insts.size %>, <%= idl_insts_pct %>%)</span>
</div>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" aria-valuenow="<%= idl_insts.size %>" aria-valuemin="0" aria-valuemax="<%= arch_def.instructions.size %>" style="width: <%= idl_insts_pct %>%;"></div>
</div>
</div>

<%- sail_insts = arch_def.instructions.select { |i| !i.data["sail()"].nil? && !i.data["sail()"].empty? } -%>
<%- sail_insts_pct = (sail_insts.size*100) / arch_def.instructions.size -%>
<div class="progress-wrapper">
<div class="progress-info">
<div class="progress-percentage">
<span class="text-sm font-weight-bold">Sail implementation (<%= sail_insts.size %>, <%= sail_insts_pct %>%)</span>
</div>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" aria-valuenow="<%= sail_insts.size %>" aria-valuemin="0" aria-valuemax="<%= arch_def.instructions.size %>" style="width: <%= sail_insts_pct %>%;"></div>
</div>
</div>

<%- desc_insts = arch_def.instructions.select { |i| i.data["description"].strip != "No description available." } -%>
<%- desc_insts_pct = (desc_insts.size*100) / arch_def.instructions.size -%>
<div class="progress-wrapper">
<div class="progress-info">
<div class="progress-percentage">
<span class="text-sm font-weight-bold">Descriptions (<%= desc_insts.size %>, <%= desc_insts_pct %>%)</span>
</div>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" aria-valuenow="<%= desc_insts.size %>" aria-valuemin="0" aria-valuemax="<%= arch_def.instructions.size %>" style="width: <%= desc_insts_pct %>%;"></div>
</div>
</div>

<%- lname_insts = arch_def.instructions.select { |i| i.data["long_name"].strip != "No synopsis available." } -%>
<%- lname_insts_pct = (lname_insts.size*100) / arch_def.instructions.size -%>
<div class="progress-wrapper">
<div class="progress-info">
<div class="progress-percentage">
<span class="text-sm font-weight-bold">Long name (<%= lname_insts.size %>, <%= lname_insts_pct %>%)</span>
</div>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" aria-valuenow="<%= lname_insts.size %>" aria-valuemin="0" aria-valuemax="<%= arch_def.instructions.size %>" style="width: <%= lname_insts_pct %>%;"></div>
</div>
</div>
</div>
</div>
</div>

</body>

</html>
Loading