LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Split 100Mbit bitstream

Hi all,

 

I'm having trouble with splitting my bitstream, my bitstream should be like this:

pict.png 

It is a 1D array of 100Mbit or more of "1" or "0". (coming from a file)

1). First, I need to check if there is "1" (orange) coming after many zeros (yellow).

2). Then, if its there, I need to save the next 1308 bit into 109 different files (12 bit each, converted into an integer value).

3). Then, check again, back to step 1.

 

It sounds easy, but yet, I still dont get it right.

The other thing is, how should I split my 100Mbit into smaller pieces when I dont really know how many zeros (yellow) is there.

I have a VI with me trying to do it, but it runs very slow to execute 100Mbit.

 

regards,

Yan.

0 Kudos
Message 1 of 6
(3,423 Views)

 

1). First, I need to check if there is "1" (orange) coming after many zeros (yellow).

 

How many are many? If it's more than 15 it would be the 1st byte with 0's (as the other bits could land in the byte before/after). Would this pose a problem with the 12 bit data, or can they include 8 bits? If it's longer it should be easier.

 

As for performance it'd probably be efficient to handle data as bytes instead of individual bits.

/Y

 
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 6
(3,406 Views)

Hi Y,

this "many" could be variable, thats why im having trouble in splitting the bitstream in the first place.

However they will be there after 1309 bits.

 

I was thinking to index the file read with 1, but i think it would take too long to read out 100 Mbit and split them into 109 different files.

 

regards,

Yan.

0 Kudos
Message 3 of 6
(3,398 Views)

So basically:

open 109 file refs

Loop

- look for 1st byte != 0

- extract 1309 bits

- write to files

End loop

Close files

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 6
(3,384 Views)

Exactly! with conversion of each 12 bit into an integer value.

how do you do it in LabVIEW?

 

regards,

Yan.

0 Kudos
Message 5 of 6
(3,381 Views)

Either logical functions (AND) on a bigger integer to filter out the correct bits (which'd include typecast and stuff), or boolean array to int with 12 elements as a time. The latter is easier, but alot more memory consuming.

 

But, as they say, first make it run, then make it run fast. 😉

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 6
(3,378 Views)