OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

odb: adding support for persistent DFT structures

Open fgaray opened this issue 1 year ago • 4 comments

This is a basic set of structs to support scan chains and scan cells in odb.

Also, bumping the db_schema_minor to 79.

fgaray avatar Feb 20 '24 21:02 fgaray

Hi @maliberty , this is a big PR but it is mostly code generated by the code generator script.

Thanks!

fgaray avatar Feb 21 '24 03:02 fgaray

I see many resolved comments but not the usual clang-tidy thumbs-up. Is there something not yet resolved?

maliberty avatar Feb 21 '24 06:02 maliberty

I see many resolved comments but not the usual clang-tidy thumbs-up. Is there something not yet resolved?

Yeah, most of them are in code that I am keeping the already existing style: image

Or something that I already fixed (I was missing a header): image

Other seems to be false positive (I don't think this is a temporal object): image

As well as this one too (std::always_false_v is used in a constexpr code so it is not in the final binary): image

Does that makes sense?

fgaray avatar Feb 22 '24 00:02 fgaray

Thanks for the clang-tidy info. I find its static analysis to not be very good and keep considering disabling it completely as it has a high false positive rate.

maliberty avatar Feb 22 '24 01:02 maliberty

Hi @maliberty, I think this is ready for another look, thanks!

fgaray avatar Feb 28 '24 18:02 fgaray

#4617 and this PR are about to contend on the db schema. Would you be ok if that one goes first and you take the merge?

maliberty avatar Feb 28 '24 18:02 maliberty

#4617 and this PR are about to contend on the db schema. Would you be ok if that one goes first and you take the merge?

Sure, no problem! Thanks!

fgaray avatar Feb 28 '24 19:02 fgaray

Hi @maliberty , rebased the change. Had to force push the bump of the schema version but should be good to go. Thanks!

fgaray avatar Mar 05 '24 22:03 fgaray

ready for review or still working?

maliberty avatar Mar 22 '24 19:03 maliberty

ready for review or still working?

Yep, ready for review :). The git history is a mess in this PR so let me know before merging so I can clean it up a little bit. Thanks!

fgaray avatar Mar 22 '24 20:03 fgaray

It would be good to have descriptive comments for the new classes in db.h

maliberty avatar Mar 28 '24 15:03 maliberty

hi @maliberty,

It would be good to have descriptive comments for the new classes in db.h

Is there any way to add comments to the auto-generated classes? Thanks!

Edit: To clarify, I am asking if there is a way to add comments to the class and not to the user defined methods that I created by hand.

fgaray avatar Mar 29 '24 20:03 fgaray

Can you just add the comments to db.h before the class?

maliberty avatar Mar 29 '24 20:03 maliberty

No, it disappears. I see other comments for some classes there (ex: dbTechSameNetRule), but I am not sure how they are preserving those comments.

Meanwhile I am adding comment for the hand made methods.

fgaray avatar Mar 29 '24 20:03 fgaray

dbTechSameNetRule is not generated

maliberty avatar Mar 30 '24 00:03 maliberty

How about adding

diff --git a/src/odb/src/codeGenerator/templates/db.h b/src/odb/src/codeGenerator/templates/db.h
index 04ac32e09..6159423ef 100644
--- a/src/odb/src/codeGenerator/templates/db.h
+++ b/src/odb/src/codeGenerator/templates/db.h
@@ -5,7 +5,11 @@ class {{klass.name}};
 //Generator Code End ClassDeclarations
 //Generator Code Begin ClassDefinition
 {% for klass in schema.classes|sort(attribute='name') %}
-
+{% if klass.description %}
+  {% for line in klass.description %}
+    // {{ line }}
+  {% endfor %}
+{% endif %}
 class {{klass.name}} : public dbObject

maliberty avatar Mar 30 '24 00:03 maliberty

Hi @maliberty , That makes sense! Do you want me to include that in this PR or would you send one with your code? Thanks!

fgaray avatar Apr 01 '24 22:04 fgaray

You can just include it here.

maliberty avatar Apr 01 '24 22:04 maliberty

DFT is a new area for me so I've been slow to get it. I think this is clear enough for me to move forward. I'm sure it will become clearer as you build out the rest of the solution.

maliberty avatar Apr 06 '24 04:04 maliberty