Related articles |
---|
Specifying time limits in source code ? hat@se-46.wpa.wtb.tue.nl (1999-07-14) |
Re: Specifying time limits in source code ? chase@world.std.com (David Chase) (1999-07-19) |
Re: Specifying time limits in source code ? cbrtjr@ix.netcom.com (Charles E. Bortle, Jr.) (1999-07-19) |
Re: Specifying time limits in source code ? rweaver@ix.netcom.com (1999-07-19) |
Re: Specifying time limits in source code ? kgatlin@cs.ucsd.edu (KSG) (1999-07-19) |
Re: Specifying time limits in source code ? dtruong@irisa.fr (Dan Truong) (1999-07-20) |
Re: Specifying time limits in source code ? mslamm@mscc.huji.ac.il (Ehud Lamm) (1999-07-20) |
Re: Specifying time limits in source code ? mslamm@mscc.huji.ac.il (Ehud Lamm) (1999-07-21) |
Re: Specifying time limits in source code ? gneuner@dyn.com (1999-07-23) |
From: | "Charles E. Bortle, Jr." <cbrtjr@ix.netcom.com> |
Newsgroups: | comp.compilers |
Date: | 19 Jul 1999 01:15:02 -0400 |
Organization: | Netcom |
References: | 99-07-049 |
Keywords: | realtime |
Hello Albert,
You wrote:
>Therefore, it would be better if a hard guarantee could be given that
>the processor will never take more than x (micro) seconds for a
>certain piece of code. A compiler can help here. It knows which code
>it produces, I can put information about # clock-cycles of each opcode
>into it, et voila, it can calculate exactly what I want to know.
>
>For the designer, it would be enough to be able to specify an upper
>time limit for some code, and the compiler should accept the program
>if it is able to produce code which meets the dead line.
It sounds like this might work for basic blocks, that is, linear
sequences of op codes, but there is a problem with control structures;
For code generated from loop structures with variables as the start
and end values, the compiler cannot know how many iterations (if any)
the loop will take. (Of course, given the data types of these, the
compiler might be able to figure out the absolute maximum and minimum
number of clock cycles based on the boundry conditions of the the
variables; But, the maximum cpu cycles may be outside the reqired
delay time, but some value between the maximum and minimum may allow
the loop time to fit into the allowd delay time, so using the maximum
time would be over-conservative)
My 2 cents worth,
--
Charles cbrtjr@ix.netcom.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.