-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openframe] initial openframe support WiP
- Loading branch information
Showing
21 changed files
with
3,776 additions
and
34 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
pdk: | ||
die: | ||
width: 3166630 | ||
height: 4766630 | ||
margin: | ||
left: 3680 | ||
right: 250310 | ||
top: 5440 | ||
bottom: 1252070 | ||
site: | ||
width: 460 | ||
height: 2720 | ||
pwrgate: | ||
vdd: | ||
width: 9200 | ||
tracks: | ||
li1: | ||
x: | ||
offset: 230 | ||
pitch: 460 | ||
width: 170 | ||
y: | ||
offset: 170 | ||
pitch: 340 | ||
width: 170 | ||
met1: | ||
x: | ||
offset: 170 | ||
pitch: 340 | ||
width: 140 | ||
y: | ||
offset: 170 | ||
pitch: 340 | ||
width: 140 | ||
met2: | ||
x: | ||
offset: 230 | ||
pitch: 460 | ||
width: 140 | ||
y: | ||
offset: 230 | ||
pitch: 460 | ||
width: 140 | ||
met3: | ||
x: | ||
offset: 840 | ||
pitch: 680 | ||
width: 300 | ||
y: | ||
offset: 840 | ||
pitch: 680 | ||
width: 300 | ||
met4: | ||
x: | ||
offset: 46000 | ||
pitch: 920 | ||
width: 300 | ||
y: | ||
offset: 460 | ||
pitch: 920 | ||
width: 300 | ||
met5: | ||
x: | ||
offset: 1700 | ||
pitch: 3400 | ||
width: 1600 | ||
y: | ||
offset: 1700 | ||
pitch: 3400 | ||
width: 1600 | ||
tt: | ||
grid: # In number of blocks | ||
x: 16 # Must be divisible by 4 | ||
y: 24 # Must be EVEN | ||
block: | ||
w: -1 | ||
h: -1 | ||
margin: # In 'sites' | ||
x: 4 | ||
y: 1 | ||
uio: | ||
a: 8 | ||
i: 10 | ||
o: 8 | ||
io: 8 | ||
spine: | ||
vlayer: 'met4' | ||
hlayer: 'met3' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ gds/*.gds | |
verilog/*.v | ||
spef/*.spef | ||
config-tmp.json | ||
CustomApplyDEFTemplate/__pycache__ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import os | ||
from openlane.steps import Step | ||
from openlane.steps.odb import ApplyDEFTemplate | ||
from .__version__ import __version__ | ||
from typing import List, Optional | ||
from openlane.config import Variable | ||
|
||
|
||
@Step.factory.register() | ||
class CustomApplyDEFTemplate(ApplyDEFTemplate): | ||
""" | ||
This is a custom step that overrides the ApplyDEFTemplate step, to a custom apply_def_template.py | ||
This custom step is for openframe to generate the correct power pins | ||
""" | ||
|
||
id = "CustomApplyDEFTemplate.CustomApplyDEFTemplate" | ||
name = "Custom Apply DEF Template" | ||
|
||
config_vars = ApplyDEFTemplate.config_vars + [ | ||
Variable( | ||
"FP_TEMPLATE_PINS", | ||
Optional[List[str]], | ||
"Adds Pins that will be forced into the design from the def template", | ||
), | ||
] | ||
|
||
def get_script_path(self): | ||
return os.path.join(os.path.dirname(os.path.abspath(__file__)), "apply_def_template.py") | ||
|
||
def get_command(self) -> List[str]: | ||
template_args = [] | ||
for pin in self.config["FP_TEMPLATE_PINS"]: | ||
template_args.append("-t") | ||
template_args.append(pin) | ||
template_args.append("-d") | ||
template_args.append(self.config["FP_DEF_TEMPLATE"]) | ||
return super().get_command() + template_args |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2023 Efabless Corporation | ||
# | ||
# 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. | ||
__version__ = "1.0.0" | ||
|
||
if __name__ == "__main__": | ||
print(__version__, end="") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright 2020 Efabless Corporation | ||
# | ||
# 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. | ||
import sys | ||
import os | ||
from openlane.common.misc import get_openlane_root | ||
sys.path.insert(0, os.path.join(get_openlane_root(), "scripts", "odbpy")) | ||
|
||
import defutil_ol2 | ||
|
||
from reader import click_odb, click | ||
|
||
|
||
@click.command() | ||
@click.option("-d", "--def-template", required=True, help="Template DEF") | ||
@click.option("-t", "--template-pins", required=True, multiple=True, help="Template DEF") | ||
@click_odb | ||
def cli(reader, input_lefs, def_template, template_pins): | ||
defutil_ol2.relocate_pins( | ||
reader.db, | ||
input_lefs, | ||
def_template, | ||
template_pins | ||
) | ||
|
||
defutil_ol2.move_diearea( | ||
reader.db, | ||
input_lefs, | ||
def_template, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
cli() |
Oops, something went wrong.