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

Renode notebook #19

Open
wants to merge 1 commit into
base: tuning
Choose a base branch
from
Open

Renode notebook #19

wants to merge 1 commit into from

Conversation

AdamOlech
Copy link

This pull requests adds a Renode notebook to the silicone design module and changes TF scripts so that a build is re-triggered upon any change to the silicon_design files.

@github-actions
Copy link

github-actions bot commented Dec 2, 2022

Apache 2.0 License check successful!



```python
! pip install -q git+https://github.com/antmicro/renode-colab-tools.git # only needed in the Colab environment
Copy link
Owner

Choose a reason for hiding this comment

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

add those to the environment instead?

Copy link
Author

Choose a reason for hiding this comment

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

Sure, sounds like a good idea! We kept it here as Renode is not the main focus of the silicon_design notebook but I think it will be easier if it's just an implicit requirement.

Copy link
Owner

Choose a reason for hiding this comment

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

Yep, I don't mind adding new requirements that are notebook specific to the base image if it makes them easier to run and read.

! pip install -q robotframework==4.0.1 # testing framework used by Renode
# as the compilation process takes several minutes, we will conveniently skip it here and use precompiled binaries
! git clone https://github.com/antmicro/renode-colab-tutorial # repository with resources for this tutorial
! wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex/tools/litex_json2renode.py # a helper script
Copy link
Owner

Choose a reason for hiding this comment

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

Do it in provision.sh? Since it seems generally useful to all renode user.

Copy link
Author

Choose a reason for hiding this comment

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

Installing the robotframework package should be moved to provision.sh but I think that there's a benefit to keeping the remaining lines here as it allows to easily obtain the latest version of both the renode-colab-tutorial repo and the litex_json2renode script. What do you think?

Copy link
Owner

Choose a reason for hiding this comment

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

Ideally we'd want to run the notebooks as part of the build process to verify that they build with a given version of the environment.

We had something testing the silicon flow before with 15c86a8 but it'd be better to actually run the notebook with papermill (https://papermill.readthedocs.io/en/latest/).

Obviously this is outside of the scope of this change, but I wanted to let you know of the direction of consolidating / validating as much of the environment as possible in the image itself.

hpt_job.run(sync=True)
```

## Check the current state
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe split that in a different notebook? So that it's easier to do the analysis concurrently.

@@ -0,0 +1,24 @@
using "digilent_arty_generated.repl"
Copy link
Owner

Choose a reason for hiding this comment

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

Do you need to commit those? How do they get included in the notebook environment?

@@ -298,7 +298,9 @@ resource "google_notebooks_instance" "ai_notebook" {
metadata = {
terraform = "true"
proxy-mode = "service_account"
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add a comment about how it interact with post_startup_script?

Copy link
Author

Choose a reason for hiding this comment

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

I removed this one bit altogether as it didn't seem essential to this pull request, we might want to revisit it at a later time.

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