Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

How to target memory mapped by pcie testbench?

hi guys!!:)

I'm try simulate a PCIe communication and I'm setup a testbench.

I just use BAR0 whose size is 4MBytes - 22bit.

The address of that memories slaves are:

Memorie 1 : 0x0000_0000 - 0x001f_ffff

Memorie 2 : 0x0020_0000 - 0x0020_3fff

Memorie 3 : 0x0020_4000 - 0x0020_41ff

memorie 4 : 0x0020_4200 - 0x0020_420f

Well I need to target the fourth memory, but I've cant to get good results.

In the testbench there's a task which target a memory. The next is the code:

target_mem_test(

bar_table, // bar size/address info for endpoint

tgt_bar, // bar to access target memory with

32'h0000, // starting offset from bar

512 // length of memory to test 512

);

my questions are next::confused:

How I can to target to the fourth memory mapped??

That code can let me to target to fourth memory mapped?

Well, I've setup two parameters and code was like:

target_mem_test(

bar_table, // BAR Size/Address info for Endpoint

tgt_bar, // BAR to access target memory with

24'h204200, // starting offset from bar

16 // length of memory to test 512

);

I've changed that parameters because the 4th memory begin in 0x0020_42 and the length of that memory is 16.(but it doesn't work):cry:
No RepliesBe the first to reply