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
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build-openlane-sky130
on: [push]

jobs:
build-apu:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
path: fpganes
- 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
- run: chmod +x openlane_runner.py
- run: fusesoc library add fpganes $GITHUB_WORKSPACE/fpganes
- run: fusesoc run --target=apu-sky130 fpganes

build-ppu:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
path: fpganes
- 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
- run: chmod +x openlane_runner.py
- run: fusesoc library add fpganes $GITHUB_WORKSPACE/fpganes
- run: fusesoc run --target=ppu-sky130 fpganes
6 changes: 6 additions & 0 deletions data/apu_sky130.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set ::env(CLOCK_PORT) "clk"
set ::env(CLOCK_NET) $::env(CLOCK_PORT)
set ::env(CLOCK_PERIOD) "17.0"
set ::env(FP_CORE_UTIL) 35
set ::env(SYNTH_MAX_FANOUT) 6
set ::env(PL_TARGET_DENSITY) [ expr ($::env(FP_CORE_UTIL)+5) / 100.0 ]
7 changes: 7 additions & 0 deletions data/ppu_sky130.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set ::env(CLOCK_PORT) "clk"
set ::env(CLOCK_NET) $::env(CLOCK_PORT)
set ::env(GLB_RT_ADJUSTMENT) 0.05
set ::env(FP_CORE_UTIL) 20
set ::env(SYNTH_MAX_FANOUT) 8
set ::env(PL_TARGET_DENSITY) 0.25
set ::env(CLOCK_PERIOD) "18.0"
64 changes: 64 additions & 0 deletions fpganes.core
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
CAPI=2:

name : ::fpganes:0

filesets:
rtl:
files:
- src/oam_palette.txt : {file_type : user, copyto : oam_palette.txt}
- src/MicroCode.v : {is_include_file : true}
- src/apu.v
- src/cpu.v
- src/nes_palette.txt : {file_type : user, copyto : nes_palette.txt}
- src/mmu.v
- src/ppu.v
- src/nes.v
file_type : verilogSource

nexys4:
files:
- src/hw_uart.v
- src/hq2x.v
- src/vga.v
- src/hw_sound.v
- src/clk_wiz_v3_6.v
- src/Nexys4_Master.ucf : {file_type : UCF}
- src/NES_Nexys4.v
- src/hw_led.v
file_type : verilogSource

apu-sky130:
files:
- src/apu.v : {file_type : verilogSource}
- data/apu_sky130.tcl : {file_type : tclSource}

ppu-sky130:
files:
- src/oam_palette.txt : {file_type : user, copyto : oam_palette.txt}
- src/ppu.v : {file_type : verilogSource}
- data/ppu_sky130.tcl : {file_type : tclSource}

targets:
default:
filesets : [rtl]

nexys4:
default_tool : ise
filesets: [rtl, nexys4]
tools:
ise:
family : Artix7
device : xc7a100t
package : csg324
speed : -1
toplevel : NES_Nexys4

apu-sky130:
default_tool : openlane
filesets : [apu-sky130]
toplevel : APU

ppu-sky130:
default_tool : openlane
filesets : [ppu-sky130]
toplevel : PPU