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

Generating resources.rst from Google Spreadsheet #255

Open
wants to merge 13 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
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
glossary

contributing
resources
partners


Expand Down
111 changes: 111 additions & 0 deletions docs/resources.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
Further Resources
=================


News Articles
-------------

* `Open Source Process Design Kit from Google, SkyWater Technologies and Partners Released <https://ef.link/GUAxX>`__
* `Free chips courtesy of Google, SkyWater, eFabless <https://ef.link/yML5f>`__
* `Design an Open-Source SoC with Google SkyWater PDK, Get It Manufactured for Free <https://ef.link/JOlP9>`__
* `CREATING A CUSTOM ASIC WITH THE FIRST OPEN SOURCE PDK <https://ef.link/SbTsr>`__
* `Google, SkyWater Release Production Dev Kit, Offer Open Hardware Projects Free 130nm Manufacturing <https://ef.link/78ajq>`__
* `Produce your own physical chips. For free. In the Open. <https://ef.link/VlLNt>`__


Conferences
-----------

ICCAD 2020
~~~~~~~~~~

**Conference Dates:** 2nd November 2020 to 5th November 2020

* `https://iccad.com/event_details?id=305-8-D <https://iccad.com/event_details?id=305-8-D>`__

WOSET 2020
~~~~~~~~~~

* `https://woset-workshop.github.io/WOSET2020.html <https://woset-workshop.github.io/WOSET2020.html>`__
* `https://woset-workshop.github.io/PDFs/2020/a03.pdf <https://woset-workshop.github.io/PDFs/2020/a03.pdf>`__
* `https://woset-workshop.github.io/PDFs/2020/a04.pdf <https://woset-workshop.github.io/PDFs/2020/a04.pdf>`__
* `https://woset-workshop.github.io/PDFs/2020/a23.pdf <https://woset-workshop.github.io/PDFs/2020/a23.pdf>`__
* `https://woset-workshop.github.io/PDFs/2020/a21.pdf <https://woset-workshop.github.io/PDFs/2020/a21.pdf>`__

VLSI SoC Conference 2020
~~~~~~~~~~~~~~~~~~~~~~~~

* `https://ef.link/KLO5s <https://ef.link/KLO5s>`__


Talk Series
-----------

FOSSi Foundation Dialup Talk Series
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Free and Open Source Silicon and EDA tools. It features selected speakers from the rapidly developing FOSSi ecosystem.

**Page**: https://fossi-foundation.org/dial-up/

Fully open source manufacturable PDK for a 130nm process
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Presenter**: Tim Ansell
**Details**: Google Kick-off Presentation of Open Source Foundry
**Video**: `[FOSSi Dial-Up] Tim Ansell - Skywater PDK: Fully open source manufacturable PDK for a 130nm process <https://youtu.be/EczW2IWdnOM>`__
**Video**: `Open Source manufacturable PDK for Skywater 130nm process node (Google slides) <https://j.mp/du20-sky130>`__

The striVe RISC-V SoC Family on SkyWater 130nm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Presenter**: Mohamed Kassem
**Video**: `[FOSSi Dial-Up] Mohamed Kassem - The striVe RISC-V SoC Family on SkyWater 130nm <https://youtu.be/HvWveK2fZt0>`__
**Video**: `The striVe RISC-V SoC Family on Skywater 130nm (PPTX) <https://ef.link/fossi-pptx>`__
**Video**: `The striVe RISC-V SoC Family on Skywater 130nm (PDF) <https://ef.link/fossi-pdf>`__

OpenLane, A Digital ASIC Flow for SkyWater 130nm Open PDK
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Presenter**: Mohamed Shalan
**Video**: `[FOSSi Dial-Up] Mohamed Shalan - OpenLane, A Digital ASIC Flow for SkyWater 130nm Open PDK <https://youtu.be/Vhyv0eq_mLU>`__
**Video**: `OpenLane, A Digital ASIC Flow for Skywater 130nm Open PDK <https://ef.link/cygME>`__

