Terminology: Instance

The other day, I was discussing per-instance metadata with someone and the overloading of the term “instance” was getting confusing:

  • The “instance” in “per-instance metadata” refers to a particular piece of instantiated design – you can point to the area of the chip it uses. There may be many instances of a particular module.
  • The “instance” in InstanceOp means an instantiation site. I don’t know how common it is to refer to an instantiation site as an “instance”.

This gets particularly bad when one is designing a frontend needs to support both while trying to maintain as much terminological consistency with CIRCT as possible, as I am.

Thoughts? Is there alternative terminology I could use?

I don’t know what is correct here, but I use “instance” to mean an InstanceOp and “instance path” to refer to a (potentially fully realized, potentially partial) instance specifier.

Just to follow up on this: I’ve been using two different sets of terms interchangeably, both of which are confusing two those who haven’t heard them before:

  • Static instance vs dynamic instance. Static being equivalent to hw.instance, dynamic meaning instance in the instance hierarchy. This one is the analog to static vs dynamic instructions.
  • Instantiation [site] vs instance. Instantiation (or instantiation site) being equivalent to hw.instance, just instance being an instance in the instance hierarchy. This is the one I typically use since it’s more familiar to RTL coders.

I’m considering renaming msft.instance to msft.instantiation since we also have the concept of an instance. msft.instantiation is quick a few more characters to type, however. It’s also not consistent with the hw dialect. Maybe I should use hw.instance.dynamic to refer to a dynamic instance. Does anyone have any suggestions on other terms?

I don’t like this since “instance path” sounds like the path array in hw.globalRef.