UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor dosman79
Visitor
8,278 Views
Registered: ‎05-30-2010

NPI addres

Hi,

 

I am trying to make a custom IP which I want to connect via NPI  port, with the MPMC module. I am using EDK 11.4 and board ML506.  Roots of my IP are in example http://www.xilinx.com/support/answers/24912.htm. MPMC is connected to Microblase(plb) and to my IP(NPI). My problem: I wrire the data do DDR2 and I can read this data from Microblaze at addres 0x00000000. But when I change PIM<Port_Num>_Addr for example 0x00001000 the MPMC write the data again on addres 0x00000000. Can anybody direct me, where can be problem, how can I change the starting address?

 

Tx in advance,

Petr

0 Kudos
12 Replies
Xilinx Employee
Xilinx Employee
8,212 Views
Registered: ‎07-30-2007

Re: NPI addres

I can't think what you could be doing wrong here- the NPI Address passess through the MPMC.  It of course has to be aligned to the burst length.

How do you know that the NPI is only writing to 0?  Are you checking with the PLB port?

Perhaps attach your MPMC MHS snippet.

0 Kudos
Visitor dosman79
Visitor
8,195 Views
Registered: ‎05-30-2010

Re: NPI addres

Hi Dylan,

I use Microblase and via PLB and RS232 I can read positions of DDR2 after writing via NPI. I attach the mhd file, I hope that will help to You to help me to solve this problem. Please correct me if I am wrong, when I have DDR2 and baseaddr is e.g. 0x90000000 and I want to write to addres 0x90000005, the NPI_ADDRES must be 0x00000005, yes?

 

Tx in advance,

Petr

0 Kudos
Xilinx Employee
Xilinx Employee
8,193 Views
Registered: ‎07-30-2007

Re: NPI addres

Petr,

 

You cannot write to address 0x9000005 since it is not aligned on a word or doubleword boundary.  This is an illegal operation to NPI, but is legal to PLB.

 

See the MPMC datasheet in the NPI PIM section for all the restrictions on using NPI (there are quite a few of them).

 

Dylan

0 Kudos
Visitor dosman79
Visitor
8,141 Views
Registered: ‎05-30-2010

Re: NPI addres

Hi Dylan,

I tryed to change the Address to 0x00000002, but no change. I don't understand to this. Please, can You send to me a small part of working project, I am interesting in mhs file and vhd file with writing throught NPI to DDR2. Be so kind and if it is possible send it to petr_dosek@email.cz  I hope it will help me to make next step to finish my problem.

Thank You for Your attention. 

 

Petr

0 Kudos
Xilinx Employee
Xilinx Employee
8,135 Views
Registered: ‎07-30-2007

Re: NPI addres

Address 0x2 is also not aligned to the width of the NPI interface. Try address 0x0.

 

If you still have problems, see the MPMC datasheet, in the NPI PIM section for a long list of requirements.

0 Kudos
Xilinx Employee
Xilinx Employee
8,118 Views
Registered: ‎08-01-2007

Re: NPI addres

Hi Petr

 

Why not just use 0x0 as the start point.

NPI transactions must have the PIM<Port_Num>_Addr address aligned to the size of the transactions, as spec-
ified by PIM<Port_Num>_Size. For example, a 32-word burst must have PIM<Port_Num>_Addr[6:0] set to 0.

 

For other start address, we need to check the burst length and so on.

0 Kudos
Visitor dosman79
Visitor
7,992 Views
Registered: ‎05-30-2010

Re: NPI addres

Hi Josh

I want to jump to different addr, because my program is bigger and I use DDR2(in linker script) to load the program to XC5. When I use starting poit 0x0 then I kill my program.

0 Kudos
Xilinx Employee
Xilinx Employee
7,967 Views
Registered: ‎08-01-2007

Re: NPI addres

Petr

 

It's fine to not start with 0x0, but the address you start with should be "PIM<Port_Num>_Addr address aligned to the size of the transactions" , the 0x2 doesn't follow this rule.

 

Another workaround for you, is just start with 0x0, and put your other code and the other range, you can change this with linkerscript, as PLB can handle the un-aligned issue, this could help you overcome the problem.

0 Kudos
Visitor dosman79
Visitor
7,599 Views
Registered: ‎05-30-2010

Re: NPI addres

Hi Josh,

