#include <stdint.h>
#include <stdio.h>

#define NET_PACKET_RINGBUF_SIZE		(256)
#define NET_PACKET_RINGBUF_SIZE_MASK        (NET_PACKET_RINGBUF_SIZE - 1)
#define FILTER_SIZE	(16)

uint16_t i, j, rb_index, sample_index;
uint16_t ringbuf[NET_PACKET_RINGBUF_SIZE];


int main(void){
	i = 0;
	j = 512;
	while(i < NET_PACKET_RINGBUF_SIZE){
		ringbuf[i] = i;
		i++;
	}

	while(j){
		i = 0;
		while(i < FILTER_SIZE){
			rb_index  = (sample_index - i) & NET_PACKET_RINGBUF_SIZE_MASK;
			printf("sample\t%ld\trb_idx\t%d\trb_val\t%d\n", sample_index, rb_index, ringbuf[rb_index]);
			i++;
		}
		sample_index++;
		j--;
	}
}
