Shmem_write, Shmem_read function – Altera Arria 10 Avalon-MM User Manual

Page 182

Advertising
background image

Constant

Description

SHMEM_FILL_QWORD_INC

Specifies a data pattern of incrementing 64-bit qwords

(0x0000000000000000, 0x0000000000000001,

0x0000000000000002, etc.)

SHMEM_FILL_ONE

Specifies a data pattern of all ones

shmem_write

The

shmem_write

procedure writes data to the BFM shared memory.

Location

altpcietb_bfm_driver_rp.v

Syntax

shmem_write(addr, data, leng)

Arguments

addr

BFM shared memory starting address for writing data

data

Data to write to BFM shared memory.
This parameter is implemented as a 64-bit vector.

leng

is 1–8

bytes. Bits 7 downto 0 are written to the location specified by

addr

; bits 15 downto 8 are written to the

addr+1

location, etc.

length

Length, in bytes, of data written

shmem_read Function

The

shmem_read

function reads data to the BFM shared memory.

Location

altpcietb_bfm_driver_rp.v

Syntax

data:= shmem_read(addr, leng)

Arguments

addr

BFM shared memory starting address for reading data

leng

Length, in bytes, of data read

Return

data

Data read from BFM shared memory.
This parameter is implemented as a 64-bit vector.

leng

is 1- 8

bytes. If

leng

is less than 8 bytes, only the corresponding least

significant bits of the returned data are valid.
Bits 7 downto 0 are read from the location specified by

addr

;

bits 15 downto 8 are read from the addr+1 location, etc.

14-32

shmem_write

UG-01145_avmm

2015.05.14

Altera Corporation

Avalon-MM Testbench and Design Example

Send Feedback

Advertising