-
To build mock-array-big, I write a long command line:
Wouldn't it be nice if I could record that option somewhere, so I can simply write Indeed, there are lots of commented out code in the ORFS Makefile to do just this: OpenROAD-flow-scripts/flow/Makefile Line 5 in df9a442 This got me thinking, what if there was a I coded that up in https://github.com/Pinata-Consulting/OpenROAD-flow-scripts/tree/openroad-settings, and it worked. Except now I want to add some more variables.... mock-array-big allows several other configuration variables that can be used to modify the dimensions of the design: width and height of array in number of elements, width of bus lines/data operated on inside the elements and also the pitch(distance) between two elements in the array. Why not allow putting those into the settings.mk too? This worked, except, the DIE/CORE_AREA are wrong. The problem is that the DIE/CORE_AREA must be calculated and the area depends on the values set in After learning more about make and how variables are expanded than I ever intended to learn, I've concluded that this nearly works, but can't be made to work without some further changes to the ORFS Makefile. What is needed is that the CORE/DIE_AREA is evaluated when the targets execute. At that point, all the environment variables are set as expected. Indeed there are many other aspects of the design that are calcualted when the target is executed and these environment variables are set. For instance, MACRO_PLACEMENT_TCL is evaluated while the environment variables are available. So what changes could be made to ORFS to make DIE/CORE_AREA computable based upon other environment variables? A general mechanism could be introduced where for instance DIE_AREA and CORE_AREA are evaluated when the target is executed. A strawman proposal to give an idea of how such a utility function would:
This may seem like a lot of bother to avoid some typing, but it's not the typing that is bothering me. The problem is that I see that when one is trying to debug some step of ORFS flow, then it is easy to forget setting a variable on the command line. This can in turn result in hours long wild goose chases... |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 19 replies
-
Why not just generate the config.mk that you need and then run make e.g. using a shell script? Not all problems need to be solved in Make. Or why not pass in the necessary variables as arguments to your .py script? |
Beta Was this translation helpful? Give feedback.
-
You can also just set it as an envar if you are working on the same design repeatedly. export DESIGN_CONFIG=designs/asap7/mock-array-big/config.mk |
Beta Was this translation helpful? Give feedback.
-
What I find frustrating with DIE/CORE_AREA, is that although I can calculate the positions of macros using environment variables from make, I can't calculate the areas. It would be more consistent if both DIE/CORE_AREA could be calculated. |
Beta Was this translation helpful? Give feedback.
-
Aha! I missed a spot during a review, which confused me w.r.t. when environment variables are evaluated: #1084 So now, it all makes sense and works. I articulated #1085 to implement the settings.mk feature and demonstrate on mock-array-big. Pretty neat actually when exploring configurations... See README.md on how settings.mk is used: |
Beta Was this translation helpful? Give feedback.
Aha! I missed a spot during a review, which confused me w.r.t. when environment variables are evaluated: #1084
So now, it all makes sense and works.
I articulated #1085 to implement the settings.mk feature and demonstrate on mock-array-big. Pretty neat actually when exploring configurations...
See README.md on how settings.mk is used:
https://github.com/Pinata-Consulting/OpenROAD-flow-scripts/blob/openroad-settings/flow/designs/asap7/mock-array-big/README.md