Designing new 130nm cells for SkyWater 130nm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Presenter**: James Stine
**Video**: `[FOSSi Dial-Up] James Stine - Designing new 130nm cells for SkyWater 130nm <https://youtu.be/Svus4uQ_CAA>`__
**Video**: `Engineering System on Chip (SoC) Flows for SkyWater 130nm Open PDK <https://ef.link/uUArY>`__

OpenRAM on SkyWater 130nm
^^^^^^^^^^^^^^^^^^^^^^^^^

**Presenter**: Matt Guthaus
**Video**: `[FOSSi Dial-Up] Matt Guthaus - OpenRAM on SkyWater 130nm <https://youtu.be/9Lw83kFtnc4>`__
**Video**: `OpenRAM on SkyWater 130nm <https://ef.link/edstV>`__

The Amp Hour Podcast
~~~~~~~~~~~~~~~~~~~~

Fabless Chip Design with Mohamed Kassem
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Presenter**: Mohamed Kassem
**Video**: `#503 – Fabless Chip Design with Mohamed Kassem <https://ef.link/amp-hour>`__


LinkedIn Posts
--------------

* `Mohamed Kassem <https://www.linkedin.com/in/mkkassem/detail/recent-activity/shares/>`__
* `Mike Wishart <https://www.linkedin.com/in/mike-wishart-81480612/detail/recent-activity/shares/>`__
* `Efabless Corporation <https://www.linkedin.com/company/efabless-com>`__


Courses
-------

* `VLSI Systems Design course main page <https://inst.eecs.berkeley.edu/~cs250/fa20/>`__
* `Lab - Intro to OpenLane and Skywater 130 <https://inst.eecs.berkeley.edu/~cs250/fa20/labs/lab1/>`__

3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ flake8
# rst_include tool as GitHub doesn't support `.. include::` when rendering
# previews.
rst_include
pandas
Copy link
Contributor

Choose a reason for hiding this comment

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

pandas seems a rather heavy dependency here? As pandas is a binary dependency it should probably also be in the environment.yml?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I used pandas to simplify accessing row fields. If pandas is too heavy I can replace it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I put pandas in requirements.txt in case someone would like to install the required pip packages for skywater-pdk without using conda environment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I also used pandas to read Google spreadsheet files directly from URL

odfpy
Jinja2

# The Python API for the SkyWater PDK.
-e scripts/python-skywater-pdk
4 changes: 4 additions & 0 deletions scripts/python-skywater-pdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,8 @@
'Bug Reports': 'https://github.com/google/skywater-pdk/issues',
'Source': 'https://github.com/google/skywater-pdk/',
},

package_data = {
'skywater_pdk': ['templates/resources.template.rst'],
},
)
112 changes: 112 additions & 0 deletions scripts/python-skywater-pdk/skywater_pdk/generate_resources_rst.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 SkyWater PDK Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

import sys
import os
import argparse
from pathlib import Path
import pandas as pd
import errno
from jinja2 import Template
import importlib.resources as resources

sys.path.insert(0, os.path.abspath(__file__ + '/../../'))

from skywater_pdk import templates


def parse_entries(filepath, sheet_name, cols=None):
"""
Loads resources from spreadsheet to pandas frames.

Parameters
----------
filepath:
path or URL to spreadsheet file (ODS requires odfpy package, XLSX
requires xlrd package)
sheet_name: name of the sheet to extract data from
cols: range of columns to extract from the sheet
"""
values = pd.read_excel(
filepath,
sheet_name=sheet_name,
header=0,
usecols=cols
)
values = values.where(values.notnull(), None)
return values


def main(argv):
parser = argparse.ArgumentParser(prog=argv[0])
parser.add_argument(
'output',
help='The path to output RST file',
type=Path
)
parser.add_argument(
'--spreadsheet-file',
help='The path to input spreadsheet file',
type=Path
)
parser.add_argument(
'--google-spreadsheet-id',
help='Google Spreadsheet ID of the document to process',
action='store_true'
)

args = parser.parse_args(argv[1:])

