Understanding Memory in Nios II

In summary, the conversation is discussing the value held in register r7 after the instructions "addi r5, r0, 0x30" and "ldw r7, 0(r5)" are executed. Two methods are suggested for determining the value, with the first method using word addresses and the second method using register numbers. The conversation also mentions the availability of documentation for the processor and suggests using the manual for the Assembler to understand the instruction syntax and addressing modes.
  • #1
Lapse
49
4

Homework Statement


s4q18TZhCjMbtN-asYlZYHKvnS8TxLoX6NuNq5hfDaX1yTWQfnYfLrNH_0-GRur2i-g4FKG3_9EOw7IUCW5bogCXL8Qr5gXd.png


My specific question is:
What is the value held in r7 (written in hexadecimal) after the following instructions execute?
addi r5, r0, 0x30 ldw r7, 0(r5)


Homework Equations



N/A

The Attempt at a Solution



There's a few things I'm not understanding...

Here are my attempts:

Method 1:
r5 = r0 + 0x30 = 0xABCDEFAA + 0x30 = 0xABCDF01A
r7 = r5 + 0 = 0xABCDF01A

Notice that I assigned the "word address" values as the "register values". Is this correct? Is a word address the same as a register?

Method 2:
r5 = r0 + 0x30 = 0 + 0x30 = 0x30
r7 = r5 + 0 = 0x30



Here, I assumed no value was given for the registers, so I assigned the register number as the register value; i.e. r0 = 0, or r2 = 2. Is this the correct method?
 

Attachments

  • s4q18TZhCjMbtN-asYlZYHKvnS8TxLoX6NuNq5hfDaX1yTWQfnYfLrNH_0-GRur2i-g4FKG3_9EOw7IUCW5bogCXL8Qr5gXd.png
    s4q18TZhCjMbtN-asYlZYHKvnS8TxLoX6NuNq5hfDaX1yTWQfnYfLrNH_0-GRur2i-g4FKG3_9EOw7IUCW5bogCXL8Qr5gXd.png
    10.8 KB · Views: 478
Physics news on Phys.org
  • #2
Afraid you will have to read the documentation for the processor. It is available at:
https://www.intel.com/content/alter...tation/iga1420498949526.html#iga1409257893438

In the Table of Contents tree along the left side of the page, start at "Programming Model".
You may also need to find the manual for the Assembler to help in figuring out the instruction syntax and the addressing modes.

There is always the possibility that someone reading this is familiar with the NIos II and is willing to help, but don't count on it.

Sorry.
 
  • Like
Likes anorlunda

1. What is Nios II?

Nios II is a 32-bit soft-core processor designed by Intel for use in field-programmable gate arrays (FPGAs). It is used in embedded systems and is highly customizable and scalable.

2. How does Nios II handle memory?

Nios II has a Harvard architecture, meaning it has separate instruction and data memory spaces. It also has a memory management unit (MMU) that allows for virtual memory support and protection.

3. What is the role of the Memory Interface Generator (MIG) in Nios II?

The Memory Interface Generator (MIG) is a tool provided by Intel that allows for easy integration of external memory interfaces with the Nios II processor. It generates a custom memory controller that can interface with a variety of memory devices.

4. How does Nios II optimize memory access?

Nios II uses a memory hierarchy, with multiple levels of cache memory, to optimize memory access. It also supports pipelining and out-of-order execution, which can improve memory access speed.

5. What are some common challenges in understanding memory in Nios II?

Some common challenges in understanding memory in Nios II include understanding the different types of memory available, configuring and integrating external memory interfaces, and optimizing memory access for specific applications.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
9K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Programming and Computer Science
Replies
4
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top