Skip to content

Commit 596bccc

Browse files
committed
Allow macro expansions conditional on parameter match
Signed-off-by: gatecat <gatecat@ds0.me>
1 parent 5208d79 commit 596bccc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

interchange/DeviceResources.capnp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,14 @@ struct Device {
242242
struct PrimToMacroExpansion {
243243
primName @0 : StringIdx $stringRef();
244244
macroName @1 : StringIdx $stringRef();
245+
# Optionally, primitive to macro expansions can be conditional on a
246+
# parameter match. For example, I/O buffer expansions might be
247+
# different between true and pseudo differential IO types. The
248+
# expansion is used if **any** of the parameters specified match.
249+
union {
250+
always @2 : Void;
251+
parameters @3 : List(Dir.Netlist.PropertyMap.Entry);
252+
}
245253
}
246254

247255
# Cell <-> BEL and Cell pin <-> BEL Pin mapping

0 commit comments

Comments
 (0)