04-16-2014 06:36 AM - edited 04-16-2014 06:43 AM
I think is is possible but not sure what the best practice would be to achieve the solution
Basically I carried out a number of operations to produce a 1D arrary of 50 bits.
I want to split that arrary and/or calulate the parity based the bits if they were split into 5 columns 10 rows and then carry out parity check on those 10 rows indiviually.
the pic below shows the example based on the first 15 bits but needs to be all 50 for the actual code its just to show the kind of result I want to achieve I just dont have a clue the best way to go about. I thought about indexing every 5th bit but I have to be honest not sure how to code that or if thats the best way to go about it.
04-16-2014 06:57 AM
I am sure someone will come up with a better approach, here is mine:
04-16-2014 07:13 AM - edited 04-16-2014 07:20 AM
04-16-2014 07:24 AM - edited 04-16-2014 07:24 AM
Thanks GerdW.
For completeness, here is one with recommended changes.
04-16-2014 07:34 AM
Sorry peops! I forgot to mention - I am using FPGA compact rio, I cant use 2D arrarys.
Thats why my head is about to explode
04-16-2014 07:43 AM
@hawkstringer wrote:
Sorry peops! I forgot to mention - I am using FPGA compact rio, I cant use 2D arrarys.
Thats why my head is about to explode
Nice one.
As it is FPGA, your array size will remain fixed. You could use a decimate 1-d array with 5 outputs.
04-16-2014 10:30 AM
Also, since you are in FPGA, you probably want to go slightly different route for calculating your parity for the sake of saving resources.
Use a FOR loop with an XOR in it. Save the parity on a shift register and autoindex your boolean values. So you are XORing your parity with each value and storing the result back in the shift register. Since you are dealing with odd parity, initialize your shift register to TRUE.
04-17-2014 07:25 AM
Thanks so far. I have created the For Loop, but its is not giving me the correct parity. I am not concered at this point whether the parity bit is true or false but this is not giving me the result I need:
04-17-2014 07:53 AM
Your example in the first post is showing parity on the COLUMS, not the row. So you actually need to split things up into 10 to do the parity, not 5. I'll try to get something put together soon that should work for you.
04-17-2014 08:07 AM
Here: