Skip to content

Commit fa106e5

Browse files
committed
iHP0p2: updated files for iHP process
1 parent 2fe68df commit fa106e5

File tree

5 files changed

+118
-126
lines changed

5 files changed

+118
-126
lines changed

.github/workflows/gds.yaml

Lines changed: 75 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,85 @@ jobs:
1414
submodules: recursive
1515

1616
- name: Build GDS
17-
uses: TinyTapeout/tt-gds-action@tt09
18-
with:
19-
flow: openlane2
17+
uses: TinyTapeout/tt-gds-action/orfs@tt09
2018

21-
precheck:
22-
needs: gds
23-
runs-on: ubuntu-24.04
24-
steps:
25-
- name: Run Tiny Tapeout Precheck
26-
uses: TinyTapeout/tt-gds-action/precheck@tt09
19+
#precheck:
20+
# needs: gds
21+
# runs-on: ubuntu-24.04
22+
# steps:
23+
# - name: Run Tiny Tapeout Precheck
24+
# uses: TinyTapeout/tt-gds-action/precheck@tt09
2725

2826
gl_test:
29-
needs: gds
30-
runs-on: ubuntu-24.04
31-
steps:
32-
- name: checkout repo
33-
uses: actions/checkout@v4
34-
with:
35-
submodules: recursive
27+
needs: gds
28+
runs-on: ubuntu-24.04
29+
env:
30+
PDK_ROOT: ${{ github.workspace }}/IHP-Open-PDK
31+
TEST_DIR: ${{ github.workspace }}/test
32+
steps:
33+
- name: checkout repo
34+
uses: actions/checkout@v4
35+
with:
36+
submodules: recursive
37+
38+
- name: Download GDS artifact
39+
uses: actions/download-artifact@v4
40+
with:
41+
name: tt_submission
42+
43+
- name: install PDK
44+
uses: actions/checkout@v4
45+
with:
46+
repository: tinytapeout/IHP-Open-PDK
47+
ref: tt
48+
path: IHP-Open-PDK
49+
50+
- name: Setup python
51+
uses: actions/setup-python@v5
52+
with:
53+
python-version: '3.11'
54+
55+
- name: Install Python packages
56+
shell: bash
57+
run: pip install -r test/requirements.txt
58+
59+
- name: ccache
60+
uses: hendrikmuhs/ccache-action@v1.2
61+
62+
- name: Install iverilog
63+
shell: bash
64+
run: |
65+
wget https://github.com/htfab/iverilog/releases/download/13.0-git-d8c3c51/iverilog_13.0-git-d8c3c51a-1_amd64.deb
66+
sudo apt-get update -y
67+
sudo apt-get install -y ./iverilog_13.0-git-d8c3c51a-1_amd64.deb
68+
69+
- name: Run tests
70+
shell: bash
71+
run: |
72+
cp tt_submission/*.v "$TEST_DIR/gate_level_netlist.v"
73+
cd "$TEST_DIR"
74+
rm -f tb.vcd results.xml
75+
make clean
76+
GATES=yes make
77+
78+
# `make` will return success even if the tests fail, so check for failure in results.xml
79+
test -f results.xml
80+
! grep failure results.xml
81+
82+
- name: Upload VCD
83+
if: always()
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: gatelevel_test_vcd
87+
path: |
88+
${{ env.TEST_DIR }}/tb.vcd
89+
${{ env.TEST_DIR }}/results.xml
3690
37-
- name: GL test
38-
uses: TinyTapeout/tt-gds-action/gl_test@tt09
91+
- name: Test Summary
92+
if: always()
93+
uses: test-summary/action@v2.3
94+
with:
95+
paths: ${{ env.TEST_DIR }}/results.xml
3996

4097
viewer:
4198
needs: gds

info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ project:
88
clock_hz: 4000000 # Clock frequency in Hz
99

1010
# How many tiles your design occupies? A single tile is about 167x108 uM.
11-
tiles: "1x1" # Valid values: 1x1, 1x2, 2x2, 3x2, 4x2, 6x2 or 8x2
11+
tiles: "1x1" # Valid values: 1x1, 1x2, 2x2, 3x2, 4x2 or 6x2
1212

1313
# Your top module name must start with "tt_um_". Make it unique by including your github username:
1414
top_module: "tt_um_rejunity_sn76489"

src/config.json

Lines changed: 12 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -11,74 +11,25 @@
1111

1212
"//": "Here are some of the variables you may want to change:",
1313

14-
"//": "PL_TARGET_DENSITY_PCT - You can increase this if Global Placement fails with error GPL-0302.",
15-
"//": "Users have reported that values up to 80 worked well for them.",
16-
"PL_TARGET_DENSITY_PCT": 80,
14+
"PLACE_DENSITY": 0.8,
15+
"TNS_END_PERCENT": 100,
1716

18-
"//": "CLOCK_PERIOD - Increase this in case you are getting setup time violations.",
19-
"//": "The value is in nanoseconds, so 20ns == 50MHz.",
20-
"CLOCK_PERIOD": 20,
17+
"//": "Change the clock period here. 20000 ps = 20 ns corresponds to 50 MHz",
18+
"ABC_CLOCK_PERIOD_IN_PS": 20000,
2119

22-
"//": "Hold slack margin - Increase them in case you are getting hold violations.",
23-
"PL_RESIZER_HOLD_SLACK_MARGIN": 0.1,
24-
"GRT_RESIZER_HOLD_SLACK_MARGIN": 0.05,
20+
"//": "Increase this if you are getting 'Synthesized memory size exceeds maximum allowed bits' error:",
21+
"SYNTH_MEMORY_MAX_BITS": 4096,
2522

26-
"//": "RUN_LINTER, LINTER_INCLUDE_PDK_MODELS - Disabling the linter is not recommended!",
27-
"RUN_LINTER": 1,
28-
"LINTER_INCLUDE_PDK_MODELS": 1,
23+
"//": "Setting to 1 may help decrease design area utilization / speed up routing:",
24+
"ABC_AREA": 0,
2925

30-
"//": "If you need a custom clock configuration, read the following documentation first:",
31-
"//": "https://tinytapeout.com/faq/#how-can-i-map-an-additional-external-clock-to-one-of-the-gpios",
32-
"CLOCK_PORT": "clk",
33-
34-
"//": "Configuration docs: https://openlane.readthedocs.io/en/latest/reference/configuration.html",
26+
"//": "Configuration docs: https://openroad-flow-scripts.readthedocs.io/en/latest/user/FlowVariables.html",
3527

3628
"//": "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
3729
"//": "!!! DO NOT CHANGE ANYTHING BELOW THIS POINT !!!",
3830
"//": "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
3931

40-
"//": "Save some time",
41-
"RUN_KLAYOUT_XOR": 0,
42-
"RUN_KLAYOUT_DRC": 0,
43-
44-
"//": "Don't put clock buffers on the outputs",
45-
"DESIGN_REPAIR_BUFFER_OUTPUT_PORTS": 0,
46-
47-
"//": "Reduce wasted space",
48-
"TOP_MARGIN_MULT": 1,
49-
"BOTTOM_MARGIN_MULT": 1,
50-
"LEFT_MARGIN_MULT": 6,
51-
"RIGHT_MARGIN_MULT": 6,
52-
53-
"//": "Absolute die size",
54-
"FP_SIZING": "absolute",
55-
56-
"GRT_ALLOW_CONGESTION": 1,
57-
58-
"FP_IO_HLENGTH": 2,
59-
"FP_IO_VLENGTH": 2,
60-
61-
"FP_PDN_VPITCH": 38.87,
62-
63-
"//": "Use alternative efabless decap cells to solve LI density issue",
64-
"DECAP_CELL": [
65-
"sky130_fd_sc_hd__decap_3",
66-
"sky130_fd_sc_hd__decap_4",
67-
"sky130_fd_sc_hd__decap_6",
68-
"sky130_fd_sc_hd__decap_8",
69-
"sky130_ef_sc_hd__decap_12"
70-
],
71-
72-
"//": "Clock",
73-
"RUN_CTS": 1,
74-
75-
"//": "Don't use power rings or met5 layer",
76-
"FP_PDN_MULTILAYER": 0,
77-
"RT_MAX_LAYER": "met4",
78-
79-
"//": "MAGIC_DEF_LABELS may cause issues with LVS",
80-
"MAGIC_DEF_LABELS": 0,
81-
82-
"//": "Only export pin area in LEF (without any connected nets)",
83-
"MAGIC_WRITE_LEF_PINONLY": 1
32+
"//": "Power nets for IR drop analysis",
33+
"PWR_NETS_VOLTAGES": "{VPWR 1.2}",
34+
"GND_NETS_VOLTAGES": "{VGND 0.0}"
8435
}

test/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ else
2121
SIM_BUILD = sim_build/gl
2222
COMPILE_ARGS += -DGL_TEST
2323
COMPILE_ARGS += -DFUNCTIONAL
24-
COMPILE_ARGS += -DUSE_POWER_PINS
2524
COMPILE_ARGS += -DSIM
26-
COMPILE_ARGS += -DUNIT_DELAY=\#1
27-
VERILOG_SOURCES += $(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/verilog/primitives.v
28-
VERILOG_SOURCES += $(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/verilog/sky130_fd_sc_hd.v
25+
VERILOG_SOURCES += $(PDK_ROOT)/ihp-sg13g2/libs.ref/sg13g2_io/verilog/sg13g2_io.v
26+
VERILOG_SOURCES += $(PDK_ROOT)/ihp-sg13g2/libs.ref/sg13g2_stdcell/verilog/sg13g2_stdcell.v
2927

3028
# this gets copied in by the GDS action workflow
3129
VERILOG_SOURCES += $(PWD)/gate_level_netlist.v

test/tb.v

Lines changed: 28 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,37 @@
11
`default_nettype none
2-
`timescale 1ns/1ps
2+
`timescale 1ns / 1ps
33

4-
/*
5-
this testbench just instantiates the module and makes some convenient wires
6-
that can be driven / tested by the cocotb test.py
4+
/* This testbench just instantiates the module and makes some convenient wires
5+
that can be driven / tested by the cocotb test.py.
76
*/
8-
9-
// testbench is controlled by test.py
107
module tb ();
118

