opensub
¶The opensub
standard function allows you to create IO spaces
that show a sub-region of some other IO space. The prototype is:
fun opensub = (int<32> ios, offset<uint<64>,B> base, offset<uint<64>,B> size, string name = "", uint<64> flags = 0) int<32>
where ios is the ID of the base IOS, base is the offset in ios where the sub-range starts and size is the size of the range.
The argument name is a descriptive name of the contents of the range, and it is empty by default.
The argument flags is an ORed value of IOS_F_*
flags. If
no explicit flags are specified then the sub space inherits the
flags of the underlying base IOS. If explicit flags are
provided and they contradict the flags of the underlying IOS then
E_ios_flags
is raised.
Trying to access a sub space whose base IOS has been closed results in
a E_io
exception.