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

Added Openlane support with CI #198

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
25 changes: 25 additions & 0 deletions .github/workflows/ci_edalize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build-openlane-sky130
on: [push]

jobs:
build-picorv32:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
path: picorv32
- name: Checkout pdk
uses: actions/checkout@v2
with:
repository: olofk/pdklite
path: pdklite
- run: echo "PDK_ROOT=$GITHUB_WORKSPACE/pdklite" >> $GITHUB_ENV
- run: echo "EDALIZE_LAUNCHER=${GITHUB_WORKSPACE}/openlane_runner.py" >> $GITHUB_ENV
- run: pip3 install --user -e "git+https://github.com/olofk/edalize.git#egg=edalize"
- run: pip3 install fusesoc
- run: docker pull efabless/openlane:v0.12
- run: wget https://raw.githubusercontent.com/olofk/subservient/main/openlane_runner.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The olofk/subservient has switched away from using the openlane_runner.py. Is this change sufficient to pass the CI or should it be updated to the newer Edalize docker setup?

Suggested change
- run: wget https://raw.githubusercontent.com/olofk/subservient/main/openlane_runner.py
- run: wget https://raw.githubusercontent.com/klasnordmark/openlane-examples/main/openlane_runner.py

- run: chmod +x openlane_runner.py
- run: fusesoc library add fpganes $GITHUB_WORKSPACE/picorv32
- run: fusesoc run --target=sky130 picorv32
8 changes: 8 additions & 0 deletions openlane_params.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These values are taken from the designs examples in the Openlane repository
set ::env(CLOCK_PORT) "clk"
set ::env(CLOCK_NET) $::env(CLOCK_PORT)
set ::env(GLB_RT_ADJUSTMENT) 0.1
set ::env(SYNTH_MAX_FANOUT) 6
set ::env(CLOCK_PERIOD) "24.73"
set ::env(FP_CORE_UTIL) 30
set ::env(PL_TARGET_DENSITY) [ expr ($::env(FP_CORE_UTIL)+5) / 100.0 ]
39 changes: 37 additions & 2 deletions picorv32.core
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CAPI=2:
name : ::picorv32:0-r1
name : ::picorv32:1.0

filesets:
rtl:
Expand All @@ -18,6 +18,9 @@ filesets:
tb_verilator:
files:
- testbench.cc : {file_type : cppSource}
openlane:
files:
- openlane_params.tcl : {file_type : tclSource}

targets:
default:
Expand All @@ -29,14 +32,27 @@ targets:
verilator:
mode : lint-only
toplevel : [picorv32_axi]

sky130:
default_tool : openlane
filesets : [rtl, openlane]
parameters :
- ENABLE_REGS_16_31=0
- ENABLE_REGS_DUALPORT=0
- BARREL_SHIFTER=1
- TWO_CYCLE_ALU=1
- ENABLE_FAST_MUL=1
- ENABLE_IRQ=1
toplevel : picorv32

test:
default_tool: icarus
filesets: [rtl, tb, "tool_verilator? (tb_verilator)"]
parameters: [COMPRESSED_ISA, axi_test, firmware, noerror, trace, vcd, verbose]
toplevel:
- "tool_verilator? (picorv32_wrapper)"
- "!tool_verilator? (testbench)"

tools:
verilator :
cli_parser : fusesoc
Expand All @@ -58,6 +74,24 @@ parameters:
datatype : str
default : 1
paramtype : vlogdefine
ENABLE_REGS_16_31:
datatype : int
paramtype : vlogparam
ENABLE_REGS_DUALPORT:
datatype : int
paramtype : vlogparam
BARREL_SHIFTER:
datatype : int
paramtype : vlogparam
TWO_CYCLE_ALU:
datatype : int
paramtype : vlogparam
ENABLE_FAST_MUL:
datatype : int
paramtype : vlogparam
ENABLE_IRQ:
datatype : int
paramtype : vlogparam
axi_test:
datatype : bool
paramtype : plusarg
Expand All @@ -76,3 +110,4 @@ parameters:
verbose:
datatype : bool
paramtype : plusarg