module MASTER_SLAVE (TYPES, SIZE) is ------------------------------------------------------------------------------- process SLAVE [MSG: any] (ext: Extension, pc: PC, ID: Pid, index: Int) is case ext in DONT_CARE -> MSG (ID, "don't care", pc, "slave with index", index) | BITSTREAM -> MSG (ID, "bitstream", pc, "slave with index", index) | VECTOR -> MSG (ID, "vector", pc, "slave with index", index) end case end process ------------------------------------------------------------------------------- process MASTER [ST, MSG: any] (ext: Extension, pc: PC, slave_pc: PC, slave_ext: Extension, number_slaves: Int, continuation: PC, ID: Pid, in out s: Job_Desc_Stack) is case ext in DONT_CARE -> case slave_ext in DONT_CARE -> MSG (ID, "don't care master", pc, "before don't care dup") | BITSTREAM -> MSG (ID, "don't care master", pc, "before bitstream dup") | VECTOR -> MSG (ID, "don't care master", pc, "before vector dup") end case | BITSTREAM -> case slave_ext in DONT_CARE -> MSG (ID, "bitstream master", pc, "before don't care dup") | BITSTREAM -> MSG (ID, "bitstream master", pc, "before bitstream dup") | VECTOR -> MSG (ID, "bitstream master", pc, "before vector dup") end case | VECTOR -> case slave_ext in DONT_CARE -> MSG (ID, "vector master", pc, "before don't care dup") | BITSTREAM -> MSG (ID, "vector master", pc, "before bitstream dup") | VECTOR -> MSG (ID, "vector master", pc, "before vector dup") end case end case; s := push (EXEC (continuation, -1), s); ST (ID, DUP (slave_pc, slave_ext, number_slaves)) end process ------------------------------------------------------------------------------- end module