input_file = None
if args.spreadsheet_file:
input_file = args.spreadsheet_file
if args.google_spreadsheet_id:
input_file = f'https://docs.google.com/spreadsheets/d/{args.google_spreadsheet_id}/export?format=ods' # noqa: E501

if input_file is None:
print('Input file is not provided')
return errno.ENOENT

news_articles = parse_entries(input_file, 'News Articles')
talk_series = parse_entries(input_file, 'Talk Series')
conferences = parse_entries(input_file, 'Conferences')
linkedin = parse_entries(input_file, 'LinkedIn Posts')
courses = parse_entries(input_file, 'Courses')

with resources.path(templates, 'resources.template.rst') as resourcepath:
with open(resourcepath, 'r') as resourcetemplate:
resources_rst_template = resourcetemplate.read()

tm = Template(resources_rst_template)
resources_rst_content = tm.render(
news_articles=news_articles,
talk_series=talk_series,
conferences=conferences,
linkedin=linkedin,
courses=courses
)

with open(args.output, 'w') as out:
out.write(resources_rst_content)

return 0


if __name__ == '__main__':
sys.exit(main(sys.argv))
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
Further Resources
=================


News Articles
-------------

{% for _, row in news_articles.iterrows() -%}
* `{{ row["Article"] }} <{{ row["Link"] }}>`__
{% endfor %}

Conferences
-----------
{% for _, row in conferences.iterrows() -%}

{% if row["Conference"] %}
{{ row["Conference"] }}
{{ '~' * row["Conference"]|length }}

{% endif -%}
{% if row["Description"] -%}
{{ row["Description"] }}

{% endif -%}
{% if row["Related link"] -%}
* `{{ row["Related link"] }} <{{ row["Related link"] }}>`__
{% endif -%}
{% endfor %}

Talk Series
-----------
{% for _, row in talk_series.iterrows() -%}
{% if row["Talk series"] %}
{{ row["Talk series"] }}
{{ '~' * row["Talk series"]|length }}
{% if row["Description"] %}
{{ row["Description"] }}
{% endif -%}
{% if row["Page"] %}
**Page**: {{ row["Page"] }}
{% endif -%}
{% endif %}
{{ row["Title"] }}
{{ '^' * row["Title"]|length }}

{% if row["Presenter"] -%}
**Presenter**: {{ row["Presenter"] }}
{% endif -%}
{% if row["Talk details"] -%}
**Details**: {{ row["Talk details"] }}
{% endif -%}
{% if row["Video link"] -%}
{% if row["Video"] -%}
**Video**: `{{ row["Video"] }} <{{ row["Video link"] }}>`__
{% else -%}
**Video**: `{{ row["Video link"] }} <{{ row["Video link"] }}>`__
{% endif -%}
{% endif -%}
{% if row["Slides PPTX link"] -%}
{% if row["Slides PPTX"] -%}
**Video**: `{{ row["Slides PPTX"] }} <{{ row["Slides PPTX link"] }}>`__
{% else -%}
**Video**: `{{ row["Slides PPTX link"] }} <{{ row["Slides PPTX link"] }}>`__
{% endif -%}
{% endif -%}
{% if row["Slides PDF link"] -%}
{% if row["Slides PDF"] -%}
**Video**: `{{ row["Slides PDF"] }} <{{ row["Slides PDF link"] }}>`__
{% else -%}
**Video**: `{{ row["Slides PDF link"] }} <{{ row["Slides PDF link"] }}>`__
{% endif -%}
{% endif -%}
{% endfor %}

LinkedIn Posts
--------------

{% for _, row in linkedin.iterrows() -%}
* `{{ row["Title"] }} <{{ row["Link"] }}>`__
{% endfor %}

Courses
-------

{% for _, row in courses.iterrows() -%}
{% if row["Courses"] %}
{{ row["Courses"] }}
{{ '~' * row["Courses"]|length }}
{% endif -%}
{% if row["Link"] -%}
{% if row["Link title"] -%}
* `{{ row["Link title"] }} <{{ row["Link"] }}>`__
{% else -%}
* `{{ row["Link"] }} <{{ row["Link"] }}>`__
{% endif -%}
{% endif -%}
{% endfor %}