The-OpenROAD-Project / OpenSTA

OpenSTA engine
GNU General Public License v3.0
389 stars 170 forks source link

Power reporting issue #83

Closed BaudouinChauviere closed 2 years ago

BaudouinChauviere commented 2 years ago

Hi,

I was trying to do some power reporting through the tool and got leakage power similar to Primetime but the dynamic power is 2 orders of magnitude lower than the leakage. I had loaded an activity file. To change this and try to solve the issue, I tried using the set_power_activity command and putting the activity to 1 while keeping duty_cycle to 50% but still got low dynamic power. I then tried with different values of activity/duty and got the same results (same order of magnitude).

I was using a commercial library but also tried using the skywater130nm library (sky130_fd_sc_hd__tt_025C_1v80.lib) and got the same kind of issues.

My question is: are all the libraries supported in OpenSTA? Is there any options I might have forgotten that I should have added?

Thanks

Screenshot 2021-08-19 180935

jjcherry56 commented 2 years ago

I suggest you put together a test case using skywater130 libraries. Without a test case I have no comment.

BaudouinChauviere commented 2 years ago

Here is a testcase with just the OpenSTA part. Just execute ./run_sta to get the results

Thanks

sky130_for_OpenSTA.zip

jjcherry56 commented 2 years ago

So you are trying to compare the unmentionable commercial tool result with a vcd file to opensta with no vcd file? Have you tried comparing the unmentionable commercial tool without a vcd file? Because that is the only comparison that would make any sense.

BaudouinChauviere commented 2 years ago

Sorry, I'm using PrimeTime. I was expecting that by having the activity of all the nets at 100% would give results similar to what we had even without the vcd file. Sure it would not be realistic and overly pessimistic but it should be within the same order of magnitude. I'm currently working with other open source to synthesis and generate the vcd/act file.

jjcherry56 commented 2 years ago

I suspect the issue is the fact that the clock is not connected to anything. But you should have been able to figure that out yourself.

BaudouinChauviere commented 2 years ago

The module is purely combinational. We added a clock as a timing reference for power calculations. From the manual, the set_power_activity uses an activity flag which uses the clock as a reference: "-activity The activity, or number of transitions per clock cycle."

Is there a different method to evaluate power consumption of combinational blocks? If no clock is provided is there a method to specify the default clock period used for power calculations?

jjcherry56 commented 2 years ago

add sdc constraints for ports with set_input_delay and set_output_delay so they have timing with respect to a clock. Otherwise how is the tool supposed to know what clock to use for switching activitity?