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

How can i make PyOCN EDA script? #24

Open
JHL0503 opened this issue Oct 8, 2020 · 5 comments
Open

How can i make PyOCN EDA script? #24

JHL0503 opened this issue Oct 8, 2020 · 5 comments

Comments

@JHL0503
Copy link

JHL0503 commented Oct 8, 2020

Hi i'm trying to use this pymtl3-net (is it same with PyOCN?)

I have never used python before, so it is little bit hard for me....

After git clone there are several file which one should i run?

  1. ./example/main.py
  2. ./script/pymtl3-net
  3. ./script/pymtl3-net_test.py
  4. ./setup.py

I tested "./script/pymtl3-net mesh --ncols 4 --nrows 4" then get "mehs-pickled.v". Am i doing right??

And in the PyOCN paper, the Floorplan and PyOCN EDA script are described.
How can i get those? I just found sim and gen at pymtl3-net script... And gen made only verilog file... Does the verilog file already involve some kind of Floorplan?? (I don't have any experience with EDA tool.. sorry)

@cbatten
Copy link

cbatten commented Oct 8, 2020

Thanks for your interest in PyOCN! Yes ... PyOCN == pymtl3-net. If you want to use PyOCN effectively you will probably need to learn a little python ... but basically the easiest way to use PyOCN is just to pip install it in a virtual environment like this:

 % python3 -m venv ${HOME}/venv/pymtl3
 % source ${HOME}/venv/pymtl3/bin/activiate
 % pip install pymtl3-net

Then you can use the pymtl3-net front-end script to try it out.

 # To test a 4-terminal ring with a single packet
 % pymtl3-net test ring --nterminals 4 --dump-vcd

 # To simulate a 2x2 mesh with specific injection rate:
 % pymtl3-net sim mesh --ncols 2 --nrows 2 --injection-rate 10 -v

 # To simulate a 2x2 mesh across injection rates
 % pymtl3-net sim mesh --ncols 2 --nrows 2 --sweep -v

 # To generate a 4x4 mesh Verilog RTL
 % pymtl3-net gen mesh --ncols 4 --nrows 4

You can also of course git clone the repo and run our tests and/or the front-end script directly. You will need to install PyMTL3 in a virtual environment though since PyOCN depends on PyMTL3.

 % git clone git@github.com:cornell-brg/pymtl3-net
 % cd pymtl3-net
 % mkdir build
 % cd build
 % ../scripts/pymtl3-net test ring --nterminals 4 --dump-vcd
 ...

I just tried the above commands and it looks like there might be an issue. @yo96 can you verify that both pip installing pymtl3-net and working in a cloned repo works with the above commands?

RE: EDA scripts ... that is a bit trickier. The EDA scripts rely on various commercial EDA tools so we cannot make them publicly available. However, if you reach out to me via email I can talk to you about how you could get access. You would need to already have confirmed access to the right EDA tools though (you need the tools anyway to be able to use the EDA scripts). If you don't have any experience with EDA tools that could be tricky though ... the scripts are meant for researchers that already have some experience working with Synopsys Design Compiler and Cadence Innovus ...

I should also mention that we have never really been happy with the way our EDA scripts were setup. We are currently in the process of rethinking how they work, and eventually we hope to have the updated EDA scripts (possibly with open-source versions that we can make public) available ... but that will likely take quite a while.

@yo96
Copy link
Contributor

yo96 commented Oct 8, 2020

Hi! Thank you for your interest!

After git clone there are several file which one should i run?

example/main.py is the old frontend script and it is deprecated. You can run script/pymtl3-net with commands that Chris just showed above. You can also use pytest to manually run all the tests manually like this:

 % git clone git@github.com:cornell-brg/pymtl3-net
 % cd pymtl3-net
 % mkdir build
 % cd build
 # run tests in pure python simulation
 % pytest ../ -v
 # run tests using translated verilog
 % pytest ../ -v --test-verilog

As for the issues for the frontend script that Chris just mentioned, it's due to some recent changes in PyMTL3 and it should be fixed now.

In the paper we manually wrote python scripts to generate the floorplan scripts and based on information provided by PyOCN like the width and height of each router. As Chris just said, we are currently thinking how to make this process much more automated and provide some examples using open-source EDA flow.

@JHL0503
Copy link
Author

JHL0503 commented Oct 8, 2020

Thanks for your interest in PyOCN! Yes ... PyOCN == pymtl3-net. If you want to use PyOCN effectively you will probably need to learn a little python ... but basically the easiest way to use PyOCN is just to pip install it in a virtual environment like this:

 % python3 -m venv ${HOME}/venv/pymtl3
 % source ${HOME}/venv/pymtl3/bin/activiate
 % pip install pymtl3-net

Then you can use the pymtl3-net front-end script to try it out.

 # To test a 4-terminal ring with a single packet
 % pymtl3-net test ring --nterminals 4 --dump-vcd

 # To simulate a 2x2 mesh with specific injection rate:
 % pymtl3-net sim mesh --ncols 2 --nrows 2 --injection-rate 10 -v

 # To simulate a 2x2 mesh across injection rates
 % pymtl3-net sim mesh --ncols 2 --nrows 2 --sweep -v

 # To generate a 4x4 mesh Verilog RTL
 % pymtl3-net gen mesh --ncols 4 --nrows 4

You can also of course git clone the repo and run our tests and/or the front-end script directly. You will need to install PyMTL3 in a virtual environment though since PyOCN depends on PyMTL3.

 % git clone git@github.com:cornell-brg/pymtl3-net
 % cd pymtl3-net
 % mkdir build
 % cd build
 % ../scripts/pymtl3-net test ring --nterminals 4 --dump-vcd
 ...

I just tried the above commands and it looks like there might be an issue. @yo96 can you verify that both pip installing pymtl3-net and working in a cloned repo works with the above commands?

RE: EDA scripts ... that is a bit trickier. The EDA scripts rely on various commercial EDA tools so we cannot make them publicly available. However, if you reach out to me via email I can talk to you about how you could get access. You would need to already have confirmed access to the right EDA tools though (you need the tools anyway to be able to use the EDA scripts). If you don't have any experience with EDA tools that could be tricky though ... the scripts are meant for researchers that already have some experience working with Synopsys Design Compiler and Cadence Innovus ...

I should also mention that we have never really been happy with the way our EDA scripts were setup. We are currently in the process of rethinking how they work, and eventually we hope to have the updated EDA scripts (possibly with open-source versions that we can make public) available ... but that will likely take quite a while.

Really thank you for detail reply!!!!

To sure that i understand the answer correctly, may i reorganize your reply?

At Figure 1 in the PyOCN paper, There are three things "Verilog" "Floorplan" "PyOCN EDA script"

"PyOCN EDA script" is made with "Verilog" and "Floorplan".(At Figure 1 Verilog and Floorplan point the EDA script)

I can get a "Verilog" using command such as
% pymtl3-net gen mesh --ncols 4 --nrows 4

At this point, you mean,

But I can not get a "Floorplan" and "PyOCN EDA script" just using command gen or something.

Or

I also can get a "Floorplan" using command such as
% pymtl3-net gen Floorplan --ncols 4 --nrows 4
But to get "PyOCN EDA script" i have to do something(E.g load verilog and floorplan at EDA tool then ~~~ etc).

@yo96
Copy link
Contributor

yo96 commented Oct 8, 2020

For now there isn't a command to directly generate the EDA scripts. You can write a script to extract floorplan information from the network and generate corresponding scripts for your ASIC tool flow. You can email @cbatten to talk about setting up and getting access to the ASIC flow if you are interested.

@JHL0503
Copy link
Author

JHL0503 commented Oct 8, 2020

For now there isn't a command to directly generate the EDA scripts. You can write a script to extract floorplan information from the network and generate corresponding scripts for your ASIC tool flow. You can email @cbatten to talk about setting up and getting access to the ASIC flow if you are interested.

Really thank you!!!

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

No branches or pull requests

3 participants