Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
19842 Discussions

How to target memory mapped by pcie testbench?

Honored Contributor II

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: 



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: 



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:
0 Kudos
0 Replies