Slide 1

Slide 1 text

Continuous Integration for Hardware Projects on LibreCores CI Librecores Free and Open Digital Hardware

Slide 2

Slide 2 text

● FOSSi Foundation is a non-profit foundation ● Mission : Promote and assist free and open digital hardware designs and their related ecosystems. ● Operates as an open, inclusive, vendor-independent group. ● https://fossi-foundation.org/

Slide 3

Slide 3 text

● Librecores CI is an approach/service to provide continuous integration to hardware projects ● Provide automation service ○ Currently setting up demo flow for OpenRISC ○ Will target more in future ( beyond GSoC ) ● Powered by Jenkins. https://www.librecores.org/static/librecores-ci

Slide 4

Slide 4 text

Why Jenkins? ● Free and open-source project. ● It’s a framework ● Self-hosted setup ○ E.g. remote build agents ● Features we need ○ Multi-branch pipeline ○ Tool management plugins ○ General purpose plugins ○ Security and shared access engines ● Success Stories in this area

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Deliverables Setup demo CI Flow for mor1kx (openrisc project) ● Modifying & optimising mor1k Travis CI flow to use Librecores-CI docker image ● Create Jenkinsfile in OpenRISC projects . ● Create CI for Yosys synthesis ● Creating CI for OpenOCD/GDB ● Extending Jenkinsfile in mor1kx (to make Yosys and OpenOCD/GDB part of the build pipeline)

Slide 7

Slide 7 text

Free and open RISC instruction set architecture with DSP features Create a free and open processor for embedded systems ( https://openrisc.io/ ) Set of free, open source implementations of the architecture Complete set of free, open source software development tools, libraries, operating systems and applications OpenRISC https://openrisc.io/

Slide 8

Slide 8 text

● Detach reusable logic to https://github.com/librecores/librecores-pipeline-lib ● Add support for email notifications from the instance ● Parsing and visualizing test reports for mor1kx. ( Jenkins plugins ) ● Add a fusesoc configuration option to Librecores pipeline library for automatic configuration of fusesoc based projects. ○ A project can simply call `lcci.fusesoc()` in its Jenkinsfile and the fusesoc based projects will be automatically configured.

Slide 9

Slide 9 text

mor1kx (openrisc project ) pipeline or1k-marocchino (openrisc project) pipeline Achieved : Multiple pipelines in OpenRISC Projects

Slide 10

Slide 10 text

● Yosys is a framework for Verilog RTL synthesis. ● Fusesoc : The icestorm backend uses yosys to handle synthesis, arachne-pnr for place & route and icepack for creating the bitstream ● Command used in mor1kx to only run synthesis in the icestorm backend by setting pnr to none : ○ fusesoc run --target=tinyfpga_bx mor1k --pnr=none Yosys Synthesis

Slide 11

Slide 11 text

Modifying mor1kx.core : fusesoc (icestorm tool build) tinyfpga_bx: default_tool : icestorm filesets : [core, tinyfpga_bx] tools: icestorm: nextpnr_options : [--lp8k, --pcf-allow-unconstrained, --package, cm81, --freq, 32] pnr: next toplevel : mor1kx

Slide 12

Slide 12 text

yosys.log in mor1kx

Slide 13

Slide 13 text

Quick Start fusesoc library add mor1kx ../mor1kxg fusesoc run --target=tinyfpga_bx mor1kx --pnr=none ./extract_stats.py < build/mor1kx_5.0-r3/tinyfpga_bx-icestorm/yosys.log Result ( After extracting printing statistics from log file ) mor1kx git:(yosys-ci) ✗ ./extract_stats.py < build/mor1kx_5.0-r3/tinyfpga_bx-icestorm/yosys.log [('wires', '5578'), ('memories', '0'), ('processes', '0'), ('cells', '7310')] [('SB_CARRY', '426'), ('SB_DFF', '166'), ('SB_DFFE', '885'), ('SB_DFFESR', '569'), ('SB_DFFESS', '13'), ('SB_DFFSR', '56'), ('SB_DFFSS', '2'), ('SB_LUT4', '5182'), ('SB_RAM40_4K', '11')] WIP : Use the result generated to display graphs for test results / synthesis with Jenkins plugins

Slide 14

Slide 14 text

WIP : Parsing and visualizing test reports for mor1kx Tap Plugin : To be used for test results of openrisc projects Performance Plugin : To be used for for synthesis and PnR metrics (e.g. used LUTs)

Slide 15

Slide 15 text

Discussions : ● Chat : ○ https://gitter.im/librecores/librecores-ci ● Mailing List : ○ [email protected][email protected] Github : hw Blog Posts : http://nancychauhan.in/stories/2019/06/08/gsoc-week1_2/ http://nancychauhan.in/stories/2019/06/28/gsoc-week3_4/ Some Useful Links

Slide 16

Slide 16 text

A big thanks to my mentors Oleg Nenashev, Stafford Horne, Stefan Wallentowitz and fossi foundation !