S
Syed Huq
Guest
Hi guys,
I'm trying to implement trigger logic to keep storing trigger events which include pre-trigger data in a BRAM block.
The following logic is what I'm trying to implement. I'm not sure how viable it is or if I'm missing something in there, but I have a few doubts on how I'm going to implement certain things:
-The BRAM is 8-bits wide and 4096 bits deep. Each 8-bit data location is a sample.
Each trigger event is 64 address locations so I'm trying to create small ring buffers within the BRAM. One issue would be as to how I would generate the addresses for the 64 addresses. Would I use a mod-6 up counter ? Basically, whenever a trigger event occurs, I want 32 pre-trigger samples and 32 post-trigger samples in the 64 data locations. So whenever a trigger occurs, I start a 5-bit down counter for the 32 post-trigger data locations. Once this is filled, I'd move on to the next block of address locations.
So I'm kind of splitting my 4096 address locations into blocks of 64 address locations. Once the first trigger event is completed, I'd move on to the second block of addresses. But I'm having trouble trying to understand how I would accomplish this.
Now my second ring buffer would be from location 64 - 127, so would I have to use a separate counter from 64-127 ? Ideally, I'd want to use the same up-counter. Can someone give me a hint on how I would accomplish this efficiently ? Am I missing something here ?
-Syed
I'm trying to implement trigger logic to keep storing trigger events which include pre-trigger data in a BRAM block.
The following logic is what I'm trying to implement. I'm not sure how viable it is or if I'm missing something in there, but I have a few doubts on how I'm going to implement certain things:
-The BRAM is 8-bits wide and 4096 bits deep. Each 8-bit data location is a sample.
Each trigger event is 64 address locations so I'm trying to create small ring buffers within the BRAM. One issue would be as to how I would generate the addresses for the 64 addresses. Would I use a mod-6 up counter ? Basically, whenever a trigger event occurs, I want 32 pre-trigger samples and 32 post-trigger samples in the 64 data locations. So whenever a trigger occurs, I start a 5-bit down counter for the 32 post-trigger data locations. Once this is filled, I'd move on to the next block of address locations.
So I'm kind of splitting my 4096 address locations into blocks of 64 address locations. Once the first trigger event is completed, I'd move on to the second block of addresses. But I'm having trouble trying to understand how I would accomplish this.
Now my second ring buffer would be from location 64 - 127, so would I have to use a separate counter from 64-127 ? Ideally, I'd want to use the same up-counter. Can someone give me a hint on how I would accomplish this efficiently ? Am I missing something here ?
-Syed