12-
// this part dumps the trace to a vcd file that can be viewed with GTKWave
13-
initial begin
14-
$dumpfile ("tb.vcd");
15-
$dumpvars (0, tb);
16-
#1;
17-
end
18-
19-
// wire up the inputs and outputs
20-
wire [7:0] ui_in;
21-
wire [7:0] uo_out;
22-
wire [7:0] uio_in;
23-
wire [7:0] uio_out;
24-
wire [7:0] uio_oe;
25-
wire clk;
26-
wire rst_n;
27-
wire ena;
28-
`ifdef GL_TEST
29-
wire VPWR = 1'b1;
30-
wire VGND = 1'b0;
31-
`endif
9+
// Dump the signals to a VCD file. You can view it with gtkwave.
10+
initial begin
11+
$dumpfile("tb.vcd");
12+
$dumpvars(0, tb);
13+
#1;
14+
end
3215

16+
// Wire up the inputs and outputs:
17+
reg clk;
18+
reg rst_n;
19+
reg ena;
20+
reg [7:0] ui_in;
21+
reg [7:0] uio_in;
22+
wire [7:0] uo_out;
23+
wire [7:0] uio_out;
24+
wire [7:0] uio_oe;
3325

34-
tt_um_rejunity_sn76489 tt_um_rejunity_sn76489_uut
35-
(
36-
// include power ports for the Gate Level test
37-
`ifdef GL_TEST
38-
.VPWR(VPWR),
39-
.VGND(VGND),
40-
`endif
41-
.ui_in (ui_in), // Dedicated inputs
42-
.uo_out (uo_out), // Dedicated outputs
43-
.uio_in (uio_in), // IOs: Input path
44-
.uio_out (uio_out), // IOs: Output path
45-
.uio_oe (uio_oe), // IOs: Enable path (active high: 0=input, 1=output)
46-
.ena (ena), // enable - goes high when design is selected
47-
.clk (clk), // clock
48-
.rst_n (rst_n) // not reset
49-
);
26+
tt_um_rejunity_sn76489 tt_um_rejunity_sn76489_uut (
27+
.ui_in (ui_in), // Dedicated inputs
28+
.uo_out (uo_out), // Dedicated outputs
29+
.uio_in (uio_in), // IOs: Input path
30+
.uio_out(uio_out), // IOs: Output path
31+
.uio_oe (uio_oe), // IOs: Enable path (active high: 0=input, 1=output)
32+
.ena (ena), // enable - goes high when design is selected
33+
.clk (clk), // clock
34+
.rst_n (rst_n) // not reset
35+
);
5036

5137
endmodule

0 commit comments

Comments
 (0)