Currently I'm working with micorblaze and Kintex 7 board, for Pseudo_random bit sequence (PRBS) function. I have created HLS IP (PRBS), integrated IP with vivado and exported it to SDK. But in SDK, i am getting only "Single bit" value instead of sequence of random bits. Please anyone guide me. What`s wrong in my coding? Need help from anyone.
I need to get non-stop stream of random bits out of the IP and to display on Tera Terminal through XSDK.
Question
Thausikan
Hi,
Currently I'm working with micorblaze and Kintex 7 board, for Pseudo_random bit sequence (PRBS) function. I have created HLS IP (PRBS), integrated IP with vivado and exported it to SDK. But in SDK, i am getting only "Single bit" value instead of sequence of random bits. Please anyone guide me. What`s wrong in my coding? Need help from anyone.
I need to get non-stop stream of random bits out of the IP and to display on Tera Terminal through XSDK.
Hls Source code
#include <stdint.h>
#include <stdio.h>
#include "ap_cint.h"
int PRBS_prj(int bit)
{
#pragma HLS INTERFACE s_axilite port=return bundle=a
int start_state = 0xCD;
int lfsr = start_state;
unsigned period = 0;
do
{
/* taps: 3, 2 and 1 ; feedback polynomial: x^3 + x^2 + 1 */
bit = ((lfsr >> 0) ^ (lfsr >> 2) ^ (lfsr >> 3) ^ (lfsr >> 4) ) & 1;
printf("%d", bit);
lfsr = (lfsr >> 1) | (bit << 7);
++period;
} while (lfsr != start_state);
return bit;
}
or
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.