-
Notifications
You must be signed in to change notification settings - Fork 68
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
Hierarchical Placement Injection fails with a high number of variants #1083
base: master
Are you sure you want to change the base?
Conversation
Okay I can look into this. |
How to use external placement information? It seems still using the placer. I followed #849 and used "--reference_placement_verilog_json" but not worked. |
@854768750 Every routing run now uses the placement injection. The placer is run using one PnRDB instance. The router is run using a different PnRDB instance.
then you can redo the router stage (were the error is happening) by running
The main information carried between the placer and router is in: |
At the second run (using external placement json file), the hiernode information is different from the first run. In the first run, the node "CASCODED_CMC_PMOS_31196023_PG0" block 3 has two variants while in the second run, there is only one variant. |
Yes, there is only one variant given for each internal hierarchy. There is a new map file where all the abstract template names for internal hierarchies have been replaced with a concrete template name. (Or put another way, we don't need to have more than one variant for each internal hiearchy.) |
okay that is because the required variant is removed. I will use the new map file. |
You must already be using the new map file because it is what was used to generate the new PnRDB for the router. |
After the first run, the node "CASCODED_CMC_PMOS_31196023_PG0" block 3 chooses the variant "PMOS_4T_86154205_X1_Y3". But the external placement json file uses "PMOS_4T_86154205_X3_Y1". |
Also this example is time-consuming. When I set the placer_sa_iterations==100 or 1000, there is no error. |
You should use the --flow_start technique above to fix the long runtime. There error is when we run the router on stored data from the placer. Let me look that the particular example above. What the placer did before is not very important. It needs to follow what is being specified in the placement verilog. I'll look through to make sure usage of |
After you running routing (and in this case get a crash) two files get created in |
How to make the second PnRDB the corresponding to the selection assignment? Use |
More findings: |
I guess it may be some something between the second PnRDB and the second placer. Is the second PnRDB built based on |
You need to build the PnRDB with:
Then you feed in the placement and selection information from
This is all happening for you when you run:
The python code also creates the map file (in memory) and the lef file. You should be able to debug just using this. |
@854768750 I don't know what you mean by "At the beginning of the placer". Placer variant numbers have been reassigned from the original numbering when the placer was run. Only the variant that are needed are included and if they where _25 and _36 during placement then will still be _0 and _1 in the ".abstract_verilog.json" and ".scaled_placement_verilog.json" files. We only need to build up the variants that are need for this particular design. We want to be able to import design that were generated by other placers so we need functionality like this. |
I need the module's concrete name in https://github.com/ALIGN-analoglayout/ALIGN-public/blob/fix/multi_variant_placement_injection/align/pnr/manipulate_hierarchy.py#L164 |
…b.com/ALIGN-analoglayout/ALIGN-public into fix/multi_variant_placement_injection
@@ -21,6 +21,7 @@ def _ReadVerilogJson( DB, j, add_placement_info=False): | |||
|
|||
temp_node = PnR.hierNode() | |||
temp_node.name = module['name'] if 'name' in module else module['abstract_name'] | |||
temp_node.concrete_name = module['concrete_name'] if 'concrete_name' in module else module['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.
hiernode needs concrete name, so that the placer can match placement json file to each hiernode
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.
@stevenmburns It seems the PnRDB is build in this function, not in C++ code. Is it possible to parse the concrete name in this function?
align/pnr/manipulate_hierarchy.py
Outdated
@@ -161,7 +161,7 @@ def gen_abstract_verilog_d( verilog_d): | |||
assert 'name' not in module | |||
module['name'] = module['abstract_name'] | |||
del module['abstract_name'] | |||
del module['concrete_name'] | |||
#del module['concrete_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.
The same here. However, this causes error in the other place. What I need is to make hiernode info match the placement json file.
What should be do now for this? I'm not sure I understand what you need here. The concrete template names are in the scaled placement verilog files (the verilog that is being parsed by your C++ code) so you should be able to do what you need from that. |
Okay, I think the C++ code needs to parse concrete template names (now it does not). Is this your point? |
The PnRDB in the second run is built in align/pnr/manipulate_hierarchy.py ? |
Yes. It is there just to prepare the design for reloading into the router. Do you want to generate a smaller failing testcase? I can probably do that if it is necessary (and if I know more about want exactly is causing the crash.) |
The problem is when building the Hiernode in function |
This test case is a good one. No need to have another one at now. |
I looked through the
I'll see if I can fix that up. |
This latest change makes the abstract names and concrete names always be the same when we set up the problem from the router. There is crash now probably due to not have the constraint files named correctly. I'll work on that next. |
okay, just let me know when it is solved. Maybe I also need to do some changes in PnR. |
@854768750 Can you look at this test case now? It is crashing in topo ordering. |
ok, let me see
…------------------ Original ------------------
From: "Steve ***@***.***>;
Date: 2022年5月6日(星期五) 凌晨0:31
To: ***@***.***>;
Cc: ***@***.***>; ***@***.***>;
Subject: Re: [ALIGN-analoglayout/ALIGN-public] Hierarchical Placement Injection fails with a high number of variants (PR #1083)
@854768750 Can you look at this test case now? It is crashing in topo ordering.
You should be able to ignore the warnings about constraint file missing.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
You shouldn't need to do any parsing of the names. Concrete and abstract names should be the same. |
node 0 is topcell and has name "CASCODE_CURRENT_MIRROR_OTA_0". Is it possible to remove "_0" for topcell? |
topcell in "CASCODE_CURRENT_MIRROR_OTA.scaled_placement_verilog.json" still has "_0" |
No, it is important that the top level name include the "_0". This is to be consistent with the intermediate levels of hierarchy that definitely need the "_0" (or "_1"). Is there some other name that needs to be changed to include an "_0"? Something else in the call to create the PnRDB. |
I think this works now. |
@854768750 This looks good. I need to fix up some naming issues in the checker but it looks like the placement creation is good. |
@854768750 I'm ready for you to look at this again. There are a number of failing testcases:
They are all routing failures. A number of them are power routing related. |
okay let me see
…------------------ Original ------------------
From: "Steve ***@***.***>;
Date: 2022年6月1日(星期三) 凌晨2:28
To: ***@***.***>;
Cc: ***@***.***>; ***@***.***>;
Subject: Re: [ALIGN-analoglayout/ALIGN-public] Hierarchical Placement Injection fails with a high number of variants (PR #1083)
@854768750 I'm ready for you to look at this again. There are a number of failing testcases:
================================================================================ short test summary info ================================================================================= FAILED tests/constraints/test_constraint.py::test_donotroute - AssertionError: ckt_donotroute (CKT_DONOTROUTE_0_0):Number of DRC errorrs: 3 FAILED tests/constraints/test_constraint.py::test_netpriority - AssertionError: ckt_netpriority (CKT_NETPRIORITY_0_0):Number of DRC errorrs: 2 FAILED tests/constraints/test_constraint.py::test_placecloser - AssertionError: ckt_placecloser (CKT_PLACECLOSER_0_0):Number of DRC errorrs: 2 FAILED tests/pdk/finfet_pdk/test_placement_grid.py::test_scalings - AssertionError: ckt_scalings (CKT_SCALINGS_0_0):Number of DRC errors: 2 FAILED tests/pdk/finfet_pdk/test_placer.py::test_cmp_fast - AssertionError: ckt_cmp_fast (CKT_CMP_FAST_0_0):Number of DRC errors: 2 FAILED tests/pdk/finfet_pdk/test_placer.py::test_sub_1 - AssertionError: ckt_sub_1 (CKT_SUB_1_0_0):Number of DRC errors: 2 FAILED tests/pdk/finfet_pdk/test_placer.py::test_cmp_slow - AssertionError: ckt_cmp_slow (CKT_CMP_SLOW_0_0):Number of DRC errors: 2
They are all routing failures. A number of them are power routing related.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@854768750 @soneryaldiz All of them seem to not be doing power routing. (Or there are opens in the power and ground nets.) @soneryaldiz What is test_donotroute suppose to check? There are three DRC errors now. I think there is supposed to be one, but I don't know how it gets passed the run_example check. |
@stevenmburns , This test is supposed to check that a signal net is not routed given a DoNotRoute constraint. I will look into why it is failing. |
@stevenmburns , when I run the test, it fails due to opens. However, the nets not to be routed should be excluded from the open check (see |
For routing there doesn't need to be a distinction between abstract and concrete name (that is a placement concept.) |
|
@soneryaldiz We are going to have to think about the right thing to do here. We might need to generate a second pnr_const_ds for the routing phase (separate from the placement phase.) [There are two different DBs now, and we are making changes to the design.] Then the names could be correct. |
Do I need to do anything here now? Naming issue? |
The following results in a crash:
@854768750 I think this should work. The error is: