.. _write_word:

		Writes one word from a device,
		see read_word_.

def write_word(self, offset, word):
		"""
		.. _write_word:

		Writes one word from a device,
		see read_word_.
		"""
		self._lock = True
		if(offset > self.current_max_offset):
			raise BUSError("Offset({}) exceeds address space of BUS({})".format(offset, self.current_max_offset)) 
		self.writes += 1
		
		self.truncate.setvalue(word)
		for addresspace, device in self.index.items():
			if(offset in addresspace):
				device.write(offset - self.start_addresses[device], self.truncate.getvalue())