-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Initial for layout gui #40
base: main
Are you sure you want to change the base?
Conversation
collision_map[ent_name] = True | ||
collision_map[o_name] = True | ||
|
||
for ent_name, data in class_ref.layout_info.items(): |
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.
It might make sense to use an enum for cell states (good/violating/bad) but I decided to go with assigning the color and checking against it. Macros wouldn't really add much value here (imo) and wouldn't really shrink the code.
layout_state
seems to be unused, I decided to axe it's user for now. tldr on it, is that it contains the worst offender of the entire design.
This reverts commit 97e771c.
# meaning that this behaves _exactly_ like a method of LayoutTool with two exceptions: | ||
# - you cannot call layout_tool_instance.callback() | ||
# - instead of self. you need to use class_ref. | ||
def callback(class_ref, event,x,y,flags,param): |
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.
refer to collect.py:238
|
||
self.pointerbound = None | ||
|
||
# values for the color scheme, these should probably be in config? |
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.
Not sure how much configuration we want here. right now I've stolen the discord theme, but It might make sense to keep it in config file for accessibility sake
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.
not important for me
|
||
logging.info(f"parsed {p.instance_name}, size is {caravel_data}") | ||
instance_name = p.instance_name.replace("wrapped_", "") | ||
self.layout_info[instance_name] = { |
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.
It could make sense to have a class for layout instance?
@@ -166,6 +166,7 @@ def __init__(self, args, repo, commit, pos, system_config): | |||
self.lef_filename = os.path.join(self.config['final']['directory'], self.config['final']['lef_filename']) | |||
self.title = self.config['project']['title'] | |||
self.instance_name = self.module_name | |||
self.interfaces = [] |
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.
this obviously isn't right, but I have no clue where openram signals are defined
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.
in projects.yaml - in the openram_support section
|
||
self.layout_info = {} | ||
for p in collection.projects + collection.shared_projects: | ||
size = p.get_gds_size() |
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.
would be nice to cache this
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.
What are the coloured lines drawn between macros?
@@ -166,6 +166,7 @@ def __init__(self, args, repo, commit, pos, system_config): | |||
self.lef_filename = os.path.join(self.config['final']['directory'], self.config['final']['lef_filename']) | |||
self.title = self.config['project']['title'] | |||
self.instance_name = self.module_name | |||
self.interfaces = [] |
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.
in projects.yaml - in the openram_support section
|
||
self.pointerbound = None | ||
|
||
# values for the color scheme, these should probably be in config? |
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.
not important for me
This is an initial PR adding GUI for manually laying out cells.
It is currently a work in progress, and this PR is meant for communication and documentation.
requirements: opencv
usage: run with
./multi_tool.py --openram --layout-tool --layout-tool-downscale=4
--layout-tool
instructs to run the tool--layout-tool-downscale=x
will downsample the image(configuration->user_area_[width/height]/x)
Currently this tool does nothing, besides letting user play around with it. Configuration is still lacking, as I am not sure how detailed it should be.