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

Add Yosys synthesys metrics parser to the LibreCores CI Docker image #28

Merged
merged 5 commits into from
Aug 16, 2019
Merged

Add Yosys synthesys metrics parser to the LibreCores CI Docker image #28

merged 5 commits into from
Aug 16, 2019

Conversation

Nancy-Chauhan
Copy link
Member

@Nancy-Chauhan Nancy-Chauhan commented Aug 12, 2019

From discussions at openrisc/mor1kx#87

Adds scripts specifically used in Jenkins builds

CC @oleg-nenashev @stffrdhrn

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Why is this only in OpenRISC? Yosys comes from the main image.
Also, there should be some kind of documentation for the introduced scripts

@Nancy-Chauhan
Copy link
Member Author

Hi @oleg-nenashev, yosys.sh script is specific to openrisc so I wanted it to be in the openRISC image folder and yes I can shift extract.stats.py to the main librecores-ci folder as it can be used globally.

@oleg-nenashev
Copy link
Member

I am not sure yosys.sh should be in the image in the first place. Looks to be specific to a single project

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Aug 13, 2019 via email

…output Printing Statistics , also added to librecores-ci base image
@Nancy-Chauhan
Copy link
Member Author

Nancy-Chauhan commented Aug 13, 2019

@oleg-nenashev Changes Done! Regarding Documentation, I want to describe how we can make the use of extract-yosys-stats.py, which I can describe well once openrisc/mor1kx#87 the pr is merged. I will add it later . Will it be fine ? Also I have assumed as per the sequence that new released version would be 0.4.0

@stffrdhrn
Copy link
Contributor

The reason I asked the yosys.sh script to be added to the docker image is that the way it is written it only works when run from this docker image.

The mor1kx bit could be extracted to and env var as 'top_level'. The script is shared between mor1kx and or1k_marocchino.

If we want to keep it in mor1kx then it needs explaination,. Or keep it in a directory called ci/ or something.

@stffrdhrn
Copy link
Contributor

I see you have updated the yosys.sh script in mor1kx. So this is good now. I still this could be made generic and stored in the image but that can be saved for later.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

We need some documentation for extract-yosys-stats.py in the LCCI image before merging

@Nancy-Chauhan
Copy link
Member Author

Nancy-Chauhan commented Aug 15, 2019

@oleg-nenashev I have added the documentation. Please let me know if changes required

@oleg-nenashev oleg-nenashev changed the title Add Yosys specific test scripts Add Yosys synthesys metrics parser to the LibreCores CI Docker image Aug 16, 2019
@oleg-nenashev oleg-nenashev merged commit 5e2d0a4 into librecores:master Aug 16, 2019
Copy link
Contributor

@stffrdhrn stffrdhrn left a comment

Choose a reason for hiding this comment

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

documentation comments, technically ok for me


### Quick Start
Librecores CI image for OpenRISC development is based on the standard [Librecores-CI](https://github.com/librecores/docker-images/tree/master/librecores-ci) docker image and it largely targets the [FuseSoC](https://github.com/olofk/fusesoc) use cases. This image mainly focuses on [OpenRISC](https://github.com/openrisc) project that creates a free and open processor for embedded systems.

Copy link
Contributor

Choose a reason for hiding this comment

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

It may be good to note that the image is used in mor1kx and or1k_marocchino.

To use Yosys Parser, you can see its implementation in <a href="https://github.com/openrisc/mor1kx">openrisc project<a>.

One can quickly get started with Fusesoc, a package manager and a set of build tools for HDL (Hardware Description Language) code.
Fusesoc provides the <a href = "https://github.com/olofk/edalize">icestorm backend</a> ( edalize ) which uses yosys to handle synthesis, arachne-pnr for place & route and icepack for creating the bitstream.
Copy link
Contributor

Choose a reason for hiding this comment

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

Its probably better to use a markdown style link here.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can mention:
- ...bitstream; in our case we set pnr: none as we are only interested in synthesis results.

@@ -25,3 +26,49 @@ The [or1k Continuous Integration (CI) suite](https://github.com/openrisc/or1k-te
Librecores-CI docker container in [Travis-CI](https://github.com/openrisc/mor1kx/blob/master/.travis.yml).
Parallel execution of tests runs in Librecores-CI docker environment. As a reference one can follow up the [blog](http://nancychauhan.in/stories/2019/06/08/gsoc-week1_2/) to get an idea of how librecores docker images can be
integrated to existing continuous integration suite.

#### Yosys Parser
Yosys is a framework for Verilog RTL synthesis. For monitoring resource usages of any hardware project, this parser script (extract-yosys-stats.py) can help to visualise results better. This take input from huge yosys.log file and outputs 'Printing Statistics' like :
Copy link
Contributor

Choose a reason for hiding this comment

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

Grammar:

  • This takes input from the huge ...


#### Quick Start

To use Yosys Parser, you can see its implementation in <a href="https://github.com/openrisc/mor1kx">openrisc project<a>.
Copy link
Contributor

Choose a reason for hiding this comment

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

Some grammer:

  • To use the yosys parser
  • you can see it's

However, I would just replace the sentence with:

  • You can see an example of this yosys parser script in the mor1kx OpenRISC cpu Jenkins test suite.

tools:
icestorm:
pnr: none
toplevel : {XYZ}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to maintain indentation here.

toplevel : {XYZ}
```

2) Once modification in core file is done, you are set to run yosys synthesis in librecores/librecores-ci docker environment
Copy link
Contributor

Choose a reason for hiding this comment

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

in the/your core file...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants