ciel 0.21.0.dev0__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ciel-0.21.0.dev0 → ciel-1.0.0}/PKG-INFO +44 -39
- {ciel-0.21.0.dev0 → ciel-1.0.0}/Readme.md +38 -34
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/__init__.py +1 -1
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/__main__.py +37 -98
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/build/__init__.py +12 -11
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/build/common.py +2 -2
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/build/gf180mcu.py +2 -4
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/build/ihp_sg13g2.py +2 -2
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/build/sky130.py +2 -2
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/click_common.py +8 -29
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/common.py +12 -76
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/github.py +35 -31
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/manage.py +26 -27
- ciel-1.0.0/ciel/source.py +229 -0
- {ciel-0.21.0.dev0 → ciel-1.0.0}/pyproject.toml +7 -4
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/__version__.py +0 -0
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/build/git_multi_clone.py +0 -0
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/families.py +0 -0
- {ciel-0.21.0.dev0 → ciel-1.0.0}/ciel/py.typed +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: ciel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: An PDK builder/version manager for PDKs in the open_pdks format
|
|
5
|
+
Home-page: https://github.com/fossi-foundation/ciel
|
|
5
6
|
License: Apache-2.0
|
|
6
|
-
Author:
|
|
7
|
-
Author-email: donn
|
|
7
|
+
Author: Mohamed Gaber
|
|
8
|
+
Author-email: me@donn.website
|
|
8
9
|
Requires-Python: >=3.8
|
|
9
10
|
Classifier: Intended Audience :: Developers
|
|
10
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -23,18 +24,18 @@ Requires-Dist: pcpp (>=1.2,<2)
|
|
|
23
24
|
Requires-Dist: pyyaml (>=5,<7)
|
|
24
25
|
Requires-Dist: rich (>=12,<14)
|
|
25
26
|
Requires-Dist: zstandard (>=0.19.0,<1)
|
|
26
|
-
Project-URL: Repository, https://github.com/
|
|
27
|
+
Project-URL: Repository, https://github.com/fossi-foundation/ciel
|
|
27
28
|
Description-Content-Type: text/markdown
|
|
28
29
|
|
|
29
|
-
<h1 align="center"
|
|
30
|
+
<h1 align="center">🌌 Ciel</h1>
|
|
30
31
|
<p align="center">
|
|
31
32
|
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache 2.0"/></a>
|
|
32
|
-
<img src="https://github.com/
|
|
33
|
-
<a href="https://
|
|
33
|
+
<img src="https://github.com/fossi-foundation/ciel/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI Status" />
|
|
34
|
+
<a href="https://fossi-chat.org"><img src="https://img.shields.io/badge/Community-FOSSi%20Chat-1bb378?logo=element" alt="Invite to the Skywater PDK Slack"/></a>
|
|
34
35
|
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style: Black"/></a>
|
|
35
36
|
</p>
|
|
36
37
|
|
|
37
|
-
<p align="center">
|
|
38
|
+
<p align="center">Ciel is a version manager (and builder) for builds of open-source process design kits (PDKs).</p>
|
|
38
39
|
|
|
39
40
|
# Requirements
|
|
40
41
|
* Python 3.8+ with PIP
|
|
@@ -65,33 +66,39 @@ sudo yum install -y python3 python3-pip
|
|
|
65
66
|
# Installation and Upgrades
|
|
66
67
|
```sh
|
|
67
68
|
# To install (or upgrade)
|
|
68
|
-
python3 -m pip install --user --upgrade --no-cache-dir
|
|
69
|
+
python3 -m pip install --user --upgrade --no-cache-dir ciel
|
|
69
70
|
|
|
70
71
|
# To verify it works
|
|
71
|
-
|
|
72
|
+
ciel --version
|
|
72
73
|
```
|
|
73
74
|
|
|
74
75
|
# About the builds
|
|
75
|
-
In its current inception,
|
|
76
|
-
|
|
77
|
-
|sky130|gf180mcu|
|
|
78
|
-
|
|
79
|
-
|sky130_fd_io|gf180mcu_fd_io|
|
|
80
|
-
|sky130_fd_pr|gf180mcu_fd_pr|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
In its current inception, ciel supports builds of **sky130** and **gf180mcu** PDKs using [Open_PDKs](https://github.com/efabless/open_pdks), including the following libraries:
|
|
77
|
+
|
|
78
|
+
|sky130|gf180mcu|ihp_sg13g2|
|
|
79
|
+
|-|-|-|
|
|
80
|
+
|sky130_fd_io|gf180mcu_fd_io|sg13g2_io|
|
|
81
|
+
|sky130_fd_pr|gf180mcu_fd_pr|sg13g2_pr|
|
|
82
|
+
|sky130_fd_pr_reram$|gf180mcu_fd_pr|sg13g2_pr|
|
|
83
|
+
|sky130_fd_sc_hd|gf180mcu_fd_sc_mcu7t5v0|sg13g2_stdcell|
|
|
84
|
+
|sky130_ml_xx_hd|gf180mcu_fd_sc_mcu9t5v0|-|
|
|
85
|
+
|sky130_fd_sc_hvl|gf180mcu_osu_sc_gp9t3v3|-|
|
|
86
|
+
|sky130_fd_sc_lp|gf180mcu_osu_sc_gp12t3v3|-|
|
|
87
|
+
|sky130_fd_sc_ls|-|-|
|
|
88
|
+
|sky130_fd_sc_ms|-|-|
|
|
89
|
+
|sky130_fd_sc_hs|-|-|
|
|
90
|
+
|sky130_sram_macros|gf180mcu_fd_ip_sram|sg13g2_sram|
|
|
91
|
+
|
|
92
|
+
Builds for sky130 and gf180mcu are identified by their [**open_pdks**](https://github.com/rtimothyedwards/open_pdks) commit hashes. Builds for ihp_sg13g2 are identified by their [**IHP-Open-PDK**](https://github.com/ihp-gmbh/ihp-open-pdk) commit hashes.
|
|
86
93
|
|
|
87
94
|
# Usage
|
|
88
|
-
|
|
95
|
+
Ciel requires a so-called **PDK Root**. This PDK root can be anywhere on your computer, but by default it's the folder `~/.ciel` in your home directory. If you have the variable `PDK_ROOT` set, ciel will use that instead. You can also manually override both values by supplying the `--pdk-root` commandline argument.
|
|
89
96
|
|
|
90
97
|
## Listing All Available PDKs
|
|
91
|
-
To list all available pre-built PDKs hosted in this repository, you can just invoke `
|
|
98
|
+
To list all available pre-built PDKs hosted in this repository, you can just invoke `ciel ls-remote --pdk <PDK>`. If you omit the `--pdk` argument, `sky130` will be used as a default.
|
|
92
99
|
|
|
93
100
|
```sh
|
|
94
|
-
$
|
|
101
|
+
$ ciel ls-remote --pdk sky130
|
|
95
102
|
Pre-built sky130 PDK versions
|
|
96
103
|
├── 44a43c23c81b45b8e774ae7a84899a5a778b6b0b (2022.08.16) (enabled)
|
|
97
104
|
├── e8294524e5f67c533c5d0c3afa0bcc5b2a5fa066 (2022.07.29) (installed)
|
|
@@ -101,19 +108,19 @@ Pre-built sky130 PDK versions
|
|
|
101
108
|
├── 8fe7f760ece2bb49b1c310e60243f0558977dae5 (2022.04.06)
|
|
102
109
|
└── 7519dfb04400f224f140749cda44ee7de6f5e095 (2022.02.10)
|
|
103
110
|
|
|
104
|
-
$
|
|
111
|
+
$ ciel ls-remote --pdk gf180mcu
|
|
105
112
|
Pre-built gf180mcu PDK versions
|
|
106
113
|
└── 120b0bd69c745825a0b8b76f364043a1cd08bb6a (2022.09.22)
|
|
107
114
|
```
|
|
108
115
|
|
|
109
|
-
It includes a
|
|
116
|
+
It includes a hash of the commit of the relevant repo used for that particular build, the date that this commit was created, and whether you already installed this PDK and/or if it is the currently enabled PDK.
|
|
110
117
|
|
|
111
118
|
## Listing Installed PDKs
|
|
112
|
-
Typing `
|
|
119
|
+
Typing `ciel ls --pdk <pdk>` in the terminal shows you your PDK Root and the PDKs you currently have installed. Again, if you omit the `--pdk` argument, `sky130` will be used as a default.
|
|
113
120
|
|
|
114
121
|
```sh
|
|
115
|
-
$
|
|
116
|
-
/home/test/
|
|
122
|
+
$ ciel ls --pdk sky130
|
|
123
|
+
/home/test/ciel/sky130/versions
|
|
117
124
|
├── 44a43c23c81b45b8e774ae7a84899a5a778b6b0b (2022.08.16) (enabled)
|
|
118
125
|
├── e8294524e5f67c533c5d0c3afa0bcc5b2a5fa066 (2022.07.29)
|
|
119
126
|
└── 41c0908b47130d5675ff8484255b43f66463a7d6 (2022.04.14)
|
|
@@ -123,31 +130,29 @@ $ cielo ls --pdk sky130
|
|
|
123
130
|
|
|
124
131
|
|
|
125
132
|
## Downloading and Enabling PDKs
|
|
126
|
-
You can enable a particular sky130 PDK by invoking `
|
|
133
|
+
You can enable a particular sky130 PDK by invoking `ciel enable --pdk <pdk> <open_pdks commit hash>`. This will automatically download that particular version of the PDK, if found, and set it as your currently used PDK.
|
|
127
134
|
|
|
128
|
-
For example, to activate a build of sky130 using open_pdks `7519dfb04400f224f140749cda44ee7de6f5e095`, you invoke `
|
|
135
|
+
For example, to activate a build of sky130 using open_pdks `7519dfb04400f224f140749cda44ee7de6f5e095`, you invoke `ciel enable --pdk sky130 7519dfb04400f224f140749cda44ee7de6f5e095`, as shown below:
|
|
129
136
|
|
|
130
137
|
```sh
|
|
131
|
-
$
|
|
138
|
+
$ ciel enable --pdk sky130 7519dfb04400f224f140749cda44ee7de6f5e095
|
|
132
139
|
Downloading pre-built tarball for 7519dfb04400f224f140749cda44ee7de6f5e095… ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
|
|
133
140
|
Unpacking… ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
|
|
134
141
|
PDK version 7519dfb04400f224f140749cda44ee7de6f5e095 enabled.
|
|
135
142
|
```
|
|
136
143
|
|
|
137
|
-
What's more is: if you're using a repository with a `tool_metadata.yml` file, such as [OpenLane](https://github.com/The-OpenROAD-Project/OpenLane) or [DFFRAM](https://github.com/Cloud-V/DFFRAM), you can just invoke `cielo enable --pdk sky130` without the commit hash and Cielo will automatically extract the version required by the utility. Once again, if you omit the `--pdk` argument, `sky130` will be used as a default.
|
|
138
|
-
|
|
139
144
|
## Building PDKs
|
|
140
|
-
For special cases, you may have to build the PDK yourself, which
|
|
145
|
+
For special cases, you may have to build the PDK yourself, which Ciel does support.
|
|
141
146
|
|
|
142
|
-
You'll need Magic installed and in PATH. You can either do that manually or, if you have [Nix](https://nixos.org), invoke `nix shell github:
|
|
147
|
+
You'll need Magic installed and in PATH. You can either do that manually or, if you have [Nix](https://nixos.org), invoke `nix shell github:fossi-foundation/nix-eda#magic` before building.
|
|
143
148
|
|
|
144
|
-
You can invoke `
|
|
149
|
+
You can invoke `ciel build --help` for more options. Be aware, the built PDK won't automatically be enabled and you'll have to `ciel enable` the appropriate version.
|
|
145
150
|
|
|
146
151
|
# License
|
|
147
152
|
The Apache License, version 2.0. See 'License'.
|
|
148
153
|
|
|
149
154
|
|
|
150
|
-
|
|
155
|
+
Ciel is based on [Volare](https://github.com/efabless/volare) by Efabless
|
|
151
156
|
Corporation:
|
|
152
157
|
|
|
153
158
|
```
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<h1 align="center"
|
|
1
|
+
<h1 align="center">🌌 Ciel</h1>
|
|
2
2
|
<p align="center">
|
|
3
3
|
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache 2.0"/></a>
|
|
4
|
-
<img src="https://github.com/
|
|
5
|
-
<a href="https://
|
|
4
|
+
<img src="https://github.com/fossi-foundation/ciel/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI Status" />
|
|
5
|
+
<a href="https://fossi-chat.org"><img src="https://img.shields.io/badge/Community-FOSSi%20Chat-1bb378?logo=element" alt="Invite to the Skywater PDK Slack"/></a>
|
|
6
6
|
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style: Black"/></a>
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
-
<p align="center">
|
|
9
|
+
<p align="center">Ciel is a version manager (and builder) for builds of open-source process design kits (PDKs).</p>
|
|
10
10
|
|
|
11
11
|
# Requirements
|
|
12
12
|
* Python 3.8+ with PIP
|
|
@@ -37,33 +37,39 @@ sudo yum install -y python3 python3-pip
|
|
|
37
37
|
# Installation and Upgrades
|
|
38
38
|
```sh
|
|
39
39
|
# To install (or upgrade)
|
|
40
|
-
python3 -m pip install --user --upgrade --no-cache-dir
|
|
40
|
+
python3 -m pip install --user --upgrade --no-cache-dir ciel
|
|
41
41
|
|
|
42
42
|
# To verify it works
|
|
43
|
-
|
|
43
|
+
ciel --version
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
# About the builds
|
|
47
|
-
In its current inception,
|
|
48
|
-
|
|
49
|
-
|sky130|gf180mcu|
|
|
50
|
-
|
|
51
|
-
|sky130_fd_io|gf180mcu_fd_io|
|
|
52
|
-
|sky130_fd_pr|gf180mcu_fd_pr|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
In its current inception, ciel supports builds of **sky130** and **gf180mcu** PDKs using [Open_PDKs](https://github.com/efabless/open_pdks), including the following libraries:
|
|
48
|
+
|
|
49
|
+
|sky130|gf180mcu|ihp_sg13g2|
|
|
50
|
+
|-|-|-|
|
|
51
|
+
|sky130_fd_io|gf180mcu_fd_io|sg13g2_io|
|
|
52
|
+
|sky130_fd_pr|gf180mcu_fd_pr|sg13g2_pr|
|
|
53
|
+
|sky130_fd_pr_reram$|gf180mcu_fd_pr|sg13g2_pr|
|
|
54
|
+
|sky130_fd_sc_hd|gf180mcu_fd_sc_mcu7t5v0|sg13g2_stdcell|
|
|
55
|
+
|sky130_ml_xx_hd|gf180mcu_fd_sc_mcu9t5v0|-|
|
|
56
|
+
|sky130_fd_sc_hvl|gf180mcu_osu_sc_gp9t3v3|-|
|
|
57
|
+
|sky130_fd_sc_lp|gf180mcu_osu_sc_gp12t3v3|-|
|
|
58
|
+
|sky130_fd_sc_ls|-|-|
|
|
59
|
+
|sky130_fd_sc_ms|-|-|
|
|
60
|
+
|sky130_fd_sc_hs|-|-|
|
|
61
|
+
|sky130_sram_macros|gf180mcu_fd_ip_sram|sg13g2_sram|
|
|
62
|
+
|
|
63
|
+
Builds for sky130 and gf180mcu are identified by their [**open_pdks**](https://github.com/rtimothyedwards/open_pdks) commit hashes. Builds for ihp_sg13g2 are identified by their [**IHP-Open-PDK**](https://github.com/ihp-gmbh/ihp-open-pdk) commit hashes.
|
|
58
64
|
|
|
59
65
|
# Usage
|
|
60
|
-
|
|
66
|
+
Ciel requires a so-called **PDK Root**. This PDK root can be anywhere on your computer, but by default it's the folder `~/.ciel` in your home directory. If you have the variable `PDK_ROOT` set, ciel will use that instead. You can also manually override both values by supplying the `--pdk-root` commandline argument.
|
|
61
67
|
|
|
62
68
|
## Listing All Available PDKs
|
|
63
|
-
To list all available pre-built PDKs hosted in this repository, you can just invoke `
|
|
69
|
+
To list all available pre-built PDKs hosted in this repository, you can just invoke `ciel ls-remote --pdk <PDK>`. If you omit the `--pdk` argument, `sky130` will be used as a default.
|
|
64
70
|
|
|
65
71
|
```sh
|
|
66
|
-
$
|
|
72
|
+
$ ciel ls-remote --pdk sky130
|
|
67
73
|
Pre-built sky130 PDK versions
|
|
68
74
|
├── 44a43c23c81b45b8e774ae7a84899a5a778b6b0b (2022.08.16) (enabled)
|
|
69
75
|
├── e8294524e5f67c533c5d0c3afa0bcc5b2a5fa066 (2022.07.29) (installed)
|
|
@@ -73,19 +79,19 @@ Pre-built sky130 PDK versions
|
|
|
73
79
|
├── 8fe7f760ece2bb49b1c310e60243f0558977dae5 (2022.04.06)
|
|
74
80
|
└── 7519dfb04400f224f140749cda44ee7de6f5e095 (2022.02.10)
|
|
75
81
|
|
|
76
|
-
$
|
|
82
|
+
$ ciel ls-remote --pdk gf180mcu
|
|
77
83
|
Pre-built gf180mcu PDK versions
|
|
78
84
|
└── 120b0bd69c745825a0b8b76f364043a1cd08bb6a (2022.09.22)
|
|
79
85
|
```
|
|
80
86
|
|
|
81
|
-
It includes a
|
|
87
|
+
It includes a hash of the commit of the relevant repo used for that particular build, the date that this commit was created, and whether you already installed this PDK and/or if it is the currently enabled PDK.
|
|
82
88
|
|
|
83
89
|
## Listing Installed PDKs
|
|
84
|
-
Typing `
|
|
90
|
+
Typing `ciel ls --pdk <pdk>` in the terminal shows you your PDK Root and the PDKs you currently have installed. Again, if you omit the `--pdk` argument, `sky130` will be used as a default.
|
|
85
91
|
|
|
86
92
|
```sh
|
|
87
|
-
$
|
|
88
|
-
/home/test/
|
|
93
|
+
$ ciel ls --pdk sky130
|
|
94
|
+
/home/test/ciel/sky130/versions
|
|
89
95
|
├── 44a43c23c81b45b8e774ae7a84899a5a778b6b0b (2022.08.16) (enabled)
|
|
90
96
|
├── e8294524e5f67c533c5d0c3afa0bcc5b2a5fa066 (2022.07.29)
|
|
91
97
|
└── 41c0908b47130d5675ff8484255b43f66463a7d6 (2022.04.14)
|
|
@@ -95,31 +101,29 @@ $ cielo ls --pdk sky130
|
|
|
95
101
|
|
|
96
102
|
|
|
97
103
|
## Downloading and Enabling PDKs
|
|
98
|
-
You can enable a particular sky130 PDK by invoking `
|
|
104
|
+
You can enable a particular sky130 PDK by invoking `ciel enable --pdk <pdk> <open_pdks commit hash>`. This will automatically download that particular version of the PDK, if found, and set it as your currently used PDK.
|
|
99
105
|
|
|
100
|
-
For example, to activate a build of sky130 using open_pdks `7519dfb04400f224f140749cda44ee7de6f5e095`, you invoke `
|
|
106
|
+
For example, to activate a build of sky130 using open_pdks `7519dfb04400f224f140749cda44ee7de6f5e095`, you invoke `ciel enable --pdk sky130 7519dfb04400f224f140749cda44ee7de6f5e095`, as shown below:
|
|
101
107
|
|
|
102
108
|
```sh
|
|
103
|
-
$
|
|
109
|
+
$ ciel enable --pdk sky130 7519dfb04400f224f140749cda44ee7de6f5e095
|
|
104
110
|
Downloading pre-built tarball for 7519dfb04400f224f140749cda44ee7de6f5e095… ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
|
|
105
111
|
Unpacking… ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
|
|
106
112
|
PDK version 7519dfb04400f224f140749cda44ee7de6f5e095 enabled.
|
|
107
113
|
```
|
|
108
114
|
|
|
109
|
-
What's more is: if you're using a repository with a `tool_metadata.yml` file, such as [OpenLane](https://github.com/The-OpenROAD-Project/OpenLane) or [DFFRAM](https://github.com/Cloud-V/DFFRAM), you can just invoke `cielo enable --pdk sky130` without the commit hash and Cielo will automatically extract the version required by the utility. Once again, if you omit the `--pdk` argument, `sky130` will be used as a default.
|
|
110
|
-
|
|
111
115
|
## Building PDKs
|
|
112
|
-
For special cases, you may have to build the PDK yourself, which
|
|
116
|
+
For special cases, you may have to build the PDK yourself, which Ciel does support.
|
|
113
117
|
|
|
114
|
-
You'll need Magic installed and in PATH. You can either do that manually or, if you have [Nix](https://nixos.org), invoke `nix shell github:
|
|
118
|
+
You'll need Magic installed and in PATH. You can either do that manually or, if you have [Nix](https://nixos.org), invoke `nix shell github:fossi-foundation/nix-eda#magic` before building.
|
|
115
119
|
|
|
116
|
-
You can invoke `
|
|
120
|
+
You can invoke `ciel build --help` for more options. Be aware, the built PDK won't automatically be enabled and you'll have to `ciel enable` the appropriate version.
|
|
117
121
|
|
|
118
122
|
# License
|
|
119
123
|
The Apache License, version 2.0. See 'License'.
|
|
120
124
|
|
|
121
125
|
|
|
122
|
-
|
|
126
|
+
Ciel is based on [Volare](https://github.com/efabless/volare) by Efabless
|
|
123
127
|
Corporation:
|
|
124
128
|
|
|
125
129
|
```
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Copyright 2025 The American University in Cairo
|
|
2
|
+
#
|
|
3
|
+
# Adapted from the Volare project
|
|
4
|
+
#
|
|
1
5
|
# Copyright 2022-2023 Efabless Corporation
|
|
2
6
|
#
|
|
3
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -21,15 +25,11 @@ from rich.console import Console
|
|
|
21
25
|
from .__version__ import __version__
|
|
22
26
|
from .common import (
|
|
23
27
|
Version,
|
|
24
|
-
|
|
28
|
+
get_ciel_home,
|
|
25
29
|
resolve_version,
|
|
26
30
|
)
|
|
27
31
|
from .click_common import (
|
|
28
|
-
opt,
|
|
29
|
-
opt_build,
|
|
30
|
-
opt_push,
|
|
31
32
|
opt_pdk_root,
|
|
32
|
-
opt_token,
|
|
33
33
|
)
|
|
34
34
|
from .manage import (
|
|
35
35
|
print_installed_list,
|
|
@@ -41,6 +41,8 @@ from .build import (
|
|
|
41
41
|
build_cmd,
|
|
42
42
|
push_cmd,
|
|
43
43
|
)
|
|
44
|
+
from .github import opt_github_token
|
|
45
|
+
from .source import opt_data_source
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
@click.command("output")
|
|
@@ -57,15 +59,11 @@ def output_cmd(pdk_root, pdk):
|
|
|
57
59
|
if sys.stdout.isatty():
|
|
58
60
|
if version is None:
|
|
59
61
|
print(f"No version of the PDK {pdk} is currently enabled at {pdk_root}.")
|
|
60
|
-
print(
|
|
61
|
-
"Invoke cielo --help for assistance installing and enabling versions."
|
|
62
|
-
)
|
|
62
|
+
print("Invoke ciel --help for assistance installing and enabling versions.")
|
|
63
63
|
exit(1)
|
|
64
64
|
else:
|
|
65
65
|
print(f"Installed: {pdk} v{version.name}")
|
|
66
|
-
print(
|
|
67
|
-
"Invoke cielo --help for assistance installing and enabling versions."
|
|
68
|
-
)
|
|
66
|
+
print("Invoke ciel --help for assistance installing and enabling versions.")
|
|
69
67
|
else:
|
|
70
68
|
if version is None:
|
|
71
69
|
exit(1)
|
|
@@ -117,9 +115,10 @@ def rm_cmd(pdk_root, pdk, version):
|
|
|
117
115
|
|
|
118
116
|
|
|
119
117
|
@click.command("ls")
|
|
120
|
-
@
|
|
118
|
+
@opt_data_source
|
|
119
|
+
@opt_github_token
|
|
121
120
|
@opt_pdk_root
|
|
122
|
-
def list_cmd(pdk_root, pdk):
|
|
121
|
+
def list_cmd(data_source, pdk_root, pdk):
|
|
123
122
|
"""Lists PDK versions that are locally installed. JSON if not outputting to a tty."""
|
|
124
123
|
|
|
125
124
|
pdk_versions = Version.get_all_installed(pdk_root, pdk)
|
|
@@ -129,6 +128,7 @@ def list_cmd(pdk_root, pdk):
|
|
|
129
128
|
print_installed_list(
|
|
130
129
|
pdk_root,
|
|
131
130
|
pdk,
|
|
131
|
+
data_source=data_source,
|
|
132
132
|
console=console,
|
|
133
133
|
installed_list=pdk_versions,
|
|
134
134
|
)
|
|
@@ -137,14 +137,14 @@ def list_cmd(pdk_root, pdk):
|
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
@click.command("ls-remote")
|
|
140
|
-
@
|
|
140
|
+
@opt_github_token
|
|
141
|
+
@opt_data_source
|
|
141
142
|
@opt_pdk_root
|
|
142
|
-
def list_remote_cmd(pdk_root, pdk):
|
|
143
|
+
def list_remote_cmd(data_source, pdk_root, pdk):
|
|
143
144
|
"""Lists PDK versions that are remotely available. JSON if not outputting to a tty."""
|
|
144
145
|
|
|
145
146
|
try:
|
|
146
|
-
|
|
147
|
-
pdk_versions = all_versions.get(pdk) or []
|
|
147
|
+
pdk_versions = data_source.get_available_versions(pdk)
|
|
148
148
|
|
|
149
149
|
if sys.stdout.isatty():
|
|
150
150
|
console = Console()
|
|
@@ -152,6 +152,13 @@ def list_remote_cmd(pdk_root, pdk):
|
|
|
152
152
|
else:
|
|
153
153
|
for version in pdk_versions:
|
|
154
154
|
print(version.name)
|
|
155
|
+
except ValueError as e:
|
|
156
|
+
if sys.stdout.isatty():
|
|
157
|
+
console = Console()
|
|
158
|
+
console.print(f"[red]{e}")
|
|
159
|
+
else:
|
|
160
|
+
print(f"{e}", file=sys.stderr)
|
|
161
|
+
sys.exit(-1)
|
|
155
162
|
except httpx.HTTPStatusError as e:
|
|
156
163
|
if sys.stdout.isatty():
|
|
157
164
|
console = Console()
|
|
@@ -175,7 +182,7 @@ def list_remote_cmd(pdk_root, pdk):
|
|
|
175
182
|
@click.argument("version", required=False)
|
|
176
183
|
def path_cmd(pdk_root, pdk, version):
|
|
177
184
|
"""
|
|
178
|
-
Prints the path of the
|
|
185
|
+
Prints the path of the ciel PDK root.
|
|
179
186
|
|
|
180
187
|
If a version is provided over the commandline, it prints the path to this
|
|
181
188
|
version instead.
|
|
@@ -184,11 +191,12 @@ def path_cmd(pdk_root, pdk, version):
|
|
|
184
191
|
version = Version(version, pdk)
|
|
185
192
|
print(version.get_dir(pdk_root), end="")
|
|
186
193
|
else:
|
|
187
|
-
print(
|
|
194
|
+
print(get_ciel_home(pdk_root))
|
|
188
195
|
|
|
189
196
|
|
|
190
197
|
@click.command("enable")
|
|
191
|
-
@
|
|
198
|
+
@opt_data_source
|
|
199
|
+
@opt_github_token
|
|
192
200
|
@opt_pdk_root
|
|
193
201
|
@click.option(
|
|
194
202
|
"-f",
|
|
@@ -206,6 +214,7 @@ def path_cmd(pdk_root, pdk, version):
|
|
|
206
214
|
)
|
|
207
215
|
@click.argument("version", required=False)
|
|
208
216
|
def enable_cmd(
|
|
217
|
+
data_source,
|
|
209
218
|
pdk_root,
|
|
210
219
|
pdk,
|
|
211
220
|
tool_metadata_file_path,
|
|
@@ -238,6 +247,7 @@ def enable_cmd(
|
|
|
238
247
|
version,
|
|
239
248
|
include_libraries=include_libraries,
|
|
240
249
|
output=console,
|
|
250
|
+
data_source=data_source,
|
|
241
251
|
)
|
|
242
252
|
except Exception as e:
|
|
243
253
|
console.print(f"[red]{e}")
|
|
@@ -245,7 +255,8 @@ def enable_cmd(
|
|
|
245
255
|
|
|
246
256
|
|
|
247
257
|
@click.command("fetch")
|
|
248
|
-
@
|
|
258
|
+
@opt_data_source
|
|
259
|
+
@opt_github_token
|
|
249
260
|
@opt_pdk_root
|
|
250
261
|
@click.option(
|
|
251
262
|
"-f",
|
|
@@ -263,6 +274,7 @@ def enable_cmd(
|
|
|
263
274
|
)
|
|
264
275
|
@click.argument("version", required=False)
|
|
265
276
|
def fetch_cmd(
|
|
277
|
+
data_source,
|
|
266
278
|
pdk_root,
|
|
267
279
|
pdk,
|
|
268
280
|
tool_metadata_file_path,
|
|
@@ -270,7 +282,7 @@ def fetch_cmd(
|
|
|
270
282
|
include_libraries,
|
|
271
283
|
):
|
|
272
284
|
"""
|
|
273
|
-
Fetches a PDK to
|
|
285
|
+
Fetches a PDK to Ciel's store without setting it as the "enabled" version
|
|
274
286
|
in ``PDK_ROOT``.
|
|
275
287
|
|
|
276
288
|
Parameters: <version> (Optional)
|
|
@@ -291,6 +303,7 @@ def fetch_cmd(
|
|
|
291
303
|
|
|
292
304
|
try:
|
|
293
305
|
version = fetch(
|
|
306
|
+
data_source=data_source,
|
|
294
307
|
pdk_root=pdk_root,
|
|
295
308
|
pdk=pdk,
|
|
296
309
|
version=version,
|
|
@@ -304,83 +317,10 @@ def fetch_cmd(
|
|
|
304
317
|
exit(-1)
|
|
305
318
|
|
|
306
319
|
|
|
307
|
-
@click.command("enable_or_build", hidden=True)
|
|
308
|
-
@opt_token
|
|
309
|
-
@opt_pdk_root
|
|
310
|
-
@opt_push
|
|
311
|
-
@opt_build
|
|
312
|
-
@opt("--also-push/--dont-push", default=False, help="Also push.")
|
|
313
|
-
@click.option(
|
|
314
|
-
"-f",
|
|
315
|
-
"--metadata-file",
|
|
316
|
-
"tool_metadata_file_path",
|
|
317
|
-
default=None,
|
|
318
|
-
help="Explicitly define a tool metadata file instead of searching for a metadata file",
|
|
319
|
-
)
|
|
320
|
-
@click.argument("version")
|
|
321
|
-
def enable_or_build_cmd(
|
|
322
|
-
include_libraries,
|
|
323
|
-
jobs,
|
|
324
|
-
pdk_root,
|
|
325
|
-
pdk,
|
|
326
|
-
owner,
|
|
327
|
-
repository,
|
|
328
|
-
pre,
|
|
329
|
-
clear_build_artifacts,
|
|
330
|
-
tool_metadata_file_path,
|
|
331
|
-
also_push,
|
|
332
|
-
version,
|
|
333
|
-
use_repo_at,
|
|
334
|
-
push_libraries,
|
|
335
|
-
):
|
|
336
|
-
"""
|
|
337
|
-
Attempts to activate a given PDK version. If the version is not found locally or remotely,
|
|
338
|
-
it will instead attempt to build said version.
|
|
339
|
-
|
|
340
|
-
Parameters: <version>
|
|
341
|
-
"""
|
|
342
|
-
if include_libraries == ():
|
|
343
|
-
include_libraries = None
|
|
344
|
-
if push_libraries == ():
|
|
345
|
-
push_libraries = include_libraries
|
|
346
|
-
|
|
347
|
-
console = Console()
|
|
348
|
-
try:
|
|
349
|
-
version = resolve_version(version, tool_metadata_file_path)
|
|
350
|
-
except Exception as e:
|
|
351
|
-
console.print(f"Could not determine open_pdks version: {e}")
|
|
352
|
-
exit(-1)
|
|
353
|
-
try:
|
|
354
|
-
enable(
|
|
355
|
-
pdk_root=pdk_root,
|
|
356
|
-
pdk=pdk,
|
|
357
|
-
version=version,
|
|
358
|
-
build_if_not_found=True,
|
|
359
|
-
also_push=also_push,
|
|
360
|
-
build_kwargs={
|
|
361
|
-
"include_libraries": include_libraries,
|
|
362
|
-
"jobs": jobs,
|
|
363
|
-
"clear_build_artifacts": clear_build_artifacts,
|
|
364
|
-
"use_repo_at": use_repo_at,
|
|
365
|
-
},
|
|
366
|
-
push_kwargs={
|
|
367
|
-
"owner": owner,
|
|
368
|
-
"repository": repository,
|
|
369
|
-
"pre": pre,
|
|
370
|
-
"push_libraries": push_libraries,
|
|
371
|
-
},
|
|
372
|
-
include_libraries=include_libraries,
|
|
373
|
-
output=console,
|
|
374
|
-
)
|
|
375
|
-
except Exception as e:
|
|
376
|
-
console.print(f"[red]{e}")
|
|
377
|
-
exit(-1)
|
|
378
|
-
|
|
379
|
-
|
|
380
320
|
@click.group()
|
|
381
321
|
@click.version_option(
|
|
382
322
|
__version__,
|
|
383
|
-
message="""
|
|
323
|
+
message="""Ciel v%(version)s ©2022-2025 Efabless Corporation and Contributors
|
|
384
324
|
|
|
385
325
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
386
326
|
you may not use this program except in compliance with the License.
|
|
@@ -408,7 +348,6 @@ cli.add_command(list_cmd)
|
|
|
408
348
|
cli.add_command(list_remote_cmd)
|
|
409
349
|
cli.add_command(enable_cmd)
|
|
410
350
|
cli.add_command(fetch_cmd)
|
|
411
|
-
cli.add_command(enable_or_build_cmd)
|
|
412
351
|
|
|
413
352
|
try:
|
|
414
353
|
import ssl # noqa: F401
|
|
@@ -421,7 +360,7 @@ except ModuleNotFoundError as e:
|
|
|
421
360
|
"Please install Python 3 with all (optional) dependencies using your operating system's package manager.",
|
|
422
361
|
file=sys.stderr,
|
|
423
362
|
)
|
|
424
|
-
print("This is a fatal error.
|
|
363
|
+
print("This is a fatal error. Ciel will now quit.", file=sys.stderr)
|
|
425
364
|
exit(-1)
|
|
426
365
|
|
|
427
366
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Copyright 2025 The American University in Cairo
|
|
2
|
+
#
|
|
3
|
+
# Adapted from the Volare project
|
|
4
|
+
#
|
|
1
5
|
# Copyright 2022-2023 Efabless Corporation
|
|
2
6
|
#
|
|
3
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -28,7 +32,7 @@ from rich.progress import Progress
|
|
|
28
32
|
from ..github import (
|
|
29
33
|
GitHubSession,
|
|
30
34
|
get_commit_date,
|
|
31
|
-
|
|
35
|
+
opt_github_token,
|
|
32
36
|
)
|
|
33
37
|
from ..common import (
|
|
34
38
|
Version,
|
|
@@ -40,7 +44,6 @@ from ..click_common import (
|
|
|
40
44
|
opt_push,
|
|
41
45
|
opt_build,
|
|
42
46
|
opt_pdk_root,
|
|
43
|
-
opt_token,
|
|
44
47
|
)
|
|
45
48
|
from ..families import Family
|
|
46
49
|
|
|
@@ -79,7 +82,7 @@ def build(
|
|
|
79
82
|
|
|
80
83
|
|
|
81
84
|
@click.command("build")
|
|
82
|
-
@
|
|
85
|
+
@opt_github_token
|
|
83
86
|
@opt_pdk_root
|
|
84
87
|
@opt_build
|
|
85
88
|
@click.option(
|
|
@@ -135,16 +138,14 @@ def push(
|
|
|
135
138
|
pdk,
|
|
136
139
|
version,
|
|
137
140
|
*,
|
|
138
|
-
owner
|
|
139
|
-
repository
|
|
141
|
+
owner,
|
|
142
|
+
repository,
|
|
140
143
|
pre=False,
|
|
141
144
|
push_libraries=None,
|
|
142
|
-
session: Optional[GitHubSession] = None,
|
|
143
145
|
):
|
|
144
146
|
family = Family.by_name[pdk]
|
|
145
147
|
|
|
146
|
-
|
|
147
|
-
session = GitHubSession()
|
|
148
|
+
session = GitHubSession()
|
|
148
149
|
if session.github_token is None:
|
|
149
150
|
raise TypeError("No GitHub token was provided.")
|
|
150
151
|
|
|
@@ -160,7 +161,7 @@ def push(
|
|
|
160
161
|
raise FileNotFoundError(f"Version {version} not found.")
|
|
161
162
|
|
|
162
163
|
tempdir = tempfile.gettempdir()
|
|
163
|
-
tarball_directory = os.path.join(tempdir, "
|
|
164
|
+
tarball_directory = os.path.join(tempdir, "ciel", f"{uuid.uuid4()}", version)
|
|
164
165
|
mkdirp(tarball_directory)
|
|
165
166
|
|
|
166
167
|
final_tarballs = []
|
|
@@ -200,7 +201,7 @@ def push(
|
|
|
200
201
|
# If someone wants to rewrite this to not use ghr, please, by all means.
|
|
201
202
|
console.log("Starting upload…")
|
|
202
203
|
|
|
203
|
-
body = f"{pdk} variants built using
|
|
204
|
+
body = f"{pdk} variants built using ciel"
|
|
204
205
|
date = get_commit_date(version, family.repo, session)
|
|
205
206
|
if date is not None:
|
|
206
207
|
body = f"{pdk} variants (released on {date_to_iso8601(date)})"
|
|
@@ -231,7 +232,7 @@ def push(
|
|
|
231
232
|
|
|
232
233
|
|
|
233
234
|
@click.command("push", hidden=True)
|
|
234
|
-
@
|
|
235
|
+
@opt_github_token
|
|
235
236
|
@opt_pdk_root
|
|
236
237
|
@opt_push
|
|
237
238
|
@click.argument("version")
|