Skip to content

Commit a25240d

Browse files
committed
Add specification of default cell pin values
This adds structures for DeviceResources for the default values for cell pins that are missing or disconnected. Previously the contract was that the synthesis tool would always give cell pins a value, but this has several problems: - existing flows aren't doing this - cells might want to be created by the PnR tool or anything else reading the interchange format - sometimes, floating is a valid default value (for example certain dedicated pins) and the existing contract didn't recognise that - setting all disconnected pins to ground is definitely not correct, vendor tools usually connect disconnected clock enables to Vcc for example. Signed-off-by: gatecat <gatecat@ds0.me>
1 parent 71720ab commit a25240d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

interchange/DeviceResources.capnp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,33 @@ struct Device {
339339
constant @2 : ConstantType;
340340
}
341341

342+
# These structures are used to define default constant values for unused
343+
# or missing cell pins. For each cell type, we have a list of pins and
344+
# what to do with those pins (which will be to tie it to 0 or 1 in most
345+
# cases).
346+
enum CellPinValue {
347+
# leave floating
348+
float @0;
349+
# connect to ground
350+
gnd @1;
351+
# connect to vcc
352+
vcc @2;
353+
}
354+
355+
struct DefaultCellConnection {
356+
# What is the name of this cell pin?
357+
name @0 : StringIdx $stringRef();
358+
# The default constant value for the pin if missing or disconnected
359+
value @1 : CellPinValue;
360+
}
361+
362+
struct DefaultCellConnections {
363+
# The type of the cell we're providing a list of defaults for
364+
cellType @0 : StringIdx $stringRef();
365+
# The list of default cell pin values
366+
pins @1 : List(DefaultCellConnection);
367+
}
368+
342369
# When either constant signal can be routed to an input site pin, which
343370
# constant should be used by default?
344371
#
@@ -383,6 +410,9 @@ struct Device {
383410
anyName @10 : Void;
384411
name @11 : StringIdx $stringRef();
385412
}
413+
414+
# How to treat missing/disconnected cell pins
415+
defaultCellConns @12 : List(DefaultCellConnections);
386416
}
387417

388418
######################################

0 commit comments

Comments
 (0)