Question

I have been given a simple ISA with two registers.

opcode: 2 bits, register1: 3 bits, register2: 3 bits.

It is asking me to find the size of the register file, how many registers can be addressed, and If each register’s size is the same that the instruction’s size, what is the size of the memory in bytes?

I am not asking for the exact answers, but i really can't find anywhere online or in my notes saying how to determine a register file's size given what i've been given.

Can anyone point me in the right direction?

Thanks

Était-ce utile?

La solution

It is asking me to find the size of the register file, how many registers can be addressed

If the instruction encodes register operands with X bits, that gives 2^X possible registers that the instruction can address.


and If each register’s size is the same that the instruction’s size, what is the size of the memory in bytes?

That question seems incomplete to me since the answer depends on which addressing modes the ISA provides. If we assume that only register-indirect memory access is allowed (e.g. ld r0,(r1)) with no scaling we end up with 2^InstructionWidth bytes of addressable memory.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top