-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: tuning
Are you sure you want to change the base?
Renode notebook #19
Conversation
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
modules/silicon_design/main.tf
Outdated
@@ -298,7 +298,9 @@ resource "google_notebooks_instance" "ai_notebook" { | |||
metadata = { | |||
terraform = "true" | |||
proxy-mode = "service_account" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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.