Chapter 8 autocode sim cdelay scheduler, Introduction, Introduction -1 – National Instruments AutoCode NI MATRIX User Manual

Page 211: Er 8, Autocode sim cdelay scheduler

Advertising
background image

© National Instruments Corporation

8-1

AutoCode Reference

8

AutoCode Sim Cdelay Scheduler

This chapter discusses the Sim Cdelay low-latency scheduler.

Introduction

The default AutoCode scheduler is based on high throughput. Latency is
acceptable as long as scheduler interrupt times are frequent. Because of this
emphasis, each scheduler cycle is kept to an absolute minimum so that task
queuing and output posting occurs only once per cycle. While providing
high throughput and determinacy, this strategy has an impact on the latency
of triggered and enabled tasks. For example, after an enable goes high, it
takes one cycle for the task to be queued, and a second cycle before the
output gets posted. This process works similarly for triggered tasks. The
upshot is that the current AutoCode scheduler incurs a two-cycle delay
when firing off any enabled or triggered tasks, and a sequence of such
delays in firing off chains of such tasks.

The MATRIXx product line lets you reproduce the behavior of the
generated code with Sim. To match the default AutoCode scheduler, Sim
can be invoked with the

actiming

option. However, a Sim user also has

available two simulation options that do not mimic the default AutoCode
scheduler:

Sim with Cdelay

Sim without Cdelay

While Sim without Cdelay represents an unrealistic goal for a real-time
system (no computational delay for any device), Sim with Cdelay not only
is realizable on real-time hardware, it avoids the latency problems that
plague Sim with

actiming

, while preserving determinacy. Its only

drawbacks are that it requires a slightly longer overhead per scheduler
invocation, and it cannot completely escape the latency problems present in
the default AutoCode scheduler if chained ANC tasks are present in the
model. Despite these limitations, it is vastly superior to the default
AutoCode scheduler at latency reduction.

The remainder of this chapter describes a new AutoCode scheduler that
matches the Sim with Cdelay behavior and is capable of executing on

Advertising