Compare commits

..

30 Commits
main ... main

Author SHA1 Message Date
Aquiles Viza
13461c39c6 Updated volare commit
All checks were successful
release / build-base (push) Successful in 4m59s
release / build-digital-heavy (push) Successful in 22m27s
release / build-digital-icarus (push) Successful in 22m39s
release / build-digital-ator (push) Successful in 22m42s
release / build-analog-xk (push) Successful in 24m17s
release / build-analog-xm (push) Successful in 25m8s
release / build-analog-heavy (push) Successful in 26m38s
release / build-heavy (push) Successful in 26m37s
release / build-chipathon-tools (push) Successful in 19m37s
2024-01-23 18:44:19 -03:00
Aquiles Viza
6885bf1076 Added wget into base dependencies
All checks were successful
release / build-digital-heavy (push) Successful in 22m41s
release / build-digital-icarus (push) Successful in 22m50s
release / build-analog-xk (push) Successful in 23m29s
release / build-analog-xm (push) Successful in 24m29s
release / build-analog-heavy (push) Successful in 25m20s
release / build-heavy (push) Successful in 25m45s
release / build-chipathon-tools (push) Successful in 19m21s
release / build-base (push) Successful in 4m56s
release / build-digital-ator (push) Successful in 22m41s
2023-12-24 00:37:57 -03:00
Aquiles Viza
455c759f08 Fixed install open pdks
Some checks failed
release / build-base (push) Successful in 6m56s
release / build-digital-icarus (push) Successful in 19m22s
release / build-digital-heavy (push) Successful in 20m46s
release / build-digital-ator (push) Successful in 20m51s
release / build-analog-xk (push) Successful in 22m26s
release / build-analog-xm (push) Successful in 22m48s
release / build-analog-heavy (push) Successful in 24m33s
release / build-heavy (push) Successful in 24m33s
release / build-chipathon-tools (push) Failing after 6m32s
2023-12-23 21:14:05 -03:00
Aquiles Viza
62fae6b2bd Fixed Dockerfile
Some checks failed
release / build-base (push) Successful in 8m7s
release / build-digital-ator (push) Successful in 17m57s
release / build-digital-icarus (push) Successful in 18m4s
release / build-digital-heavy (push) Successful in 18m7s
release / build-analog-xk (push) Successful in 20m35s
release / build-analog-xm (push) Successful in 20m39s
release / build-heavy (push) Successful in 21m26s
release / build-chipathon-tools (push) Failing after 4m2s
release / build-analog-heavy (push) Successful in 12m55s
2023-12-22 17:53:22 -03:00
Aquiles Viza
e9bba39379 Fixes in gf180mcu support for ngspice, xschem and klayout
Some checks failed
release / build-base (push) Successful in 10m6s
release / build-digital-ator (push) Successful in 24m11s
release / build-digital-heavy (push) Successful in 24m12s
release / build-digital-icarus (push) Successful in 24m21s
release / build-analog-xm (push) Successful in 25m19s
release / build-analog-xk (push) Successful in 28m14s
release / build-heavy (push) Successful in 28m27s
release / build-analog-heavy (push) Successful in 28m40s
release / build-chipathon-tools (push) Failing after 19s
2023-12-21 16:10:21 -03:00
Aquiles Viza
167797effe Updated gf180 patch
Some checks are pending
release / build-digital-icarus (push) Blocked by required conditions
release / build-digital-heavy (push) Blocked by required conditions
release / build-heavy (push) Blocked by required conditions
release / build-chipathon-tools (push) Blocked by required conditions
release / build-base (push) Waiting to run
release / build-analog-xk (push) Blocked by required conditions
release / build-analog-xm (push) Blocked by required conditions
release / build-analog-heavy (push) Blocked by required conditions
release / build-digital-ator (push) Blocked by required conditions
2023-12-21 04:03:17 -03:00
Aquiles Viza
2069040fe4 Fixed typo on chipathon .bashrc
All checks were successful
release / build-base (push) Successful in 4m31s
release / build-digital-icarus (push) Successful in 21m24s
release / build-digital-ator (push) Successful in 21m46s
release / build-digital-heavy (push) Successful in 21m56s
release / build-analog-xk (push) Successful in 22m31s
release / build-analog-xm (push) Successful in 23m2s
release / build-heavy (push) Successful in 26m17s
release / build-analog-heavy (push) Successful in 26m26s
release / build-chipathon-tools (push) Successful in 20m0s
2023-11-16 14:18:09 -03:00
Aquiles Viza
ffd56db136 Fixed distro problem on run ps1
All checks were successful
release / build-base (push) Successful in 4m32s
release / build-digital-heavy (push) Successful in 21m25s
release / build-digital-ator (push) Successful in 21m38s
release / build-digital-icarus (push) Successful in 22m5s
release / build-analog-xk (push) Successful in 22m44s
release / build-analog-xm (push) Successful in 26m20s
release / build-heavy (push) Successful in 26m31s
release / build-analog-heavy (push) Successful in 26m46s
release / build-chipathon-tools (push) Successful in 20m5s
2023-11-16 11:42:15 -03:00
Aquiles Viza
594b3b13c3 Added gdsfactory dependency
Some checks failed
release / build-base (push) Successful in 4m35s
release / build-analog-xm (push) Failing after 22s
release / build-digital-ator (push) Successful in 19m28s
release / build-digital-icarus (push) Successful in 19m26s
release / build-digital-heavy (push) Successful in 19m30s
release / build-analog-xk (push) Successful in 20m17s
release / build-analog-heavy (push) Successful in 21m34s
release / build-heavy (push) Successful in 22m30s
release / build-chipathon-tools (push) Successful in 19m11s
2023-11-15 12:35:53 -03:00
Aquiles Viza
b580b9d649 Fix chipathon-tools references to gf180mcuC version. Removed C variant
All checks were successful
release / build-base (push) Successful in 4m22s
release / build-digital-heavy (push) Successful in 21m22s
release / build-digital-ator (push) Successful in 21m42s
release / build-digital-icarus (push) Successful in 21m40s
release / build-analog-xk (push) Successful in 26m27s
release / build-analog-xm (push) Successful in 26m42s
release / build-heavy (push) Successful in 26m55s
release / build-analog-heavy (push) Successful in 27m9s
release / build-chipathon-tools (push) Successful in 16m4s
2023-11-15 10:50:55 -03:00
Aquiles Viza
3d589f60d2 Fix to fix: Download flag works
All checks were successful
release / build-base (push) Successful in 19m19s
release / build-analog-xk (push) Successful in 24m45s
release / build-digital-ator (push) Successful in 15m16s
release / build-digital-icarus (push) Successful in 15m22s
release / build-digital-heavy (push) Successful in 15m15s
release / build-analog-xm (push) Successful in 20m14s
release / build-analog-heavy (push) Successful in 23m5s
release / build-heavy (push) Successful in 21m42s
release / build-chipathon-tools (push) Successful in 20m38s
2023-11-14 16:35:53 -03:00
Aquiles Viza
1e5601bb33 Fixed run.ps1 download option
All checks were successful
release / build-base (push) Successful in 12m32s
release / build-analog-xk (push) Successful in 31m38s
release / build-digital-icarus (push) Successful in 25m11s
release / build-digital-ator (push) Successful in 26m0s
release / build-analog-xm (push) Successful in 31m21s
release / build-digital-heavy (push) Successful in 24m20s
release / build-analog-heavy (push) Successful in 32m2s
release / build-heavy (push) Successful in 30m10s
release / build-chipathon-tools (push) Successful in 28m42s
2023-11-14 16:31:12 -03:00
Aquiles Viza
02bec29f55 Added gf180mcuD
All checks were successful
release / build-base (push) Successful in 5m15s
release / build-digital-icarus (push) Successful in 36m2s
release / build-digital-heavy (push) Successful in 37m16s
release / build-digital-ator (push) Successful in 40m43s
release / build-analog-xk (push) Successful in 41m32s
release / build-analog-heavy (push) Successful in 44m10s
release / build-analog-xm (push) Successful in 44m23s
release / build-heavy (push) Successful in 44m25s
release / build-chipathon-tools (push) Successful in 41m24s
2023-11-14 16:27:23 -03:00
Aquiles Viza
961108837a Updated volare commit
All checks were successful
release / build-base (push) Successful in 5m56s
release / build-digital-icarus (push) Successful in 25m54s
release / build-digital-heavy (push) Successful in 26m58s
release / build-digital-ator (push) Successful in 27m2s
release / build-analog-xk (push) Successful in 28m58s
release / build-analog-xm (push) Successful in 29m12s
release / build-heavy (push) Successful in 30m52s
release / build-analog-heavy (push) Successful in 31m7s
release / build-chipathon-tools (push) Successful in 22m46s
2023-11-09 12:12:35 -03:00
9337a522bf Merge pull request 'Run script enhancement' (#18) from modified-run-file into main
All checks were successful
release / build-base (push) Successful in 22m42s
release / build-digital-icarus (push) Successful in 2h13m49s
release / build-digital-heavy (push) Successful in 2h27m9s
release / build-digital-ator (push) Successful in 2h28m45s
release / build-analog-xk (push) Successful in 2h30m58s
release / build-heavy (push) Successful in 2h31m6s
release / build-analog-heavy (push) Successful in 2h31m14s
release / build-analog-xm (push) Successful in 44m53s
release / build-chipathon-tools (push) Successful in 2h16m16s
Reviewed-on: Mario1159/osic-stacks#18
2023-10-14 22:30:02 +00:00
5f9294a653 Fix space separation for parameters 2023-10-14 17:33:06 -03:00
3409a4f432 Merge branch 'main' into modified-run-file 2023-10-14 16:34:48 +00:00
Aquiles Viza
8b94b03a04 Little change to README 2023-10-10 00:55:11 -03:00
Aquiles Viza
00cbc23811 new_run.ps1 filename to run.ps1 2023-10-10 00:45:10 -03:00
Aquiles Viza
b18281426f Making run.bat autodownload itself 2023-10-10 00:43:12 -03:00
Aquiles Viza
aae7914df8 Changed parameters names, directory format, more internal functions 2023-10-10 00:28:49 -03:00
Aquiles Viza
1c420008fb Added more flags to new_run script 2023-10-08 16:07:22 -03:00
Aquiles Viza
d79329a89e Separate pdks patchs, fixed some troubles
All checks were successful
release / build-base (push) Successful in 25m6s
release / build-digital-icarus (push) Successful in 2h32m38s
release / build-digital-ator (push) Successful in 2h35m44s
release / build-analog-xk (push) Successful in 2h39m15s
release / build-analog-xm (push) Successful in 2h39m19s
release / build-analog-heavy (push) Successful in 2h39m23s
release / build-digital-heavy (push) Successful in 52m52s
release / build-heavy (push) Successful in 53m13s
release / build-chipathon-tools (push) Successful in 2h7m12s
2023-10-08 00:15:54 -03:00
febe3f1155 Merge pull request 'Chipathon dockerfile with paths relatives to project root' (#16) from fix-gf-drc-repo into main
Some checks failed
release / build-base (push) Successful in 20m43s
release / build-digital-heavy (push) Successful in 2h25m21s
release / build-digital-icarus (push) Successful in 2h27m47s
release / build-digital-ator (push) Successful in 2h29m13s
release / build-analog-xk (push) Successful in 2h34m9s
release / build-analog-xm (push) Successful in 2h34m16s
release / build-analog-heavy (push) Successful in 1h25m44s
release / build-heavy (push) Successful in 2h34m18s
release / build-chipathon-tools (push) Failing after 11m50s
Reviewed-on: Mario1159/osic-stacks#16
2023-10-06 16:04:18 +00:00
Aquiles Viza
aeea13a31d Chipathon dockerfile with paths relatives to project root 2023-10-06 12:59:29 -03:00
Aquiles Viza
e8f929bddc Modularized run.ps1 2023-10-05 14:26:59 -03:00
67a9b89086 Merge pull request 'fix-gf-drc-repo' (#14) from fix-gf-drc-repo into main
Some checks failed
release / build-base (push) Successful in 20m51s
release / build-digital-ator (push) Successful in 2h54m36s
release / build-analog-xk (push) Successful in 50m29s
release / build-heavy (push) Successful in 49m48s
release / build-chipathon-tools (push) Failing after 18s
release / build-digital-heavy (push) Successful in 19m47s
release / build-digital-icarus (push) Successful in 38m51s
release / build-analog-xm (push) Successful in 57m33s
release / build-analog-heavy (push) Successful in 51m3s
Reviewed-on: Mario1159/osic-stacks#14
2023-10-05 15:20:59 +00:00
Aquiles Viza
432a75a80a Added chipathon-tools entry to release.yml 2023-10-05 12:18:46 -03:00
Aquiles Viza
4dc73b67cf Updated gf180 drc 2023-10-02 19:04:53 -03:00
4c51d34015 Merge pull request 'main' (#13) from akiles/osic-stacks:main into main
Some checks failed
release / build-analog-xk (push) Has been cancelled
release / build-analog-xm (push) Has been cancelled
release / build-analog-heavy (push) Has been cancelled
release / build-digital-ator (push) Has been cancelled
release / build-digital-icarus (push) Has been cancelled
release / build-digital-heavy (push) Has been cancelled
release / build-heavy (push) Has been cancelled
release / build-base (push) Failing after 44s
Reviewed-on: Mario1159/osic-stacks#13
2023-10-02 21:24:16 +00:00
14 changed files with 2647 additions and 199 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 KiB

After

Width:  |  Height:  |  Size: 131 B

View File

@ -312,4 +312,43 @@ jobs:
tags: git.1159.cl/mario1159/heavy-web
platforms: linux/amd64
context: .
file: ./stacks/heavy.Dockerfile
file: ./stacks/heavy.Dockerfile
build-chipathon-tools:
needs: build-heavy
runs-on: [ubuntu-latest, amd64]
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v2
- name: Authentication
uses: docker/login-action@v2
with:
registry: git.1159.cl
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build chipathon-tools desktop
uses: docker/build-push-action@v4
with:
push: true
build-args: BASE_IMG=git.1159.cl/mario1159/heavy-desktop
tags: git.1159.cl/mario1159/chipathon-tools-desktop
platforms: linux/amd64
context: .
file: ./stacks/chipathon-tools/Dockerfile
- name: Build chipathon-tools web
uses: docker/build-push-action@v4
with:
push: true
build-args: BASE_IMG=git.1159.cl/mario1159/heavy-web
tags: git.1159.cl/mario1159/chipathon-tools-web
platforms: linux/amd64
context: .
file: ./stacks/chipathon-tools/Dockerfile

View File

@ -50,9 +50,9 @@ These scripts automate the binding of graphics environment variables to the cont
Execute the next script in powershell and follow the container initialization prompt.
```pwsh
& ([scriptblock]::Create((irm https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/run.ps1))) -remote
& ([scriptblock]::Create((irm https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/run.ps1))) -pull -download
```
This script will run the container inside WSL and bind the enviroments variables for [WSLg](https://github.com/microsoft/wslg/blob/main/samples/container/Containers.md).
This script will run the container inside WSL and bind the enviroments variables for [WSLg](https://github.com/microsoft/wslg/blob/main/samples/container/Containers.md). Also, it will download itself so it will exists locally.
##### Linux
Execute the next script in your terminal replacing `<container_name>` by any name and `<stack>` by an stack from the previous [stack list](#stacks).

View File

@ -6,7 +6,7 @@ FROM greyltc/archlinux-aur:paru as osicstacks-base-desktop
RUN pacman -Syuq --noconfirm
# Install packages
RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts vim ngspice gedit jupyter-notebook xterm
RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts vim ngspice gedit jupyter-notebook xterm wget
ENV TERM=xterm EDITOR=gedit
# Clean cache

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 KiB

After

Width:  |  Height:  |  Size: 131 B

326
run.ps1
View File

@ -1,89 +1,275 @@
param([switch] $remote = $false)
Write-Host "OSIC-Stacks Container Creation" -ForegroundColor Green
Write-Host "Checking requirements and WSL updates" -ForegroundColor DarkGray
Write-Host ""
wsl --install Ubuntu --no-launch
wsl --update
Write-Host ""
Write-Host "Please select an image index:"
$stacks_options = @(
'analog-xk'
'analog-xm'
'analog-heavy'
'digital-ator'
'digital-icarus'
'digital-heavy'
'heavy'
param(
[switch] $pull = $false,
[switch] $interactive = $false,
[switch] $silent = $false,
[switch] $attach = $false,
[switch] $download = $false
)
for($i = 0; $i -lt $stacks_options.Length; $i++) {
$stack_option = $stacks_options[$i]
Write-Host "[$($i+1)] - $stack_option" -ForegroundColor Cyan
$global:STACK_OPTIONS = [ordered]@{
1 = 'analog-xk'
2 = 'analog-xm'
3 = 'analog-heavy'
4 = 'digital-ator'
5 = 'digital-icarus'
6 = 'digital-heavy'
7 = 'heavy'
8 = "chipathon-tools"
}
$stack_index = Read-Host -Prompt "Container image to initialize [1-$($stacks_options.Length)]"
$selected_stack = $stacks_options[$stack_index-1]
$container_name = Read-Host -Prompt "Container instance name [default=$selected_stack]"
if (!$container_name) { $container_name = $selected_stack }
$global:SELECTED_STACK='chipathon-tools'
$global:CONTAINER_NAME=$global:SELECTED_STACK
$global:EXECMODE='desktop'
$global:PDK="gf180mcuD"
$global:DIRECTORY=Get-Location | Foreach-Object { $_.Path }
$global:WSL_DISTRO="NO DISTRO"
$execmode = ''
while(!$execmode) {
Write-Host "Please select an execution mode index"
Write-Host '[1] - desktop' -ForegroundColor Cyan
Write-Host '[2] - web' -ForegroundColor Cyan
$response = Read-Host "Execution mode [1-2]"
if ($response -eq '1') {
$execmode = 'desktop'
} elseif ($response -eq '2') {
$execmode = 'web'
} else {
Write-Host "Unexpected respose, please try again" -ForegroundColor Red
$global:PARAMS = ""
New-Alias Call Invoke-Expression
function debug($fname, $message) {
Write-Host "[$fname] $message" -ForegroundColor Green
}
function get-ubuntu-distro() {
# Identify if distro has (Predeterminado) or something like that
Invoke-Expression "wsl --list" | ForEach-Object {
if ($_ -match '\)' ) {
$global:WSL_DISTRO=$_.split('(')[0].replace(" ","")
}
}
debug "get-ubuntu-distro" "Linux distribution: $global:WSL_DISTRO"
}
function validate-environment() {
Write-Host "Checking requirements and WSL updates" -ForegroundColor DarkGray
Write-Host ""
Call "wsl --install Ubuntu --no-launch"
Call "wsl --update"
Write-Host ""
}
function select-stack() {
Write-Host "Please select an stack index:"
$STACK_OPTIONS.GetEnumerator() | ForEach-Object {
Write-Host "[$($_.Key)] - $($_.Value)" -ForegroundColor Cyan
}
$response = Read-Host -Prompt "Container stack to initialize [1-$($STACK_OPTIONS.Count)]"
if ($response) {
$global:SELECTED_STACK = $STACK_OPTIONS[$response-1]
}
$response = Read-Host -Prompt "Container instance name [default=$global:CONTAINER_NAME]"
if ($response) {
$global:CONTAINER_NAME = $response
}
}
$additional_options = ''
if($remote) {
$image = "git.1159.cl/mario1159/$selected_stack-$execmode"
$additional_options = '--pull always '
} else {
$image = "$selected_stack-$execmode"
function select-execmode() {
Write-Host "Please select an execution mode index"
Write-Host '[1] - desktop' -ForegroundColor Cyan
Write-Host '[2] - web' -ForegroundColor Cyan
$response = Read-Host "Execution mode [1-2] [default=$global:EXECMODE]"
if ($response -eq '1') {
$global:EXECMODE = 'desktop'
} elseif ($response -eq '2') {
$global:EXECMODE = 'web'
} else {
Write-Host "Using default mode ($global:EXECMODE)"
}
}
$response = Read-Host "Do you want to bind the container home directory into a windows directory? [N/y]"
function bind-to-directory() {
$response = Read-Host "Do you want to bind the container home directory into a windows directory? [N/y]"
if ($response -eq 'y') {
$directory = Read-Host "Write the windows directory destination relative to WSL, for example `"/mnt/c/Users/Username/Desktop/ExampleFolder`"`n"
$additionaloptions = -join($additionaloptions, "-v ${directory}:/home/designer/shared ")
if ($response -eq 'y') {
$global:DIRECTORY = Read-Host "Write the windows directory destination , for example `"C:\Users\Username\Desktop\ExampleFolder`"`n"
}
}
$response = Read-Host -Prompt "Do you want to set additional arguments for the container instantiation? [N/y]"
function set-aditional-parameters() {
$response = Read-Host -Prompt "Do you want to set additional arguments for the container instantiation? [N/y]"
if ($response -eq 'y') {
$response = Read-Host -Prompt "Write the additional arguments, for example -v <wsl_path>:<container_path>."
$additionaloptions = -join($additionaloptions, $response)
if ($response -eq 'y') {
$response = Read-Host -Prompt "Write the additional arguments, for example -v <wsl_path>:<container_path>."
$global:PARAMS += " $response"
}
}
Write-Host ""
function force-pull() {
$response = Read-Host -Prompt "Do you want to pull latest image? [N/y] [default=N]"
$dockercommand = ("docker run -d " +
"--name $container_name " +
"-v /tmp/.X11-unix:/tmp/.X11-unix " +
"-v /mnt/wslg:/mnt/wsl " +
"-e WAYLAND_DISPLAY=`$WAYLAND_DISPLAY " +
"-e DISPLAY=`$DISPLAY " +
"-e XDG_RUNTIME_DIR=/mnt/wslg " +
"$additional_options "+
$image)
if ($response -eq 'y') {
$global:PARAMS += " --pull always"
}
}
wsl -d Ubuntu bash -ic $dockercommand
function select-pdk() {
Write-Host "Please select a pdk"
Write-Host '[1] - gf180mcuC' -ForegroundColor Cyan
Write-Host '[2] - sky130A' -ForegroundColor Cyan
$response = Read-Host "Execution mode [1-2] [default=$global:PDK]"
if ($?) {
Write-Host "Container created successfully!" -ForegroundColor Green
Write-Host "Enter the container with `"docker exec -it $container_name bash`"" -ForegroundColor DarkGray
} else {
Write-Host "Container creation failed, see logs above" -ForegroundColor Red
}
if ($response -eq '1') {
$global:PDK = 'gf180mcuC'
} elseif ($response -eq '2') {
$global:PDK = 'sky130A'
} else {
Write-Host "Using default pdk ($global:PDK)"
}
}
function attach-shell () {
Call "docker exec -it $global:CONTAINER_NAME bash"
}
function path-conversion() {
$directory, $other = $args
$drive, $path = $directory.split(":")
echo "/mnt/$($drive.tolower())$($path.replace("\","/"))"
}
function get-value-from-wsl() {
$variable, $other = $args
$cmd = "wsl bash -c `'echo `$$variable`'"
# Simple replacement
#$cmd = "wsl -d $global:WSL_DISTRO bash -c `'echo `$$variable`'"
#$cmd = "wsl -d `'$global:WSL_DISTRO`' bash -c `'echo `$$variable`'"
# Using parenthesis
#$cmd = "wsl -d $($global:WSL_DISTRO) bash -c `'echo `$$variable`'"
#$cmd = "wsl -d `'$($global:WSL_DISTRO)`' bash -c `'echo `$$variable`'"
#$cmd = "wsl -d `"$($global:WSL_DISTRO)`" bash -c `'echo `$$variable`'"
# Using curly braces
#$cmd = "wsl -d ${global:WSL_DISTRO} bash -c `'echo `$$variable`'"
#$cmd = "wsl -d '${global:WSL_DISTRO}' bash -c `'echo `$$variable`'"
# Using here strings (Never worked)
# @"
# "wsl -d $global:WSL_DISTRO bash -c `'echo `$$variable`'"
# "@
debug "get-value-from-wsl" "Command: $cmd"
$response = Invoke-Expression "$cmd"
debug "get-value-from-wsl" "Response: $response"
return $response
}
function set-common-parameters () {
$global:IMAGE = "git.1159.cl/mario1159/$SELECTED_STACK-$EXECMODE"
if ($attach) {
$global:PARAMS += " -it --rm"
$global:COMMAND = "bash"
} else {
$global:PARAMS += " -d"
$global:COMMAND = ""
}
if ($pull) {
$global:PARAMS += " --pull always"
}
$global:PARAMS += " --name $global:CONTAINER_NAME"
$global:PARAMS += " --security-opt seccomp=unconfined"
# $global:PARAMS += " -p '8888:8888'"
# $global:PARAMS += " -p '8082:8082'"
$global:PARAMS += " -e PDK=$global:PDK"
$global:PARAMS += " -e DISPLAY=$(get-value-from-wsl "DISPLAY")"
$global:PARAMS += " -e WAYLAND_DISPLAY=$(get-value-from-wsl "WAYLAND_DISPLAY")"
$global:PARAMS += " -e XDG_RUNTIME_DIR=$(get-value-from-wsl "XDG_RUNTIME_DIR")"
}
function run-docker-wsl() {
$global:DIRECTORY = path-conversion $global:DIRECTORY
$global:PARAMS += " -v /tmp/.X11-unix:/tmp/.X11-unix"
$global:PARAMS += " -v /mnt/wslg:/mnt/wsl"
$global:PARAMS += " -v ${global:DIRECTORY}:/home/designer/shared "
#Call "wsl -d $global:WSL_DISTRO bash --noprofile --norc -ic `"docker run $global:PARAMS $global:IMAGE $global:COMMAND`""
Call "wsl bash --noprofile --norc -ic `"docker run $global:PARAMS $global:IMAGE $global:COMMAND`""
if ($?) {
Write-Host "Container created successfully!" -ForegroundColor Green
Write-Host "Enter the container with `"docker exec -it $global:CONTAINER_NAME bash`"" -ForegroundColor DarkGray
attach-shell
} else {
Write-Host "Container creation failed, see logs above" -ForegroundColor Red
}
}
function run-docker-win() {
$global:PARAMS += " -v '\\wsl.localhost\$global:WSL_DISTRO\mnt\wslg:/tmp'"
$global:PARAMS += " -v ${global:DIRECTORY}:/home/designer/shared"
#$global:PARAMS += " -v '\\wsl.localhost\$global:WSL_DISTRO\mnt\wslg\runtime-dir'%XDG_RUNTIME_DIR%"
Call "docker run $global:PARAMS $global:IMAGE $global:COMMAND"
if ($?) {
Write-Host "Container created successfully!" -ForegroundColor Green
Write-Host "Enter the container with `"docker exec -it $global:CONTAINER_NAME bash`"" -ForegroundColor DarkGray
attach-shell
} else {
Write-Host "Container creation failed, see logs above" -ForegroundColor Red
}
}
function download-run-bat () {
if (!$download) { return }
try {
$response = Call "Invoke-WebRequest -URI https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/run.ps1 -OutFile run.ps1"
} catch {
$StatusCode = $_.Exception.Response.StatusCode.value__
Write-Host "Error downloading file :( ($($StatusCode))" -ForegroundColor Red
return
}
Write-Host "run.bat updated successfully" -ForegroundColor Green
}
function run(){
if ($silent) {
Write-Host "[Silent Mode]" -ForegroundColor Yellow
Remove-Alias Call
New-Alias Call Write-Host
}
Write-Host "OSIC-Stacks Container Creation" -ForegroundColor Green
download-run-bat
validate-environment
get-ubuntu-distro
if ($interactive) {
select-stack
select-execmode
bind-to-directory
set-aditional-parameters
force-pull
}
set-common-parameters
#run-docker-win
run-docker-wsl
}
run

View File

@ -12,9 +12,6 @@ RUN sudo aur-install \
klayout \
netgen-lvs-git
RUN pip install gdsfactory --break-system-packages
RUN pip install gf180 --upgrade --break-system-packages
# Clean cache
RUN sudo pacman -Scc

View File

@ -2,13 +2,16 @@ ARG BASE_IMG=heavy-desktop
FROM $BASE_IMG as chipathon-tools
# Add scripts
COPY --chown=designer:designer --chmod=755 scripts/install-open-pdks.sh .
COPY --chown=designer:designer --chmod=755 stacks/chipathon-tools/scripts/global-variables.sh .
COPY --chown=designer:designer --chmod=755 stacks/chipathon-tools/scripts/install-open-pdks.sh .
RUN ./install-open-pdks.sh
COPY --chown=designer:designer --chmod=755 scripts/* .
RUN ./patch-open-pdks.sh
COPY --chown=designer:designer --chmod=755 stacks/chipathon-tools/scripts/* .
RUN ./patch-open-pdks-gf180.sh
RUN ./patch-open-pdks-sky130.sh
RUN rm *.sh
# Initialize the enviroment keeping container alive
CMD ["sleep", "infinity"]
CMD ["sleep", "infinity"]

View File

@ -1,22 +1,33 @@
[[ $- != *i* ]] && return
# ------------------
# SET PDK PARAMETERS
# ------------------
if [ "$PDK" == "" ]; then
echo "PDK not defined, using default one (gf180mcuD)"
PDK=gf180mcuD
fi
case "$PDK" in
gf180mcuC)
export PDKPATH=$PDK_ROOT/$PDK
export STD_CELL_LIBRARY=gf180mcu_fd_sc_mcu7t5v0
;;
sky130A)
export PDKPATH=$PDK_ROOT/$PDK
export STD_CELL_LIBRARY=sky130_fd_sc_hd
;;
*)
echo "PDK not defined, using default one (gf180mcuC)"
export PDK=gf180mcuC
export PDKPATH=$PDK_ROOT/$PDK
export STD_CELL_LIBRARY=gf180mcu_fd_sc_mcu7t5v0
;;
gf180mcuC) echo "gf180mcuC is not supported, only D variant [default one]" ;;
gf180mcuD) export STD_CELL_LIBRARY=gf180mcu_fd_sc_mcu7t5v0 ;;
sky130A) export STD_CELL_LIBRARY=sky130_fd_sc_hd ;;
*) echo "PDK $PDK NOT RECOGNIZED";;
esac
export PDKPATH=$PDK_ROOT/$PDK
export KLAYOUT_HOME=$PDK_ROOT/$PDK/libs.tech/klayout
alias xschem='xschem -b --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc'
alias xschemtcl='xschem --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc'
#alias magic='magic --rcfile $PDK_ROOT/$PDK/libs.tech/magic/*.magicrc'
# ------------------
# SET PROMPT
# ------------------
function git_branch {
branch=$(git symbolic-ref --short HEAD 2>/dev/null)
if [ "$branch" != "" ]; then
@ -37,13 +48,12 @@ c_whi='\[\033[01;37m\]' # White
# export PS1="${c_pur}\w $(git_branch)\n${c_res}\$ " ## This dont work :(
PS1="${c_pur}\w \n${c_res}\$ " ## This dont work :(
export KLAYOUT_HOME=$PDK_ROOT/$PDK/libs.tech/klayout
export DESIGNS="/home/designer/shared"
# --------------------------------
# USEFUL ENV VARIABLES AND ALIASES
# --------------------------------
alias ls="ls --color=auto -XF"
alias grep="grep --color=auto"
alias xschem='xschem -b --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc'
alias xschemtcl='xschem --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc'
git config --global --add safe.directory $DESIGNS
git config --global --add safe.directory /home/designer/shared
git config --global --add safe.directory /workspaces/*

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
export PDK_ROOT=/home/designer/.volare
#export OPEN_PDKS_COMMIT="cd1748bb197f9b7af62a54507de6624e30363943"
export OPEN_PDKS_COMMIT="bdc9412b3e468c102d01b7cf6337be06ec6e9c9a"
# This files can be downloaded directly
# - sky130A_mr.drc
# - gf180mcuD_mr.drc
export PRECHECK_REPO=https://raw.githubusercontent.com/efabless/mpw_precheck/main/checks/tech-files/
export PRECHECK_GF_FILE=gf180mcuD_mr.drc
export PRECHECK_SKY_FILE=sky130A_mr.drc
export SCRIPT_DIR=$PWD

View File

@ -1,32 +1,32 @@
#!/bin/bash
set -e
set -ex
export OPEN_PDKS_VERSION="dd7771c384ed36b91a25e9f8b314355fc26561be"
export SCRIPT_DIR=$PWD
source ./global-variables.sh
#pip install git+https://github.com/gdsfactory/skywater130.git git+https://github.com/gdsfactory/gf180.git --upgrade --break-system-packages
# pip install gf180 --upgrade --break-system-packages
# pip install sky130 --upgrade --break-system-packages
pip install gdsfactory[cad]==7.3.0 --break-system-packages
######################
# INSTALL GF180MCU PDK
######################
volare enable "${OPEN_PDKS_VERSION}" --pdk gf180mcu
volare enable "${OPEN_PDKS_COMMIT}" --pdk gf180mcu
rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuA
rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuB
rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuD
rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuC
rm -rf $PDK_ROOT/gf180mcuA
rm -rf $PDK_ROOT/gf180mcuB
rm -rf $PDK_ROOT/gf180mcuD
rm -rf $PDK_ROOT/gf180mcuC
####################
# INSTALL SKY130 PDK
####################
pip install sky130 --upgrade --break-system-packages
volare enable "${OPEN_PDKS_VERSION}" --pdk sky130
# ADD PCELL SUPPORT
volare enable "${OPEN_PDKS_COMMIT}" --pdk sky130
# remove version sky130B to save space (efabless TO use mostly sky130A)
rm -rf "$PDK_ROOT"/volare/sky130/versions/*/sky130B

View File

@ -0,0 +1,168 @@
#!/bin/bash
set -ex
function _gf180mcuD_clean_install() {
# Re-installs gf180mcuD
rm -rf $PDK_ROOT/gf180mcu*
rm -rf $PDK_ROOT/volare/gf180mcu/versions/$OPEN_PDKS_COMMIT
volare enable --pdk gf180mcu $OPEN_PDKS_COMMIT
rm -rf $PDK_ROOT/gf180mcuA
rm -rf $PDK_ROOT/gf180mcuB
rm -rf $PDK_ROOT/gf180mcuC
rm -rf $PDK_ROOT/volare/gf180mcu/versions/$OPEN_PDKS_COMMIT/gf180mcuA
rm -rf $PDK_ROOT/volare/gf180mcu/versions/$OPEN_PDKS_COMMIT/gf180mcuB
rm -rf $PDK_ROOT/volare/gf180mcu/versions/$OPEN_PDKS_COMMIT/gf180mcuC
}
function gf180_delete_repos() {
rm -rf globalfoundries-pdk-libs-gf180mcu_fd_pr
rm -rf globalfoundries-pdk-libs-gf180mcu_fd_pv
}
function gf180_download_repos() {
gf180_delete_repos
git clone --depth 1 https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr.git
git clone --depth 1 https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pv.git
}
function gf180_patch_ngspice_primitives() {
NGSPICE_TECH=$PDK_ROOT/gf180mcuD/libs.tech/ngspice
rm -rf $NGSPICE_TECH
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/models/ngspice $NGSPICE_TECH
}
function gf180_patch_xyce_primitives() {
XYCE_TECH=$PDK_ROOT/gf180mcuD/libs.tech/xyce
rm -rf $XYCE_TECH
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/models/xyce $XYCE_TECH
}
function gf180_patch_xschem_primitives() {
# Replace volare xschem dir with efabless one
XSCHEM_TECH=$PDK_ROOT/gf180mcuD/libs.tech/xschem
rm -rf $XSCHEM_TECH
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/cells/xschem $XSCHEM_TECH
}
function gf180_patch_xschem_xschemrc() {
FILEPATH=$PDK_ROOT/gf180mcuD/libs.tech/xschem/xschemrc
# Add gf180mcuD symbols to xschem path
ORIGINAL='append XSCHEM_LIBRARY_PATH :$env(PWD)'
REPLACE='append XSCHEM_LIBRARY_PATH :$env(PDK_ROOT)/gf180mcuD/libs.tech/xschem'
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
# Update 180MCU_MODELS
ORIGINAL='set 180MCU_MODELS ${PDK_ROOT}/models/ngspice'
REPLACE='set 180MCU_MODELS $env(PDK_ROOT)/gf180mcuD/libs.tech/ngspice'
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
# Allow setting of symbol paths with XSCHEM_USER_LIBRARY_PATH env variable
echo '' >> $FILEPATH
echo '# open_pdks-specific' >> $FILEPATH
echo 'set XSCHEM_START_WINDOW ${PDK_ROOT}/gf180mcuD/libs.tech/xschem/tests/0_top.sch' >> $FILEPATH
echo 'append XSCHEM_LIBRARY_PATH :${PDK_ROOT}/gf180mcuD/libs.tech/xschem' >> $FILEPATH
echo '' >> $FILEPATH
echo '# allow a user-specific path add-on' >> $FILEPATH
echo 'if { [info exists ::env(XSCHEM_USER_LIBRARY_PATH) ] } {' >> $FILEPATH
echo ' append XSCHEM_LIBRARY_PATH :$env(XSCHEM_USER_LIBRARY_PATH)' >> $FILEPATH
echo '}' >> $FILEPATH
}
function gf180_patch_klayout_pcells() {
# Delete old volare pymacros, use the pcells from efabless repo.
rm -rf $KLAYOUT_HOME/pymacros
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/cells/klayout/pymacros $KLAYOUT_HOME
}
function gf180_patch_klayout_tech_clean() {
# DRC and LVS is obsolete, and the copy is made on $KLAYOUT_HOME/
rm -rf $KLAYOUT_HOME/tech/drc
rm -rf $KLAYOUT_HOME/tech/lvs
# .lym should be on $KLAYOUT_HOME/pymacros
rm -rf $KLAYOUT_HOME/tech/gf180mcu.lym
}
function gf180_patch_klayout_drc_lvs() {
rm -rf $KLAYOUT_HOME/drc
rm -rf $KLAYOUT_HOME/lvs
mv globalfoundries-pdk-libs-gf180mcu_fd_pv/klayout/drc $KLAYOUT_HOME
mv globalfoundries-pdk-libs-gf180mcu_fd_pv/klayout/lvs $KLAYOUT_HOME
}
function gf180_patch_klayout_dropdown() {
# dropdown menu should live on $KLAYOUT_HOME/macro
# Depends on $KLAYOUT_HOME/drc $KLAYOUT_HOME/lvs
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/rules/klayout/macros $KLAYOUT_HOME
# Make D the default variant in {drc lvs}_options.yml
FILEPATH=$KLAYOUT_HOME/macros/*_options.yml
ORIGINAL='variant: C'
REPLACE='variant: D'
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
# Make D default on .lym
FILEPATH=$KLAYOUT_HOME/macros/gf180mcu_options.lym
ORIGINAL=';"C"'
REPLACE=';"D"'
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
ORIGINAL='], 2)'
REPLACE='], 3)'
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
}
function gf180_patch_klayout_precheck_drc() {
wget -O $KLAYOUT_HOME/drc/$PRECHECK_GF_FILE $PRECHECK_REPO/$PRECHECK_GF_FILE
}
function gf180_patch_klayout_lyp() {
# If $KLAYOUT_HOME/tech is not modified, this has no dependencies
mv gf180mcu.lyp $KLAYOUT_HOME/tech/gf180mcu.lyp
}
function gf180_patch() {
# volare pdk should be installed with ./volare_install.sh
export KLAYOUT_HOME="$PDK_ROOT/gf180mcuD/libs.tech/klayout"
gf180_download_repos
gf180_patch_ngspice_primitives
gf180_patch_xyce_primitives
gf180_patch_xschem_primitives
gf180_patch_xschem_xschemrc
gf180_patch_klayout_pcells
gf180_patch_klayout_tech_clean
gf180_patch_klayout_drc_lvs
gf180_patch_klayout_dropdown
gf180_patch_klayout_precheck_drc
gf180_patch_klayout_lyp
gf180_delete_repos
}
source ./global-variables.sh
#_gf180mcuD_clean_install
pip install docopt --upgrade --break-system-packages
gf180_patch

View File

@ -1,84 +1,5 @@
#!/bin/bash
set -e
SCRIPT_DIR=$PWD
DROPDOWN_REPO="https://github.com/mabrains/globalfoundries-pdk-libs-gf180mcu_fd_pr"
# This files can be downloaded directly
# - sky130A_mr.drc
# - gf180mcuC_mr.drc
PRECHECK_REPO=https://raw.githubusercontent.com/efabless/mpw_precheck/main/checks/tech-files/
PRECHECK_GF_FILE=gf180mcuC_mr.drc
PRECHECK_SKY_FILE=sky130A_mr.drc
# TODO: DOWNLOAD WITH WGET, DONT HAVE IT STATIC
if [ -d $SCRIPT_DIR/iic-spice-model-red.py ]; then
echo File iic-spice-model.red.py not found
return -1
fi
sudo aur-install wget
pip install docopt --upgrade --break-system-packages
######################
# PATCH GF180MCU PDK
######################
function gf180_patch_xschemrc() {
FILEPATH=$PDK_ROOT/gf180mcuC/libs.tech/xschem/xschemrc
ORIGINAL='append XSCHEM_LIBRARY_PATH :$env(PWD)'
REPLACE='append XSCHEM_LIBRARY_PATH :$env(PDK_ROOT)/$env(PDK)/libs.tech/xschem'
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
ORIGINAL='set 180MCU_MODELS ${PDK_ROOT}/models/ngspice'
REPLACE='set 180MCU_MODELS $env(PDK_ROOT)/$env(PDK)/libs.tech/ngspice'
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
}
function gf180_patch_klayout_pcells() {
KLAYOUT_HOME="$PDK_ROOT/gf180mcuC/libs.tech/klayout"
mv $KLAYOUT_HOME/pymacros $KLAYOUT_HOME/cells
mkdir $KLAYOUT_HOME/pymacros
mv $KLAYOUT_HOME/cells $KLAYOUT_HOME/pymacros
mv $KLAYOUT_HOME/tech/gf180mcu.lym $KLAYOUT_HOME/pymacros
rm -rf .scripts/klayout
}
function gf180_patch_klayout_dropdown() {
# 27:00 & 36:40
KLAYOUT_HOME="$PDK_ROOT/gf180mcuC/libs.tech/klayout"
DROPDOWN_DIRECTORY="globalfoundries"
git clone $DROPDOWN_REPO $DROPDOWN_DIRECTORY
cp -r $DROPDOWN_DIRECTORY/rules/klayout/macros $KLAYOUT_HOME
# There's no directories
# cp -r $DROPDOWN_DIRECTORY/rules/klayout/drc/*.drc $KLAYOUT_HOME/drc
# cp -r $DROPDOWN_DIRECTORY/rules/klayout/lvs/*.lvs $KLAYOUT_HOME/lvs
rm -rf $DROPDOWN_DIRECTORY
}
function gf180_patch_klayout_precheck_drc() {
KLAYOUT_HOME="$PDK_ROOT/gf180mcuC/libs.tech/klayout"
#curl -o $KLAYOUT_HOME/drc/rule_decks/$PRECHECK_GF_FILE $PRECHECK_REPO/$PRECHECK_GF_FILE
wget -O $KLAYOUT_HOME/drc/rule_decks/$PRECHECK_GF_FILE $PRECHECK_REPO/$PRECHECK_GF_FILE
}
function gf180_patch() {
gf180_patch_xschemrc
gf180_patch_klayout_pcells
gf180_patch_klayout_dropdown
gf180_patch_klayout_precheck_drc
}
####################
# PATCH SKY130 PDK
####################
set -ex
function sky130_patch_reduced_models() {
cd "$PDK_ROOT/sky130A/libs.tech/ngspice" || exit 1
@ -91,7 +12,6 @@ function sky130_patch_reduced_models() {
}
function sky130_patch_klayout_lyt() {
KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout"
FILEPATH="$KLAYOUT_HOME/tech/sky130A.lyt"
sed -i 's/>sky130</>sky130A</g' $FILEPATH
@ -101,7 +21,6 @@ function sky130_patch_klayout_lyt() {
}
function sky130_patch_klayout_lym () {
KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout"
# ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6
# ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6
# ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6
@ -111,7 +30,6 @@ function sky130_patch_klayout_lym () {
}
function sky130_patch_klayout_pcells() {
KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout"
# Fixing the above, the cells indicates the following:
# ERROR: /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/via_generator.py:23: ModuleNotFoundError: No module named 'gdsfactory.types'
# /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/via_generator.py:23
@ -122,11 +40,11 @@ function sky130_patch_klayout_pcells() {
}
function sky130_patch_klayout_precheck_drc() {
KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout"
wget -O $KLAYOUT_HOME/drc/$PRECHECK_SKY_FILE $PRECHECK_REPO/$PRECHECK_SKY_FILE
}
function sky130_patch() {
export KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout"
sky130_patch_reduced_models
sky130_patch_klayout_lyt
# sky130_patch_klayout_lym # TODO: The file disappears
@ -134,7 +52,12 @@ function sky130_patch() {
sky130_patch_klayout_precheck_drc
}
gf180_patch
sky130_patch
source ./global-variables.sh
sudo aur-install gedit xterm gvim
# TODO: DOWNLOAD WITH WGET, DONT HAVE IT STATIC
if [ -d $SCRIPT_DIR/iic-spice-model-red.py ]; then
echo File iic-spice-model.red.py not found
return -1
fi
sky130_patch