OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

Drt saving memory by removing unnecessary setters and variables from…

Open habibayassin opened this issue 3 years ago • 12 comments

… FrLayer

Signed-off-by: habibayassin [email protected]

habibayassin avatar Aug 02 '22 15:08 habibayassin

I'm guessing the reason for the fake cut/layer is to create an frLayer without an underlying dbTechLayer, but under what circumstance would one want to do that?

rovinski avatar Aug 04 '22 07:08 rovinski

I'm guessing the reason for the fake cut/layer is to create an frLayer without an underlying dbTechLayer, but under what circumstance would one want to do that?

@rovinski The ispd test cases start with the routing layer directly without defining a masterslice layer and a cut layer. For consistency, we create a fake masterslice layer and cut layer before the defined layer stack.

osamahammad21 avatar Aug 07 '22 13:08 osamahammad21

This doesn't really save any memory because there are only about 15 instances of frLayer. If you want to really have an impact do the same for frInst and frNet.

jjcherry56 avatar Aug 07 '22 19:08 jjcherry56

This doesn't really save any memory because there are only about 15 instances of frLayer.

If you want to really have an impact do the same for frInst and frNet.

@jjcherry56 Hi james. This is the first step of removing duplication in tritonroute's database as we discussed before. Sure we would do the same with the instances and the netlist, but the layer seemed a good place to start. This is not solely for saving memory, but also to have a unified database.

osamahammad21 avatar Aug 07 '22 21:08 osamahammad21

@maliberty

habibayassin avatar Aug 09 '22 16:08 habibayassin

getWidth() and getMinWidth() can also be replaced.

rovinski avatar Aug 09 '22 16:08 rovinski

getWidth() and getMinWidth() can also be replaced.

@rovinski I actually tried to replace them, but they are being set with values other than the ones from dbtechlayer->getWidth() or dbtechlayer->getMinWidth()

habibayassin avatar Aug 09 '22 16:08 habibayassin

How so? It looks like they are:

https://github.com/The-OpenROAD-Project/OpenROAD/blob/a2b9a98b5917fddaa9e99d801328f3f8d0e9d039/src/drt/src/io/io.cpp#L1521-L1528

rovinski avatar Aug 09 '22 17:08 rovinski

How so? It looks like they are:

https://github.com/The-OpenROAD-Project/OpenROAD/blob/a2b9a98b5917fddaa9e99d801328f3f8d0e9d039/src/drt/src/io/io.cpp#L1521-L1528

Line 1528 is updating minWidth. io::Parser::initCutLayerWidth() updates width if unset from LEF

maliberty avatar Aug 09 '22 17:08 maliberty

Line 1528 is updating minWidth. io::Parser::initCutLayerWidth() updates width if unset from LEF

That raises an interesting question. If DRT is working around deficiencies in the loaded database, should drt be making its own modified copy or should it be updating the db? Considering DRT was already copying everything, the answer was obviously yes, but if we merge data with odb, I think it becomes a real question.

Maybe something to be addressed in a different PR.

rovinski avatar Aug 09 '22 19:08 rovinski

@rovinski I think it is something for another PR. I feel messing with the minWidth reflects a shortcoming in drt itself that should be fixed rather than hacking the constraints. The other case is more interesting.

maliberty avatar Aug 09 '22 20:08 maliberty

How so? It looks like they are:

https://github.com/The-OpenROAD-Project/OpenROAD/blob/a2b9a98b5917fddaa9e99d801328f3f8d0e9d039/src/drt/src/io/io.cpp#L1521-L1528

@rovinski it is being set here as well: https://github.com/The-OpenROAD-Project/OpenROAD/blob/a2b9a98b5917fddaa9e99d801328f3f8d0e9d039/src/drt/src/io/io_parser_helper.cpp#L286

habibayassin avatar Aug 09 '22 21:08 habibayassin

You'll have to fix the build errors but otherwise it looks ok

maliberty avatar Sep 06 '22 03:09 maliberty