I'm doing a h.w in which I have to make a memory instruction format and single data path cycle for LDRH instruction. After calculating the address ( rn + extended imm12) we get a 32 bit value that store in Rd but what 8 bits in the 32 bit value( binary ) are to be stored in Rd ( I know that the 8 bits will be stored in lower end of Rd?
Also I'm working in Arm32 and consider this as an example LDRH Rd , [Rn , #imm12].
Here's the question
Consider LDRH (load half-word) instruction in the ARM ISA. The format of the instruction is as follows: LDRH Rd, [Rn,#imm12] The instruction reads 8 bits (1 byte) of data from the address specified by (Rn + 0-extended immediate value), and stores the data as a sign-extended 32 bit value into the target register Rd.
(a) Give the 32 bit instruction format for the LDRH instruction. Name the format based on your knowledge of the ARM architecture. Clearly label all the instruction fields and mention the size of each field in bits.
(b). Modify the single-cycle ARM processor on the next page of the assignment to implement LDRH. Show all of the necessary changes in the datapath, and draw any additional control signals that may be required to implement the instruction. Please use a different colour pen/highlighter (or different font and line colour if providing a digital solution) than the colours on the diagram to make it easier for the markers to understand your solution.