Question

Figure below shows part of the byte-addressable program memory that uses big-endien format to store data. The memory contains

0 0
Add a comment Improve this question Transcribed image text
Answer #1

RISC-V instruction is 4 byte format for any instruction. Memory is big-endian which means that lower byte of instruction code is stored at higher address.

It means -

  • 0x00408000 => 0x00 (3rd Byte)
  • 0x00408001 => 0x87 (2nd Byte)
  • 0x00408002 => 0x1D (1st Byte)
  • 0x00408003 => 0x93 (0th Byte)

So, the assembly instruction stored at address 0x00408000 is 0x00871D93

0x00871D93

Binary Code => 0000 0000 1000 0111 0001 1101 1001 0011

Each RISC-V Instruction has right most 7 bits for opcode.

  • Opcode = 0010011 (I-Type Instruction)

Opcode 0010011 represents I-Type operations. Format for I-type RISC-V instruction is as below.

31 R I 27 26 25 24 20 19 15 funct7 rs2 rs1 imm[11:0] rs1 imm[11:5] rs2 rs1 imm[12|10:5] rs2 rs1 imm[31:12] imm[20|10:1|11|19:

  • rs1 = 01110 = x14 (Source Register 1)
  • func3 = 001
    • It means the actual operation is SLLI based on table below.
  • rd = 11011 = x27 (Destination Register)
  • Opcode = 0010011
  • imm [11:0] = 000000001000
    • Divided into two parts
    • Fixed bits = 0000000
    • Shamt (shift value) = 01000 = 8 (decimal)

rs 1 rs1 rs 1 rs1 imm[11:0) imm[11:0) imm[11:0] imm[11:0) imm[11:07 imm[11:0) 0000000 0000000 000 010 011 100 110 111 001 101

So, Final instruction is Shift Left Logical

SLLI  x27, x14, 8 => (x27 = x14 << 8)

Add a comment
Know the answer?
Add Answer to:
Figure below shows part of the byte-addressable program memory that uses big-endien format to store data....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Show how the following value would be stored by byte-addressable machines with 32-bit words by filling...

    Show how the following value would be stored by byte-addressable machines with 32-bit words by filling in the appropriate memory locations, using big endian and then little endian format. Assume each value starts at address Ox10. VALUE: 0xF12 Address-Ox10 Big Endian Little Endian Ox11 0x12 0x13 0x14 Ox15

  • 1. A system with a word length of 32-bit and byte-addressable memory has ten consecutive 32-bit...

    1. A system with a word length of 32-bit and byte-addressable memory has ten consecutive 32-bit signed numbers stored starting from memory location NUM. Write a RISC-style program to count the number of positive numbers in it and store the count in location COUNT.

  • 3. Virtual Memory (20 points) An ISA supports an 8 bit, byte-addressable virtual address space. The...

    3. Virtual Memory (20 points) An ISA supports an 8 bit, byte-addressable virtual address space. The corresponding physical memory has only 256 bytes. Each page contains 32 bytes. A simple, one-level translation scheme is used and the page table resides in physical memory. The initial contents of the frames of physical memory are shown below. VALUE address size 8 bit byte addressable each byte of addressing type memory has its own address 32 B page size physical memory size 256...

  • A byte-addressable memory system contains four memory modules each of which is 32 bits wide by...

    A byte-addressable memory system contains four memory modules each of which is 32 bits wide by 2^28 cells deep. The system employs a 1 MB 2-way set associative cache with 128-byte cache lines. It also uses a 32-bit CPU-to-memory data bus as well as 32-bit physical addresses. Each memory module requires 4 clock cycles to perform either a read or a write operation. a) Assuming that the memory system is low order interleaved, show the proper 32-bit format for physical...

  • Please answer 2.6.1 2.6 The table below shows 32-bit values of an array stored in memory...

    Please answer 2.6.1 2.6 The table below shows 32-bit values of an array stored in memory Address Data 24 38 2 4 32 36 40 2.6.1 [5] <COD §§22, 2.3-For the memory locations in the table above, write C code to sort the data from lowest to highest, placing the lowest value in the smallest memory location shown in the figure. Assume that the data shown represents the C variable called Array, which is an array of type int, and...

  • 6. Write an assembly program to find the largest of twenty 32-bit values stored in ascending memory starting at "data1". Store the largest data element found at "largest", and store t...

    6. Write an assembly program to find the largest of twenty 32-bit values stored in ascending memory starting at "data1". Store the largest data element found at "largest", and store the address of the largest data found at "largest address" .text .global main .equ data1, 0x40000000 .equ largest, Ox40001000 .equ largestaddress, 0x40001000 LDR RO, -data1 LDR R1,=largest LDR R2, largestaddress 6. Write an assembly program to find the largest of twenty 32-bit values stored in ascending memory starting at "data1"....

  • . For the following operations in the ARC tool program bellow 11. (10 pts) For the...

    . For the following operations in the ARC tool program bellow 11. (10 pts) For the following operations in the ARCTool program below: the instruction he is defined in table 4, 10 as branch equal ( the instruction bu is defined as branch always: ) Write the instruction the program jumps to when be here+4 branches on the 1st pass through the code? Answer a. b. Write the instruction the program jumps to when ba here-4 completes its branch? Answer...

  • A short program loop goes through a 16 kB array one word at a time, reads...

    A short program loop goes through a 16 kB array one word at a time, reads a number from the array, adds a random number, and stores the result in the corresponding entry in another array that is located in the memory immediately following the first array. An outer loop repeats the above operation 100 times. The 64-bit processor, operating at a clock frequency of 4 GHz, is pipelined, has 48 address lines, three levels of caches with a 64...

  • Create a program that performs the following operations: 1. Prompt for and accept a string of...

    Create a program that performs the following operations: 1. Prompt for and accept a string of up to 80 characters from the user. • The memory buffer for this string is created by: buffer: .space 80 #create space for string input The syscall to place input into the buffer looks like: li $v0,8 # code for syscall read_string la $a0, buffer #tell syscall where the buffer is li $a1, 80 # tell syscall how big the buffer is syscall 2....

  • 1) We would like to design a bus system for 32 registers of 16 bits each....

    1) We would like to design a bus system for 32 registers of 16 bits each. How many multiplexers are needed for the design? Select one: 5 16 1 4 32 2) The basic computer can be interrupted while another interrupt is being serviced. Select one: True False 3) If the Opcode bits of an instruction is 111, then the basic computer instruction type is either memory-reference or input-output. Select one: True False 4) The content of AC in the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT