ppc 405 in debug halt mode

Hi all, Iam using ml310 board and in my design Iam using two PPC 's. To my needs I want to collect the addresses of the instructions executed on PPC 1. I run application on PPC1 and collects Program counter data and writes to FIFO. Later I want to put halt (execution break) to PPC1 and through PPC2 I want to collect these data from FIFO.

to place PPC1 in halt mode I raised pin called DBGC405BEBUGHALT to 1....but I found PPC never stops execution...its continuing normally. Later I tested by raising pin DBGC405UNCONDDEBUGEVENT ...then also I observe the same.

do someone of you kindly suggest me why it happens? and how can I place PPC in halt mode.

is it possible to trace Program counter by some other means?

thank you for your time and consideration.

regards Jaggu

Reply to
jaggu
Loading thread data ...

Typically, program counter information is collected by external tools through the processor's trace port. The ML310 has such a trace port and tools can be bought from 3rd parties, for example RiscWatch from IBM.

Asserting DBGC405BEBUGHALT does halt the processor. You might want to check the logic you are using.

Other methods to stop the processor are writing a 1 to MSR[WE] from software or through an external debugger. However, for the first method you will need an interrupt to get the processor out of sleep mode.

- Peter

jaggu wrote:

needs I want to collect the addresses of the instructions executed on PPC 1. I run application on PPC1 and collects Program counter data and writes to FIFO. Later I want to put halt (execution break) to PPC1 and through PPC2 I want to collect these data from FIFO.

found PPC never stops execution...its continuing normally. Later I tested by raising pin DBGC405UNCONDDEBUGEVENT ...then also I observe the same.

halt mode.

Reply to
Peter Ryser

Hello Peter,

Thanks a lot.

Actually in my design JTAG controls the DGBC405DEBUGHALT pin of the PPC1, i just OR-ed debug signal from JTAG and debug halt from my core such that both of them can control the processor execution. To my suspect i directly assigned halt signal '1'so that processor halts at begining of program,but unfortunately it didn't stopped.

Do i need to take some other aspects into consideration to halt PPC1?

You mean that once we send processor to debug halt mode we need to give interupt to bring back for resume execution apart from making DBGC405DEBUGHALT '1'?

Thnaking You.

With Regards, Jaggu

Reply to
Jagadeesh

The HALT pin on the debug connector of the ML310 is defined as low-active. In the reference design the sense of the signal is then inverted to generate the high-active DBGC405DEBUGHALT signal that goes to the processor.

So, if you use the pin on the connector to halt the processor you need to tie it to a '0'.

You only need to generate an interrupt if the software sets MSR[WE]. Asserting/deasserting DEBUGHALT does not require an additional interrupt.

- Peter

Jagadeesh wrote:

just OR-ed debug signal from JTAG and debug halt from my core such that both of them can control the processor execution. To my suspect i directly assigned halt signal '1'so that processor halts at begining of program,but unfortunately it didn't stopped.

interupt to bring back for resume execution apart from making DBGC405DEBUGHALT '1'?

Reply to
Peter Ryser

thanks Peter..

how can I run seperate standalone programs on both PPC's simultaneously, especially how can I download onto target. I couldnt do "update bitstream" as it says elf file associated with PPC_1 should be downloaded thorugh jtag..via gdb. only 1 program which is asscocited with ppc_0 am able to update with bitsream.

thank you for your time and consideration,

regards Jaggu

Reply to
jaggu

To run two seperate standalone programs on both PPCs simultaneously follow these steps. I assume that both processors are on the same PLB and share BRAM (e.g. 64KB) at the top of the address space.

  1. Enable bootloop for one of the processors. This will add a small program to the BRAM at address -4 (reset vector) that loops to itself. Both processors will execute this program once they come out of reset.

  1. Add a standalone program to the software projects and associate it to the first processor. In my example I run this program from address [-64K, -32K[, i.e. give it a start address of 0xffff0010. Now, map the .boot and .boot0 sections to the beginning of that area by adding

-Wl,--section-start,.boot=0xffff0000 -Wl,--section-start,.boot0=0xffff0004 to "Additional Compiler Flags". Alternatively, you can write your own linker script (see documentation) to achieve the same result

  1. Repeat the step above for the second processor but change all address to map into the [-32k, -4[ address range.
  2. Compile your software projects.
  3. Use XMD to download both programs. You can start two XMDs and use one to connect to the first processor with connect ppc hw and the other one to the second processor with connect ppc hw -debugdevice cpunr 2 Alternatively, you can use one XMD and work from there.

I hope this helps.

- Peter

jaggu wrote:

especially how can I download onto target. I couldnt do "update bitstream" as it says elf file associated with PPC_1 should be downloaded thorugh jtag..via gdb. only 1 program which is asscocited with ppc_0 am able to update with bitsream.

Reply to
Peter Ryser

Hi Peter, Thank you for your great support, now am able to run standalone applications on both PPC's simultaneously and trace the PC.

Now I am trying to run linux on 1 st PPC and standalone program on 2nd ppc. Iam facing one problem, linux booting hangs in middle, the reason I suspect is FIFO collects the instructions adresses , when the full flag is raised ,my module raises DBGC405DEBUGHALT pin to '1' which breaks the processor execution, after collecting FIFO data through 2nd PPC , my logic places DBGC405DEBUGHALT in '0', I found here my 1 st PPC doesn't runs (expected to run Linux)...it just hangs.

I get message processor stopped at adress ....

do I need to take care of something else ...to start and stop processor execution under linux...apart from raising and lowering DBGC405DEBUGHALT signal...?

thanks for your time and consideration,plz do support me to resolve this...

regards Jaggu

Reply to
jagadeesh

hello...any pings to my above problem is highly appreciated....

thanking you

jaggu

Reply to
jagadeesh

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.