A semiconductor device comprising a device, the device including: a decoder which analyzes a command of a received packet to determine processing specified by the packet; a generation circuit which generates a unique device number in accordance with information in the packet; a register which holds the generated unique device number; and a modifier which updates and outputs the packet, characterized in that the device is configured so that it, when a packet issued by a host is a command packet, among broadcast packets which return to the host through one or more devices, for determining the unique device number, the command packet including parameters of an initial value and final value of device number, determines, based on the final value, whether the device has first received the command packet from the host for determining the unique device number, the device, when the device determines that the device has first received the command packet from the host for determining the unique device number, determines device number in accordance with the initial value of the received command packet, sets the determined device number to the register, updates the initial value and the final value in the command packet to the determined device number, and transmits the command packet to a next device or the host, wherein if the initial value is a predetermined value, the device number of the device is arbitrarily determined by the device, otherwise the device number of the device is determined by the host, and when the device (4-2, 4-3) determines that the device (4-2, 4-3) has not first received the command packet from the host for determining the unique device number, calculates device number different from determined device number of another device by incrementing the final value in the received command packet, sets the calculated device number to the register (9-2, 9-3), updates the final value to the calculated device number without updating the initial value in the command packet, and transmits the command packet to a next device or the host, and wherein the updated initial value and the updated final value are set to the same fields (11-3, 11-5) as those of the initial value and the final value before updating. a decoder which analyzes a command of a received packet to determine processing specified by the packet; a generation circuit which generates a unique device number in accordance with information in the packet; a register which holds the generated unique device number; and a modifier which updates and outputs the packet, characterized in that the device is configured so that it, when a packet issued by a host is a command packet, among broadcast packets which return to the host through one or more devices, for determining the unique device number, the command packet including parameters of an initial value and final value of device number, determines, based on the final value, whether the device has first received the command packet from the host for determining the unique device number, the device, when the device determines that the device has first received the command packet from the host for determining the unique device number, determines device number in accordance with the initial value of the received command packet, sets the determined device number to the register, updates the initial value and the final value in the command packet to the determined device number, and transmits the command packet to a next device or the host, wherein if the initial value is a predetermined value, the device number of the device is arbitrarily determined by the device, otherwise the device number of the device is determined by the host, and when the device (4-2, 4-3) determines that the device (4-2, 4-3) has not first received the command packet from the host for determining the unique device number, calculates device number different from determined device number of another device by incrementing the final value in the received command packet, sets the calculated device number to the register (9-2, 9-3), updates the final value to the calculated device number without updating the initial value in the command packet, and transmits the command packet to a next device or the host, and when the device determines that the device has first received the command packet from the host for determining the unique device number, determines device number in accordance with the initial value of the received command packet, sets the determined device number to the register, updates the initial value and the final value in the command packet to the determined device number, and transmits the command packet to a next device or the host, wherein if the initial value is a predetermined value, the device number of the device is arbitrarily determined by the device, otherwise the device number of the device is determined by the host, and when the device (4-2, 4-3) determines that the device (4-2, 4-3) has not first received the command packet from the host for determining the unique device number, calculates device number different from determined device number of another device by incrementing the final value in the received command packet, sets the calculated device number to the register (9-2, 9-3), updates the final value to the calculated device number without updating the initial value in the command packet, and transmits the command packet to a next device or the host, and wherein the updated initial value and the updated final value are set to the same fields (11-3, 11-5) as those of the initial value and the final value before updating.