diff --git a/compiler/characterizer/delay.py b/compiler/characterizer/delay.py index 867b3cdb..5d2dd09a 100644 --- a/compiler/characterizer/delay.py +++ b/compiler/characterizer/delay.py @@ -1362,8 +1362,9 @@ class delay(simulation): else: debug.error("Measurement name not recognized: {}".format(mname), 1) - # Estimate the period as double the delay with margin - period_margin = 0.1 + # Margin for error in period. Calculated by averaging required margin for a small and large + # memory. FIXME: margin is quite large, should be looked into. + period_margin = 1.85 sram_data = {"min_period": (max_delay / 1e3) * 2 * period_margin, "leakage_power": power.leakage} diff --git a/compiler/tests/21_model_delay_test.py b/compiler/tests/21_model_delay_test.py index e711c7ca..af1dfa12 100755 --- a/compiler/tests/21_model_delay_test.py +++ b/compiler/tests/21_model_delay_test.py @@ -63,7 +63,9 @@ class model_delay_test(openram_test): # Only compare the delays spice_delays = {key:value for key, value in spice_data.items() if 'delay' in key} + spice_delays['min_period'] = spice_data['min_period'] model_delays = {key:value for key, value in model_data.items() if 'delay' in key} + model_delays['min_period'] = model_data['min_period'] debug.info(1,"Spice Delays={}".format(spice_delays)) debug.info(1,"Model Delays={}".format(model_delays))