python: Allow querying route delays
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
897a2fccb6
commit
de311e052f
@ -27,6 +27,9 @@ fn_wrapper_2a_v<Context, decltype(&Context::addBelToRegion), &Context::addBelToR
|
||||
fn_wrapper_2a_v<Context, decltype(&Context::constrainCellToRegion), &Context::constrainCellToRegion,
|
||||
conv_from_str<IdString>, conv_from_str<IdString>>::def_wrap(ctx_cls, "constrainCellToRegion");
|
||||
|
||||
fn_wrapper_2a<Context, decltype(&Context::getNetinfoRouteDelay), &Context::getNetinfoRouteDelay, pass_through<delay_t>,
|
||||
addr_and_unwrap<NetInfo>, unwrap_context<PortRef &>>::def_wrap(ctx_cls, "getNetinfoRouteDelay");
|
||||
|
||||
fn_wrapper_1a<Context, decltype(&Context::createNet), &Context::createNet, deref_and_wrap<NetInfo>,
|
||||
conv_from_str<IdString>>::def_wrap(ctx_cls, "createNet");
|
||||
fn_wrapper_3a_v<Context, decltype(&Context::connectPort), &Context::connectPort, conv_from_str<IdString>,
|
||||
|
10
python/delay_vs_fanout.py
Normal file
10
python/delay_vs_fanout.py
Normal file
@ -0,0 +1,10 @@
|
||||
with open("delay_vs_fanout.csv", "w") as f:
|
||||
print("fanout,delay", file=f)
|
||||
for net_name, net in ctx.nets:
|
||||
if net.driver.cell is None:
|
||||
continue
|
||||
if net.driver.cell.type == "DCCA":
|
||||
continue # ignore global clocks
|
||||
for user in net.users:
|
||||
print(f"{len(net.users)},{ctx.getNetinfoRouteDelay(net, user)}", file=f)
|
||||
|
Loading…
Reference in New Issue
Block a user