This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The script removes duplicate path entries from the User's path. | |
// It prints a power shell command that you should execute in order to update | |
// the User's path with the new value. | |
const { execSync } = require('child_process'); | |
const machinePath = execSync('powershell.exe [Environment]::GetEnvironmentVariable(\\"Path\\", [EnvironmentVariableTarget]::Machine)').toString(); | |
const userPath = execSync('powershell.exe [Environment]::GetEnvironmentVariable(\\"Path\\", [EnvironmentVariableTarget]::User)').toString(); | |
const machinePathParts = machinePath.split(';'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Wokwi Custom Chips with Rust | |
use wokwi_chips_api::println; | |
use wokwi_chips_api::pin::{Pin, PinMode, WatchEdge}; | |
// chipInit() will be called once per chip instance. | |
#[no_mangle] | |
pub unsafe extern "C" fn chipInit() { | |
println!("Hello from Rust Chip!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v {xschem version=3.4.4 file_version=1.2 | |
} | |
G {} | |
K {} | |
V {} | |
S {} | |
E {} | |
T {Transmission gate (incl. inverter)} 380 -190 0 0 0.4 0.4 {} | |
N 680 -980 1000 -980 { lab=VPWR} | |
N 840 -740 870 -740 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v {xschem version=3.4.5 file_version=1.2 | |
} | |
G {} | |
K {} | |
V {} | |
S {} | |
E {} | |
L 4 70 -80 90 -80 {} | |
L 4 80 -90 80 -70 {} | |
L 4 80 70 80 90 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <defs.h> | |
//#include <math.h> | |
#include <stub.h> | |
#include <hw/common.h> | |
#include <uart.h> | |
#include <uart_api.h> | |
// there is some Caravel issue happening that prevents the usual SET and CLR from working | |
// a fast read followed by write results in the whole register being cleared. | |
unsigned int temp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Important: before running this script, download the the .def file from | |
# https://github.com/TinyTapeout/tt-support-tools/blob/tt06/def/analog/tt_block_1x2_pg_ana.def | |
def read tt_block_1x2_pg_ana.def | |
cellname rename tt_um_template tt_um_analog_example | |
# VPWR | |
box 100 500 250 22076 | |
paint met4 | |
label VPWR FreeSans met4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy this file to .github/workflows/gds.yaml | |
name: gds | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
gds: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin | |
import time | |
CLK_PERIOD_MS = 1 | |
NUM_DESIGNS = 250 # should be higher | |
# from chip's perspective | |
# pinout here: https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico/1 | |
ext_clk = Pin(6, Pin.OUT) | |
ext_latch = Pin(7, Pin.OUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin, Timer | |
import time | |
CLK_PERIOD_MS = 1 | |
NUM_DESIGNS = 2 # should be higher | |
# from chip's perspective | |
# pinout here: https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico/1 | |
ext_clk = Pin(6, Pin.OUT) | |
ext_latch = Pin(7, Pin.OUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# klayout -b -r compare.py -rd gds1=file1.gds -rd gds2=file2.gds | |
import sys | |
import pya | |
def compare_gds(file1, file2): | |
diff = pya.LayoutDiff() | |
# Load the layouts |
NewerOlder