Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local OpenLane Installs + Colaboratory #143

Merged
merged 4 commits into from
Mar 21, 2022
Merged

Local OpenLane Installs + Colaboratory #143

merged 4 commits into from
Mar 21, 2022

Conversation

mohamedleithy
Copy link
Collaborator

@mohamedleithy mohamedleithy commented Mar 16, 2022

  • Added new option "--using-local-openlane" that allows for dockerless operation
  • Modified "openlane_harden" to allow enabling disabling KLAYOUT and CVC in case of using a local openlane install

@donn donn changed the title Dockerless DFFRAM Local OpenLane Installs + Colaboratory Mar 21, 2022
@donn donn merged commit e4c5998 into main Mar 21, 2022
@donn donn deleted the dffram-dockerless branch March 21, 2022 13:34
Copy link
Contributor

@proppy proppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I missed this PR, added a few comments afterwards. I'd be happy to send PR to implement the ones you agree with.

env["RUN_KLAYOUT"] = "0"
env["RUN_CVC"] = "0"
env["PDK_ROOT"] = pdk_root
env["MISMATCHES_OK"] = "1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what abouy moving this to the notebook instead? (as it's quite specific to this environment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, agreed.

@@ -496,6 +515,12 @@ def openlane_harden(
default=False,
help="Open the last def in Klayout. (Default: False)",
)
@click.option(
"--using-local-openlane",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about using --openlane-root instead? (to match the other --pdk-root option)

},
"outputs": [],
"source": [
"!conda install -y -c litex-hub -c conda-forge open_pdks.sky130a=1.0.290 magic openroad netgen yosys gdstk"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think of adding an environment.yml file to the repo (see https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file) ? so that conda user can also easily install dependencies outside of notebooks.

For example:

channels:
  - litex-hub
  - conda-forge
dependencies:
  - open_pdks.sky130a=1.0.290
  - magic
  - openroad
  - netgen
  - yosys
  - gdstk
  - tcllib
  - python
  - pip
  - pip:
    - pyyaml
    - click
    - pandas

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a great idea. I'll do that.

"!git clone https://github.com/Cloud-V/DFFRAM --branch dffram-dockerless\n",
"%cd /content/DFFRAM\n",
"\n",
"%env NO_CHECK_INSTALL=1\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why this is displayed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason not to.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must confess I don't understand what you're asking here.

dffram.ipynb Show resolved Hide resolved

subprocess.check_call(args, env=env)
else:
run_docker(f"efabless/openlane:{openlane_version}", args)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious if you still need the run_docker logic here, wouldn't it just work if you instructed the user to do the equivalent of make mount w/ something like:

docker run -ti -v $(pwd):/mnt/dffram -w /mnt/dffram -v $PDK_ROOT:/mnt/pdkroot -e PDK_ROOT=/mnt/pdkroot efabless/openlane

before running dffram.py.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm weary of replicating OpenLane's make mount.

dffram.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants