cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aronfeher
Visitor
Visitor
3,070 Views
Registered: ‎12-09-2015

Please help with custom filter IP

Jump to solution

Hello everyone.

Recently I wanted to create a simple balancing controller system with ZYBO board in Vivado and HLS. The plan is as follows: I measure the angle with a potmeter, and conveert the analog values with XADC. After conversion, I transform the values to angles. So far it works.

I've created a custom IP in HLS to filter the input data but I only get 0.000 as return value after the filtering.

I've attached the cpp file used in HLS, which was previously tested, and it works.

I've also attached main c file used in SDK.

 

The problem is, I don't know where to look for the problem, so any help would be appreciated.

 

With regards,

Fehér Áron.

0 Kudos
1 Solution

Accepted Solutions
muzaffer
Teacher
Teacher
5,388 Views
Registered: ‎03-31-2012

@aronfeher verify your float_to_u32 and reverse functions carefully and check the values which go into them during runtime to see if you get what you expect. Also I think your original code of waiting till done is set and reading the output makes more sense than the current loop. Why did you change it?

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

0 Kudos
2 Replies
muzaffer
Teacher
Teacher
5,389 Views
Registered: ‎03-31-2012

@aronfeher verify your float_to_u32 and reverse functions carefully and check the values which go into them during runtime to see if you get what you expect. Also I think your original code of waiting till done is set and reading the output makes more sense than the current loop. Why did you change it?

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

0 Kudos
aronfeher
Visitor
Visitor
2,886 Views
Registered: ‎12-09-2015
Thank you. Somehow I left the return type as unsigned int, and no matter how many times I went over it, I did not see it.
0 Kudos