chipsalliance / firrtl-spec

The specification for the FIRRTL language
44 stars 28 forks source link

[major] Rename groups to layers #149

Closed seldridge closed 11 months ago

seldridge commented 11 months ago

Change optional groups to "layers". This much better captures the underlying concept as well as the possibility of nesting. Change declgroup to layer. Change group to layerblock.

I recognize this is a pretty disruptive change. However, being able to explain this with the correct terms is highly beneficial. I always had difficulty talking about "nested optional groups" while "nested layers" makes more sense. I'm trying to draw analogies to layers in graphic design or existing software engineering concepts.

This also inverts the focus in a good way. Layers are really about a collection of optional functionality in "layer blocks" that exists across disparate modules. The previous description incorrectly inverted this: the "groups"/"layers" were inside the module and the "groupdecl" was outside. h/t @mmaloney-sf for pointing this out.

I do want to get feedback on this, specifically from @mmaloney-sf, @mwachs5, and @darthscsi.

mmaloney-sf commented 11 months ago

I'll look over this closely.

I like the use of the word "layer" instead of "group" -- it's a more flavorful word.

However, I'm wondering if we can push it a hair further: Rather than using layerdecl, can we think of a more interesting name for this keyword?

image

Think of it like this: What is the layer Bar? Is it the block inside of a the Foo module? Or is it the collectivity of all the layer blocks across all modules?

mwachs5 commented 11 months ago

love the name. haven't read the PR

dtzSiFive commented 11 months ago

Love the name change!! :rocket: