Gedae Advanced Course End Of Segment Processing - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Gedae Advanced Course End Of Segment Processing

Description:

Apply method sums input but produces nothing ... Schedule 4 calculates average dc value from end-of-segment result s of schedule2 ... – PowerPoint PPT presentation

Number of Views:137
Avg rating:3.0/5.0
Slides: 13
Provided by: kerrybri
Category:

less

Transcript and Presenter's Notes

Title: Gedae Advanced Course End Of Segment Processing


1
Gedae Advanced CourseEnd Of Segment Processing
  • Kerry Barnes
  • (856) 231-4458
  • gedae_at_gedae.com

2
EndOfSegment Method
  • The segsum primitive
  • Sums segment data
  • Produces sum at EOS
  • The segcnt primitive
  • counts samples in segment
  • produces count at EOS
  • EndOfSegment method is called once at EOS
  • Allows primitive to do special processing for EOS
  • Primitive can produce data samples at EOS

3
The segsum Primitive
  • Interpolate rate is 0 so no space is required on
    output queue during Apply
  • Constant requirement is 1 so 1 token is reserved
    for EndOfSegment
  • Apply method sums input but produces nothing
  • EndOfSegment copies sum to output and produces 1
    token
  • Name segsum
  • Type static
  • Input stream float in
  • Local float sum
  • Outputdynamic float out(0,1)
  • Reset
  • sum 0
  • Apply
  • int i
  • for (i0 iltgranularity i)
  • sum ini
  • EndOfSegment
  • out sum
  • produce(out,1)

4
Summary Segment Results
  • Scope3 displays
  • Segment energy
  • Segment length
  • Average power per sample

5
Example 1 Trace Table
  • EndOfSegment methods called at end of segment
    processing
  • Reset methods called at beginning of segment
    processing

6
Example 1 Trace Table
  • EndOfSegment methods called at end of segment
    processing
  • Segment boundaries automatically added
  • EOS occurs after all segment tokens produced by
    source are consumed

Data produced by EOS methods
7
Exercise 1
8
Exercise 2
  • Replace circled boxes with a single box that
    calculates the average value of the segment

9
Exercise 1 Completed
Name subK Type static Input stream float
in nondet stream float K Output
stream float out Include include
lte_vsadd.hgt Apply amount(K,1) if
(queues_ready) e_vsadd(in,1,-K,out,1,gran
ularity)
10
Exercise 1 Trace Table
  • Trace table with scope removed
  • Schedule 2 does initial segment processing
  • Schedule 4 calculates average dc value from
    end-of-segment result s of schedule2
  • Schedule 3 waits for average dc value from
    Schedule 4 before it can do final segment
    processing

11
Exercise 2 CompletedInformational and Data Fields
  • Name segave
  • Type static
  • Input
  • stream float in
  • Local
  • float sum
  • int cnt
  • Output
  • dynamic stream float out(0,1)

12
Exercise 2 CompletedMethods
  • Reset
  • sum 0
  • cnt 0
  • Apply
  • int i
  • for (i0 iltgranularity i)
  • sumini
  • cnt granularity
  • EndOfSegment
  • out sum/cnt
  • produce(out,1)
Write a Comment
User Comments (0)
About PowerShow.com