Minres / CoreDSL

Xtext project to parse CoreDSL files
Apache License 2.0
16 stars 3 forks source link

Address Space Type #85

Closed AtomCrafty closed 1 year ago

AtomCrafty commented 1 year ago

At first glance, the AddressSpaceType looks very similar to the ArrayType, because they use identical syntax in CoreDSL. But they have a few key differences.

ArrayType AddressSpaceType
Represents the concatenation of N elements of the underlying element type. Represents some form of addressable memory. For example a register file, ROM or RAM.
Declaration in local scope: T array[N]; Declaration on ISA level: register T space[N];
Size: N * bitsizeof(T) Size: 1 * bitsizeof(T)
Total combined size must not exceed Integer.MAX_VALUE bits. May have arbitrarily many elements (BigInteger).
Can be copied and passed to functions. Can not be copied or passed to functions.
toString: T[N] or T[?] toString: T[address space N] or T[address space ?]