From 596bccc6e57c6c57df1d99d4af300d6a2e722ed9 Mon Sep 17 00:00:00 2001 From: gatecat Date: Thu, 22 Apr 2021 10:28:10 +0100 Subject: Allow macro expansions conditional on parameter match Signed-off-by: gatecat --- interchange/DeviceResources.capnp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interchange/DeviceResources.capnp b/interchange/DeviceResources.capnp index 5a52bec..465e212 100644 --- a/interchange/DeviceResources.capnp +++ b/interchange/DeviceResources.capnp @@ -242,6 +242,14 @@ struct Device { struct PrimToMacroExpansion { primName @0 : StringIdx $stringRef(); macroName @1 : StringIdx $stringRef(); + # Optionally, primitive to macro expansions can be conditional on a + # parameter match. For example, I/O buffer expansions might be + # different between true and pseudo differential IO types. The + # expansion is used if **any** of the parameters specified match. + union { + always @2 : Void; + parameters @3 : List(Dir.Netlist.PropertyMap.Entry); + } } # Cell <-> BEL and Cell pin <-> BEL Pin mapping -- cgit v1.2.3