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

hemaia util #20

Merged
merged 3 commits into from
Aug 27, 2024
Merged

hemaia util #20

merged 3 commits into from
Aug 27, 2024

Conversation

IveanEx
Copy link

@IveanEx IveanEx commented Aug 27, 2024

This PR introduces the hemaia/util.py. The aim of this dedicated script is to increase the level of automation during rtl generation and house the small function that retrieves information from cfg and irrelevant to rtl code.

Possible usage:

  • Generate targets for Bender
  • Generate filelist for FPGA / Backend flow
  • Generate runtime software

@IveanEx IveanEx requested a review from rgantonio August 27, 2024 17:01
Copy link

@rgantonio rgantonio left a comment

Choose a reason for hiding this comment

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

OK!

A few thoughts that you might want to consider.

  1. Maybe call it hemaia_util.py so that it's not too generic hehe. Also the idea is, just in case someone calls their modules util.py at least ours is a unique name. I'll leave it up to you if you want to change.

  2. Would you mind if I add later, a listing CI? I will also teach you how to use pre-commits for formatting. Haha let me know if you want this feature then I will try to add it.

SNAX_CFGS += cfg/cluster_cfg/snax_KUL_cluster.hjson
SNAX_CFGS += cfg/cluster_cfg/snax_KUL_xdma_cluster.hjson

SNAX_CFGS = $(shell python3 $(HEMAIA_UTIL) --cfg_path $(CFG) --print_clusters)

Choose a reason for hiding this comment

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

Do you need to call python3? I think when you put the bash comment on top of util.py it's supposed to run by just ./util/hemaia/util.py. Can you try with the docker?

Also this assumes you use the SNAX docker yes?

@IveanEx
Copy link
Author

IveanEx commented Aug 27, 2024

OK!

A few thoughts that you might want to consider.

  1. Maybe call it hemaia_util.py so that it's not too generic hehe. Also the idea is, just in case someone calls their modules util.py at least ours is a unique name. I'll leave it up to you if you want to change.
  2. Would you mind if I add later, a listing CI? I will also teach you how to use pre-commits for formatting. Haha let me know if you want this feature then I will try to add it.

It is in hemaia folder, so I think it is still fine😃😃

What is the listing CI? I don't know it. By the way, I had spent too many time on the Makefile to generate targets dynamically... I suggest we move rtl target to Python😭😭

@rgantonio
Copy link

@IveanEx I will do the CI thing in a different PR. I think this is a nice first step.

I also agree. I don't like how we need to comply with Makefiles... I mean there's a Python generation that is easier to do.

The Makefile thing is only useful for C builds and so. But to generate RTL, make some filelists and all... they should not be in Makefiles. It only makes things more difficult...

@IveanEx IveanEx merged commit 5f0d5bb into main Aug 27, 2024
2 checks passed
@IveanEx IveanEx deleted the ydeng/hemaia_util branch August 27, 2024 19:02
Konste11ation pushed a commit that referenced this pull request Aug 31, 2024
* Initial Commit

* Update CI

* Bug Fix
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.

2 participants