The specification doesn't specify how to construct a memory write port's mask type from the memory's data-type when the type contains an enumeration.
I suggest using something like this:
The mask type of a FIRRTL type is defined for the following memory data types:
- Any Ground Type: The mask type is
UInt<1>
- Vector Types
T[N] for any type T and any non-negative integer N: The mask type is M[N] where M is the mask type of T.
- Bundle Types
{field0: Ty0, field1: Ty1, field2: Ty2, ...}: The mask type is {field0: M0, field1: M1, field2: M2, ...} where M0, M1, M2, ... are the corresponding mask types of Ty0, Ty1, Ty2, ...
- Enumeration Types: The mask type is
UInt<1>