Skip to content

Commit d33b60f

Browse files
committed
work on ci flow
1 parent e0a8f92 commit d33b60f

3 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/test.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Run simulate-gate check
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
simulate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout your repository
12+
uses: actions/checkout@v4
13+
14+
- name: Pull Docker image
15+
run: docker pull hpretl/iic-osic-tools
16+
17+
- name: Clone simulate-gate repo
18+
run: git clone --branch nand-ci https://github.com/mattvenn/simulate-gate.git
19+
20+
- name: Run make check inside Docker
21+
run: |
22+
docker run --rm \
23+
-v ${{ github.workspace }}:/work \
24+
-w /work/simulate-gate \
25+
hpretl/iic-osic-tools \
26+
make check
27+
28+
- name: Upload nand.png as artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: nand-image
32+
path: simulate-gate/nand.png

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ all: sim
33
show_cells:
44
summary.py --show-sky130
55

6+
check:
7+
ngspice ci.spice
8+
69
sim: simulation.spice
710
# run the simulation
811
ngspice $^

ci.spice

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Standard cell Simulation
2+
* this file edited to remove everything not in tt lib
3+
.lib "/foss/pdks/sky130A/libs.tech/ngspice/sky130.lib.spice" tt
4+
5+
6+
* include the standard cells
7+
.include "./sky130_fd_sc_hd.spice"
8+
9+
* instantiate the cell - adjust this to match your standard cell
10+
Xcell A B VGND VGND VPWR VPWR Y sky130_fd_sc_hd__nand2_1
11+
12+
* set gnd and power
13+
Vgnd VGND 0 0
14+
Vdd VPWR VGND 1.8
15+
16+
* create pulse for A and B
17+
* parameters are: initial value, pulsed value, delay time, rise time, fall time, pulse width, period
18+
Va A VGND pulse(0 1.8 1n 10p 10p 1n 2n)
19+
Vb B VGND pulse(0 1.8 1.5n 10p 10p 1n 2n)
20+
21+
* setup the transient analysis
22+
.tran 10p 3n 0
23+
24+
.control
25+
run
26+
set color0 = white
27+
set color1 = black
28+
set hcopypscolor ; enable color in PostScript
29+
set hcopydev=png ; output format is PNG
30+
set hcopyfont=Arial ; optional: change font
31+
hardcopy nand.png A B Y
32+
.endc
33+
34+
.end

0 commit comments

Comments
 (0)