POV-Ray : Newsgroups : povray.off-topic : BPM Server Time
4 Sep 2024 07:19:07 EDT (-0400)
  BPM (Message 58 to 67 of 77)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: scott
Subject: Re: New BPM
Date: 10 Jun 2010 04:33:39
Message: <4c10a363$1@news.povray.org>
>> Well just start it at roughly the right time and have the thread loop 
>> until it's exactly the correct time.
>
> I'm not keen on burning shedloads of CPU power just because of a 
> deficiency in the thread library. But we'll see...

Well issue a sleep command at the top until you are roughly at the correct 
time, then loop until you are exactly there.  You shouldn't be burning more 
than 0.1 or 0.2% CPU this way.


Post a reply to this message

From: Darren New
Subject: Re: Microcode
Date: 10 Jun 2010 12:00:41
Message: <4c110c29$1@news.povray.org>
Invisible wrote:
> Darren New wrote:
>> Invisible wrote:
>>> Note also that the 6502 doesn't have any microcode. 
>>
>> Given how the instruction sets decoded, I'm not sure it's really valid 
>> to say it had no microcode.
> 
> And you actually know how it was wired up internally, do you?

Yes. There was a very interesting article on it showing how it worked, 
somewhere.  I'll see if I can find it.

-- 
Darren New, San Diego CA, USA (PST)
    Eiffel - The language that lets you specify exactly
    that the code does what you think it does, even if
    it doesn't do what you wanted.


Post a reply to this message

From: Darren New
Subject: Re: Microcode
Date: 10 Jun 2010 12:16:26
Message: <4c110fda@news.povray.org>
Invisible wrote:
> And you actually know how it was wired up internally, do you?


http://www.pagetable.com/?p=39

Actually, I'll grant it's not microcode per se, but it's a table-driven 
system with a multiple-cycle-per-instruction clock that steps thru the 
table, so now it's an argument more over "what is microcode" than it is over 
whether a 6502 has microcode.

I'd say anything that steps thru a ROM with a counter during one instruction 
is probably microcode, myself.

-- 
Darren New, San Diego CA, USA (PST)
    Eiffel - The language that lets you specify exactly
    that the code does what you think it does, even if
    it doesn't do what you wanted.


Post a reply to this message

From: Darren New
Subject: Re: New BPM
Date: 10 Jun 2010 12:17:39
Message: <4c111023$1@news.povray.org>
Invisible wrote:
> I believe the problem is that the library won't let me specify an 
> absolute time, only relative times. So if I was "wait 100 ms", but the 
> other processing that the program does takes 1 ms, the delay ends up 
> being 101 ms, not 100 ms.

Well, yeah.

> Still, since no other API is available, there's not much I can do about 
> it. (Other than whinge at the developers and see if it gets fixed in the 
> next release of the library...)

No, you do your processing, then you look at the highest resolution clock 
you have and figure out how much *longer* you have to wait, then you wait. 
Adjusting for the length of time it takes to figure out how much longer you 
have to wait.

-- 
Darren New, San Diego CA, USA (PST)
    Eiffel - The language that lets you specify exactly
    that the code does what you think it does, even if
    it doesn't do what you wanted.


Post a reply to this message

From: Orchid XP v8
Subject: Re: Microcode
Date: 10 Jun 2010 13:25:04
Message: <4c111ff0$1@news.povray.org>
>> And you actually know how it was wired up internally, do you?
> 
> http://www.pagetable.com/?p=39

...Christ that's complicated! o_O

> so now it's an argument more over "what is microcode" than it is 
> over whether a 6502 has microcode.

Yeah, well, that figures. ;-)

> I'd say anything that steps thru a ROM with a counter during one 
> instruction is probably microcode, myself.

Well, a "ROM" can be just a grid of wires, some connected and some not.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: New BPM
Date: 10 Jun 2010 13:25:51
Message: <4c11201f$1@news.povray.org>
>> Still, since no other API is available, there's not much I can do 
>> about it. (Other than whinge at the developers and see if it gets 
>> fixed in the next release of the library...)
> 
> No, you do your processing, then you look at the highest resolution 
> clock you have and figure out how much *longer* you have to wait, then 
> you wait. Adjusting for the length of time it takes to figure out how 
> much longer you have to wait.

Except that figuring out how long you need to wait would *itself* take 
time...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Darren New
Subject: Re: Microcode
Date: 10 Jun 2010 14:39:27
Message: <4c11315f@news.povray.org>
Orchid XP v8 wrote:
> Well, a "ROM" can be just a grid of wires, some connected and some not.

Yes?  I was saying something with a program counter that runs mulitple 
instructions per CPU instruction would count as microcode, regardless of how 
you stored the code it's running.

-- 
Darren New, San Diego CA, USA (PST)
    Eiffel - The language that lets you specify exactly
    that the code does what you think it does, even if
    it doesn't do what you wanted.


Post a reply to this message

From: Darren New
Subject: Re: New BPM
Date: 10 Jun 2010 14:39:53
Message: <4c113179$1@news.povray.org>
Orchid XP v8 wrote:
>>> Still, since no other API is available, there's not much I can do 
>>> about it. (Other than whinge at the developers and see if it gets 
>>> fixed in the next release of the library...)
>>
>> No, you do your processing, then you look at the highest resolution 
>> clock you have and figure out how much *longer* you have to wait, then 
>> you wait. Adjusting for the length of time it takes to figure out how 
>> much longer you have to wait.
> 
> Except that figuring out how long you need to wait would *itself* take 
> time...

You missed the second sentence of the two-sentence paragraph, didn't you?

-- 
Darren New, San Diego CA, USA (PST)
    Eiffel - The language that lets you specify exactly
    that the code does what you think it does, even if
    it doesn't do what you wanted.


Post a reply to this message

From: Darren New
Subject: Re: New BPM
Date: 10 Jun 2010 15:15:45
Message: <4c1139e1$1@news.povray.org>
Orchid XP v8 wrote:
> Except that figuring out how long you need to wait would *itself* take 
> time...

Here's another funny thing:

In CDMA cell phones (at least), not only do they have to figure out how long 
they have to wait, they have to keep track of how long different parts of 
the chip have been turned on, to compensate for the fact that the crystal 
will vibrate at different speeds depending on how warm it is. So if you have 
to read two packets before turning off, you have to plan to wake up slightly 
later than if you only read one packet before you turned off, because the 
chip will be running warmer and faster.

-- 
Darren New, San Diego CA, USA (PST)
    Eiffel - The language that lets you specify exactly
    that the code does what you think it does, even if
    it doesn't do what you wanted.


Post a reply to this message

From: Invisible
Subject: Re: Microcode
Date: 11 Jun 2010 04:00:19
Message: <4c11ed13$1@news.povray.org>
>> Well, a "ROM" can be just a grid of wires, some connected and some not.
> 
> Yes?  I was saying something with a program counter that runs mulitple 
> instructions per CPU instruction would count as microcode, regardless of 
> how you stored the code it's running.

So if it doesn't use a counter it's not microcode?

As you say, we're just arguing about semantics now. I always thought of 
microcode as being a block of ROM (or even some kind of EPROM) which 
actual address decode circuitry, so that you can execute jumps and so 
forth. By contrast, the CPU I'm designing has no such thing. It's just 
that on each clock pulse, a different control line becomes active, and 
that line connects to one or more control lines (possibly via logic 
gates that pass the signal only if the opcode has certain bits set). I 
wouldn't call that microcode; it'd call that "a custom arrangement of 
gates".


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.