sorry for long delay I was in a hospital. I follow your advice to change position of my code. Since I didnt know other way, I have tried to change location manually, but without success. I think I am doing something wrong. I have opened *.ld file and  I changed this:

Origin

   DDR2_SDRAM_MPMC_BASEADDR : ORIGIN = 0x50000000, LENGTH = 0x10000000

After

   DDR2_SDRAM_MPMC_BASEADDR : ORIGIN = 0x59000000, LENGTH = 0x07000000

 

I suppose that this changes base address of my code to  0x59000000 and I can access by NPI addresses from 0x50000000 to 0x58ffffff without worry overwritting my code. Is it true?

 

Size of my code:

 

mb-size aaaaa.elf
   text   data    bss    dec    hex filename
 175840   1492 2055776 2233108 221314 aaaaa.elf

 

mb-size test.elf  

text   data     bss     dec     hex filename 

175840   1492 2055776 2233108 221314 test.elf

 

size of test.elf is 638 304 Bytes

 

When I load and run the code:

 

 

MicroBlaze Processor Configuration :

-------------------------------------

Version............................7.20.d

Optimization.......................Performance

Interconnect.......................PLBv46

MMU Type...........................No_MMU

No of PC Breakpoints...............1

No of Read Addr/Data Watchpoints...0

No of Write Addr/Data Watchpoints..0

Instruction Cache Support..........on

Instruction Cache Base Address.....0x50000000

Instruction Cache High Address.....0x5fffffff

Data Cache Support.................on

Data Cache Base Address............0x50000000

Data Cache High Address............0x5fffffff

Exceptions  Support................off

FPU  Support.......................off

Hard Divider Support...............off

Hard Multiplier Support............on - (Mul32)

Barrel Shifter Support.............off

MSR clr/set Instruction Support....on

Compare Instruction Support........on

Data Cache Write-back Support......off

4

System Reset .... DONE

Downloading Program -- E:/EDK_projekty/NPI/SDK/SDK_Workspace/aaaaa/Debug/aaaaa.elf

section, .vectors.reset: 0x00000000-0x00000007

section, .vectors.sw_exception: 0x00000008-0x0000000f

section, .vectors.interrupt: 0x00000010-0x00000017

section, .vectors.hw_exception: 0x00000020-0x00000027

section, .text: 0x59000000-0x59029ba3

section, .init: 0x59029ba4-0x59029bcb

section, .fini: 0x59029bcc-0x59029beb

section, .rodata: 0x59029bec-0x5902aebf

section, .data: 0x5902aec0-0x5902b47b

section, .ctors: 0x5902b47c-0x5902b483

section, .dtors: 0x5902b484-0x5902b48b

section, .eh_frame: 0x5902b48c-0x5902b48f

section, .jcr: 0x5902b490-0x5902b493

section, .bss: 0x5902b498-0x592192f7

section, .heap: 0x00000050-0x0000404f

section, .stack: 0x00004050-0x0000804f

Setting PC with Program Start Address 0x00000000

Safe Mode is disabled.

Setting breakpoint at 0x5901a9f4

Everything looks good,but the program doesnt write any text to the terminal as it should. Do You have any other advice to solve my problem?? 

 

 

0 Kudos
Explorer
Explorer
3,346 Views
Registered: ‎03-25-2010

Re: NPI addres

Hello,

 

Actually I begin with NPI few days ago, I am still trying to understand how it works and the Tools available for develop it. I am new with Xilinx.

 

I just have a question for you, instead than an answer.

 

Why do you have 2 clocks in your system, 1 at 100MHz for the PLB and other at 200MHz for the MPMC?

 

Thank you.

 

Regards,

 

 

DABG

0 Kudos
Explorer
Explorer
3,323 Views
Registered: ‎07-08-2008

Re: NPI addres

Hi,

 

You need to have two clocks since you are attaching the MPMC to the DDR memory which is double rate.

This means that the system and user logic is clocked at 100MHz and the part between MPMC and DDR at 2x system clock which is 200MHz.

 

Greetings, Mariusz 

--
Mariusz Grad.
0 Kudos
Explorer
Explorer
3,320 Views
Registered: ‎07-08-2008

Re: NPI addres

This code will not start (execute) at all.

In your output you can see:

 

 

 section, .text: 0x59000000-0x59029ba3

Setting PC with Program Start Address 0x00000000

Greetings, Mariusz

 

--
Mariusz Grad.
0 Kudos