I'm wondering if mmap can be used on a synchronous stream. Lets say I have an 8-bit wide synchronous stream and I want to store pointers to given set of byte values that correspond to a 100 byte array of data on my FPGA.
- Code: Select all
int fd, pagesize;
char *fpga_data;
// Open device and mmap
pagesize = getpagesize();
int fd = open("/dev/xillybus_sync8", O_RDWR);
fpga_data = mmap((caddr_t)0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, pagesize);
// Mess with data
*(fpga_data + 10) = 0x22;
Is this possible? Will this mess with the synchronization guarantees that read()/write() provide for synchronous streams?
Thank you.