GRIFFINCollaboration / data-spy

an online parser of raw GRIFFIN data
http://griffincollaboration.github.io/data-spy
MIT License
1 stars 0 forks source link

word XIII < 32 bits #4

Open bkatiemills opened 8 years ago

bkatiemills commented 8 years ago

according to the docs, type XIII words are 4 byte words consisting of:

Where are the other 4 bits?

r3dunlop commented 8 years ago

What we use in the sort code is

bkatiemills commented 8 years ago

what they're used for, or just where they are in the pattern.

Also @r3dunlop: missing bits aside, this doesn't match the spec; do the docs need to be updated? I can do with the rest of the corrections, if that's definitely what's happening. Moreover, are any of the other words different than what's described there?

r3dunlop commented 8 years ago

Here is the parsing code block:

        case 0xe0000000:
            // changed on 21 Apr 2015 by JKS, when signal processing code from Chris changed the trailer.
            // change should be backward-compatible
            if((value & 0x3fff) == (EventFrag->ChannelId & 0x3fff)){
               if(!TGRSILoop::Get()->GetSuppressError() && EventFrag->DataType == 2) {
                  // check whether the nios finished and if so whether it finished with an error
                  if(((value>>14) & 0x1) == 0x1) {
                     if(((value>>16) & 0xff) != 0) {
                        printf( BLUE "0x%04x: NIOS code finished with error 0x%02x" RESET_COLOR "\n",EventFrag->ChannelAddress, (value>>16) & 0xff);
                     }
                  }
               }

So first 4 bits are the label, next 8 are ??? next 8 are NIOS code, next 2 are NIOS flag last 14 bits are channel Id. The current documentation is quite old now and I guess no one has gotten around to updating it. I can check to see if anything else is out of order.

The other thing to be aware of is that there are PPG events hidden inside of GRIF events now. These have a different event format. I can lay that out in another issue for you.

bkatiemills commented 8 years ago

Cool, thanks - so there's some ill-defined bits after the event label, got it.

PPG events specification: yes please!

SmithJK commented 8 years ago

This is going to change soon. There will be some kind of Accepted Channel Trigger ID here.

SmithJK commented 8 years ago

The NIOS errors should only come from the 4Gs, I think. @VinzenzBildstein, can you confirm this?

r3dunlop commented 8 years ago

If that’s true, then what are the rest of the bits in the trailer in the GRIF 16’s?

On Nov 16, 2015, at 2:36 PM, SmithJK notifications@github.com wrote:

The NIOS errors should only come from the 4Gs, I think. @VinzenzBildstein https://github.com/VinzenzBildstein, can you confirm this?

— Reply to this email directly or view it on GitHub https://github.com/GRIFFINCollaboration/data-spy/issues/4#issuecomment-157146139.

SmithJK commented 8 years ago

Good question. It's a shame Chris Pearson isn't on here. I'll send an email.

r3dunlop commented 8 years ago

Just add him as GRSIUser when he isn’t looking… :P

On Nov 16, 2015, at 2:38 PM, SmithJK notifications@github.com wrote:

Good question. It's a shame Chris Pearson isn't on here. I'll send an email.

— Reply to this email directly or view it on GitHub https://github.com/GRIFFINCollaboration/data-spy/issues/4#issuecomment-157146509.

VinzenzBildstein commented 8 years ago

Yes, the NIOS errors were only implemented for the 4Gs (and only for some time), they will most likely be removed. I'm not sure yet what the final version of the trailer word will be for the 4Gs, but most likely it will be the same as the GRIF-16s.