Skip to content

Commit

Permalink
finally understood it's a path situation with openlane
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Jun 18, 2024
1 parent 7345059 commit 9855920
Show file tree
Hide file tree
Showing 58 changed files with 857 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/* Generated by Yosys 0.38 (git sha1 543faed9c8c, clang++ 17.0.6 -fPIC -Os) */

(* top = 1 *)
(* generator = "Amaranth" *)
module top(phase_map_out, clk, rst, detector_in);
reg \$auto$verilog_backend.cc:2334:dump_module$1 = 0;
(* src = "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_57/lib/python3.10/site-packages/amaranth/hdl/ir.py:508" *)
input clk;
wire clk;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:139" *)
input [1:0] detector_in;
wire [1:0] detector_in;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:160" *)
reg [1:0] next_state = 2'h0;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:160" *)
reg [1:0] \next_state$next ;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:141" *)
output [1:0] phase_map_out;
reg [1:0] phase_map_out = 2'h0;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:141" *)
reg [1:0] \phase_map_out$next ;
(* src = "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_57/lib/python3.10/site-packages/amaranth/hdl/ir.py:508" *)
input rst;
wire rst;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:154" *)
reg [1:0] state = 2'h0;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:154" *)
reg [1:0] \state$next ;
always @(posedge clk)
state <= \state$next ;
always @(posedge clk)
next_state <= \next_state$next ;
always @(posedge clk)
phase_map_out <= \phase_map_out$next ;
always @* begin
if (\$auto$verilog_backend.cc:2334:dump_module$1 ) begin end
\state$next = next_state;
(* src = "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_57/lib/python3.10/site-packages/amaranth/hdl/xfrm.py:503" *)
if (rst) begin
\state$next = 2'h0;
end
end
always @* begin
if (\$auto$verilog_backend.cc:2334:dump_module$1 ) begin end
(* full_case = 32'd1 *)
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:165" *)
casez (detector_in)
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:168" */
2'h0:
\next_state$next = 2'h0;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:168" */
2'h1:
\next_state$next = 2'h1;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:168" */
2'h2:
\next_state$next = 2'h2;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:168" */
2'h3:
\next_state$next = 2'h3;
endcase
(* src = "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_57/lib/python3.10/site-packages/amaranth/hdl/xfrm.py:503" *)
if (rst) begin
\next_state$next = 2'h0;
end
end
always @* begin
if (\$auto$verilog_backend.cc:2334:dump_module$1 ) begin end
(* full_case = 32'd1 *)
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:165" *)
casez (detector_in)
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:168" */
2'h0:
\phase_map_out$next = 2'h0;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:168" */
2'h1:
\phase_map_out$next = 2'h2;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:168" */
2'h2:
\phase_map_out$next = 2'h3;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:168" */
2'h3:
\phase_map_out$next = 2'h3;
endcase
(* src = "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_57/lib/python3.10/site-packages/amaranth/hdl/xfrm.py:503" *)
if (rst) begin
\phase_map_out$next = 2'h0;
end
end
endmodule
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TruthTableModule
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python
from distutils.core import setup

setup(name="TruthTableModule",
version="0.0.1",
description="Example empty piel project."
, author="Dario Quintero",
author_email="[email protected]",
url="https://github.com/daquintero/piel",
packages=['TruthTableModule'],
)
32 changes: 32 additions & 0 deletions docs/examples/02_digital_design_simulation/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from openlane.flows import SequentialFlow
from openlane.steps import Yosys, Misc, OpenROAD, Magic, Netgen

class MyFlow(SequentialFlow):
Steps = [
Yosys.Synthesis,
OpenROAD.Floorplan,
OpenROAD.TapEndcapInsertion,
OpenROAD.GeneratePDN,
OpenROAD.IOPlacement,
OpenROAD.GlobalPlacement,
OpenROAD.DetailedPlacement,
OpenROAD.GlobalRouting,
OpenROAD.DetailedRouting,
OpenROAD.FillInsertion,
Magic.StreamOut,
Magic.DRC,
Magic.SpiceExtraction,
Netgen.LVS
]

flow = MyFlow(
{
"PDK": "sky130A",
"DESIGN_NAME": "top",
"VERILOG_FILES": ["/home/daquintero/phd/piel/docs/examples/designs/amaranth_driven_flow/amaranth_driven_flow/src/truth_table_module.v"],
"CLOCK_PORT": "clk",
"CLOCK_PERIOD": 10,
},
design_dir=".",
)
flow.start()
32 changes: 32 additions & 0 deletions docs/examples/02_digital_design_simulation/truth_table_module.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Generated by Yosys 0.38 (git sha1 543faed9c8c, clang++ 17.0.6 -fPIC -Os) */

(* top = 1 *)
(* generator = "Amaranth" *)
module top(phase_map_out, detector_in);
reg \$auto$verilog_backend.cc:2334:dump_module$1 = 0;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:84" *)
input [1:0] detector_in;
wire [1:0] detector_in;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:88" *)
output [1:0] phase_map_out;
reg [1:0] phase_map_out;
always @* begin
if (\$auto$verilog_backend.cc:2334:dump_module$1 ) begin end
(* full_case = 32'd1 *)
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:114" *)
casez (detector_in)
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:117" */
2'h0:
phase_map_out = 2'h0;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:117" */
2'h1:
phase_map_out = 2'h2;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:117" */
2'h2:
phase_map_out = 2'h3;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:117" */
2'h3:
phase_map_out = 2'h3;
endcase
end
endmodule
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
schema_version: 1
schema: null
instances:
ps:
component: sky130_fd_pr__rf_pfet_01v8_mcM04W3p00L0p15
settings: {}
ns:
component: sky130_fd_pr__rf_nfet_01v8_aM02W1p65L0p15
settings: {}
placements:
ps: {x: null, y: null, port: null, rotation: 0, dx: null, dy: null, mirror: null}
ns: {x: null, y: null, port: null, rotation: 0, dx: null, dy: null, mirror: null}
routes:
r0:
routing_strategy: get_bundle
settings: {cross_section: xs_metal1, separation: 5.0}
links: {'ps,DRAIN': 'ns,SOURCE'}
r1:
routing_strategy: get_bundle
settings: {cross_section: xs_metal1, separation: 5.0}
links: {'ps,GATE': 'ns,GATE'}
r2:
routing_strategy: get_bundle
settings: {cross_section: xs_metal1, separation: 5.0}
links: {'ns,GATE': 'ps,GATE'}
r3:
routing_strategy: get_bundle
settings: {cross_section: xs_metal1, separation: 5.0}
links: {'ns,SOURCE': 'ps,DRAIN'}
ports: {}
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Generated by Yosys 0.38 (git sha1 543faed9c8c, clang++ 17.0.6 -fPIC -Os) */

(* top = 1 *)
(* generator = "Amaranth" *)
module top(phase_map_out, detector_in);
reg \$auto$verilog_backend.cc:2334:dump_module$1 = 0;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:84" *)
input [1:0] detector_in;
wire [1:0] detector_in;
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:88" *)
output [1:0] phase_map_out;
reg [1:0] phase_map_out;
always @* begin
if (\$auto$verilog_backend.cc:2334:dump_module$1 ) begin end
(* full_case = 32'd1 *)
(* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:114" *)
casez (detector_in)
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:117" */
2'h0:
phase_map_out = 2'h0;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:117" */
2'h1:
phase_map_out = 2'h2;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:117" */
2'h2:
phase_map_out = 2'h3;
/* src = "/home/daquintero/phd/piel/piel/tools/amaranth/construct.py:117" */
2'h3:
phase_map_out = 2'h3;
endcase
end
endmodule
Empty file.
1 change: 1 addition & 0 deletions docs/examples/designs/amaranth_driven_flow/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
amaranth_driven_flow
11 changes: 11 additions & 0 deletions docs/examples/designs/amaranth_driven_flow/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python
from distutils.core import setup

setup(name="amaranth_driven_flow",
version="0.0.1",
description="Example empty piel project."
, author="Dario Quintero",
author_email="[email protected]",
url="https://github.com/daquintero/piel",
packages=['amaranth_driven_flow'],
)
1 change: 1 addition & 0 deletions docs/examples/designs/inverter/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inverter
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
46 changes: 46 additions & 0 deletions docs/examples/designs/inverter/inverter/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"meta": {
"version": 2,
"flow": [
"Yosys.Synthesis",
"OpenROAD.CheckSDCFiles",
"OpenROAD.Floorplan",
"OpenROAD.TapEndcapInsertion",
"OpenROAD.GeneratePDN",
"OpenROAD.IOPlacement",
"OpenROAD.GlobalPlacement",
"OpenROAD.RepairDesign",
"OpenROAD.DetailedPlacement",
"OpenROAD.GlobalRouting",
"OpenROAD.DetailedRouting",
"OpenROAD.FillInsertion",
"Magic.StreamOut",
"Magic.DRC",
"Checker.MagicDRC",
"Magic.SpiceExtraction",
"Netgen.LVS",
"Checker.LVS"
]
},
"DESIGN_NAME": "inverter",
"VERILOG_FILES": "dir::src/*.v",
"CLOCK_PORT": null,
"FP_SIZING": "absolute",
"DIE_AREA": [
0,
0,
50,
50
],
"PL_TARGET_DENSITY": 0.75,
"FP_PDN_AUTO_ADJUST": false,
"FP_PDN_VPITCH": 25,
"FP_PDN_HPITCH": 25,
"FP_PDN_VOFFSET": 5,
"FP_PDN_HOFFSET": 5,
"//": "With those two defined, the repair design step should do nothing:",
"RSZ_DONT_TOUCH_RX": "^in$",
"RSZ_DONT_TOUCH_LIST": [
"out"
]
}
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
22 changes: 22 additions & 0 deletions docs/examples/designs/inverter/inverter/src/inverter.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2020 Matt Venn
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

`default_nettype none
module inverter (
input wire in,
output out );

assign out = !in;

endmodule
Empty file.
11 changes: 11 additions & 0 deletions docs/examples/designs/inverter/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python
from distutils.core import setup

setup(name="inverter",
version="0.0.1",
description="Example empty piel project."
, author="Dario Quintero",
author_email="[email protected]",
url="https://github.com/daquintero/piel",
packages=['inverter'],
)
46 changes: 46 additions & 0 deletions docs/examples/designs/inverter1/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"meta": {
"version": 2,
"flow": [
"Yosys.Synthesis",
"OpenROAD.CheckSDCFiles",
"OpenROAD.Floorplan",
"OpenROAD.TapEndcapInsertion",
"OpenROAD.GeneratePDN",
"OpenROAD.IOPlacement",
"OpenROAD.GlobalPlacement",
"OpenROAD.RepairDesign",
"OpenROAD.DetailedPlacement",
"OpenROAD.GlobalRouting",
"OpenROAD.DetailedRouting",
"OpenROAD.FillInsertion",
"Magic.StreamOut",
"Magic.DRC",
"Checker.MagicDRC",
"Magic.SpiceExtraction",
"Netgen.LVS",
"Checker.LVS"
]
},
"DESIGN_NAME": "inverter",
"VERILOG_FILES": "dir::src/*.v",
"CLOCK_PORT": null,
"FP_SIZING": "absolute",
"DIE_AREA": [
0,
0,
50,
50
],
"PL_TARGET_DENSITY": 0.75,
"FP_PDN_AUTO_ADJUST": false,
"FP_PDN_VPITCH": 25,
"FP_PDN_HPITCH": 25,
"FP_PDN_VOFFSET": 5,
"FP_PDN_HOFFSET": 5,
"//": "With those two defined, the repair design step should do nothing:",
"RSZ_DONT_TOUCH_RX": "^in$",
"RSZ_DONT_TOUCH_LIST": [
"out"
]
}
Loading

0 comments on commit 9855920

Please sign in to comment.