
198 CHAPTER 8 TIE
the lower 40 bits of the memory interfaces MemDataIn64 and MemDataOut64.
In some cases, multiple instructions may be needed in the proto, such as loading
a register file whose width is greater than the maximum allowable data memory
width of 128 bits.
The proto construct can also be used to specify type conversion from one
ctype to another. For example, conversion from the fixed point data type
my40
to myreg involves sign extension, while the reverse conver sion involves truncation
with saturation as shown:
operation mr40to64 {out myreg o, in myreg i} {} {
assign o = {{24{i[39]}}, i[39:0]};
}
operation mr64to40 {out myreg o, in myreg i} {} ...