Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 1999 11:00:24 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Seigo Tanimura <tanimura@naklab.dnj.ynu.ac.jp>
Cc:        julian@whistle.com, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: Rewriting pca(4) using finetimer(9) (was: Re: MPU401 now worksunder New Midi Driver Framework with a Fine Timer)
Message-ID:  <Pine.BSF.4.10.9907081056510.558-100000@salmon.nlsystems.com>
In-Reply-To: <199907080940.SAA26649@rina.naklab.dnj.ynu.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Jul 1999, Seigo Tanimura wrote:

> On Thu, 8 Jul 1999 09:54:42 +0100 (BST),
>   Doug Rabson <dfr@nlsystems.com> said:
> 
> dfr> If I understand this correctly, you are suggesting that we program timer0
> dfr> so that we only take interrupts when a finetimer is due to fire? If so,
> dfr> then it sounds very good. The idea of taking 6000+ interrupts/sec made me
> dfr> uneasy, even though most would return without doing any work.
> 
> 
> Yes, that is what I am doing now. And some further discussion...
> 
> > 	t' > \sum_(k=0)^(j) dt_rem(c_k)
> > 
> > where the right hand side of the inequality is the time span after which
> > the callout c_k is made. Then c' is inserted after c_j and new dt_rem(c_(j+1))
> > and dt_rem(c_(j+2)) are determined. Now we can acquire_timer0() with dt_rem(c_0).
> 
> If t' is less than dt_rem(c_0) then we have no feasible j. This is the case
> in which we must reaquire_timer0() using t'. Then, after interting c', dt_rem(c_1)
> is updated to be (dt_rem(c_1) - (time elapsed since the last aquire_timer0())),
> so that c_1 can be armed later.
> 
> 
> There is one problem in this method. acquire_timer0() is only implemented
> for i386. We would need to write something equivalent for alpha...

The timer hardware on the alpha is essentially the same but the interrupts
are wired up differently. I'm not sure how hard it would be to get timer0
working but I think it should be possible.

The alphas tend to run the main clock quite fast (typically 1024hz) so the
granularity of timing is better but probably not good enough for midi or
pca.

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9907081056510.558-100000>