Questions on Lab 3

Questions on Lab 3

par Gianluca Radi,
Number of replies: 2

Hello,

my teammate and I would have some questions regarding lab 3. Unfortunately, we were not able to find the specific forum on Moodle for that lab and hence we are writing on this one.

Firstly, we would like to know if there is a specific reason for the two different serial interfaces chosen for the two CPUs (one being UART and the other JTAG UART). In effect, we could not find an explanation in Altera's guide for multiprocessors systems, in which there is no explicit mention of this.

Secondly, in section 3.1, it is said that we should  "access a parallel port connected to the LEDs and incrementing a counter every 50 ms". Then, in section 3.2 "On each processor create a new task to increment a counter with the parallel port". However, we are not sure how we could use an output parallel port to increment a counter.

Thirdly, we would like to know if our understanding of sections 3.1 and 3.2 is correct. Is section 3.1 meant to use the PIO exclusive to each processor, whereas section 3.2 is meant to use the shared bid PIO with the aid of the mutex, so to possibly measure in time the difference between these access mechanisms? 

Then, in section 3.3, we are unsure if we should use the hardware mailbox to make one processor send a message to the other, or if we should somehow use a software mailbox. Our doubt arises from the fact that we are asked to "create a process with the RTOS to wait on a queue of messages to print", hence suggesting the use of a software mailbox.

Finally, we have some doubts about the different counters that should be employed throughout the lab. In particular, we were unable to understand if the "specific counter for performance evaluation" that should be assigned to every processor (section 3) is the same that we must use in section 3.4. If this is the case, shouldn't such a counter be shared rather than being exclusive to every processor? 

Thank you in advance for your answers.

In reply to Gianluca Radi

Re: Questions on Lab 3

par Victor Charles Jacques Herrmann,
Hello,

this is the answer that I can give.

1. The reason is that (as I know) you cannot have two JTAG UART in the same system (you will have conflict between the 2). So you need to use UART and export it on GPIO to have feedbacks of the other processor.

2. You have to read the value store in the registers of the IP, increment it and then write back to the registers of the IP.

3. Yes, you understand well.

4. You have to use the hardware mailbox to transfer messages between the 2 processors. You don't need software mailbox for this part.

5.No, it's not the same counter. Performance counter are use to see the execution time of some part of the code in each processor. For section 3.4, you need to add another piece of hardware to do this shared counter.
In reply to Victor Charles Jacques Herrmann

Re: Questions on Lab 3

par Tanguy Sagi Husseini,
It is actually possible to have two UARTs in a design. They will appear as distinct devices in the NIOS Build Tools and connect to each processor without issues. It simplifies debugging a lot, maybe consider changing the lab pdf for next year!