Most "active" coroutine library project?

G

Grant Edwards

$10 is pretty expensive for a lot of applications. I bet that
processor also uses a lot of power and takes up a lot of board
space. If you've only got $2-$3 in the money budget, 200uA at
1.8V in the power budget, and 6mm X 6mm of board-space, your
choices are limited.

Besides If you can get by with 256 or 512 bytes of RAM, why pay
4X the price for a 1K part?

Besides which, the 8032 instruction set and development tools
are icky compared to something like an MSP430 or an AVR. ;)

[The 8032 is still head and shoulders above the 8-bit PIC
family.]

I am biased.
I like the 8031 family.
I have written pre-emptive multitasking systems for it,
as well as state-machine round robin systems.
In assembler.
Who needs tools if you have a half decent macro assembler?

Assembler macros are indeed a lost art. Back in the day, I
remember seeing some pretty impressive macro libraries layered
2-3 deep. I've done assember macros as recently as about 2-3
years go because it was the easiest way to auto-magically
generate lookup tables for use by C programs (macro assemblers
always have a "repeat" directive, and cpp doesn't).
The 803x bit handling is, in my arrogant opinion, still the
best of any processor. - jump if bit set then clear as an
atomic instruction rocks.

The bit-addressing mode was (and still is) cool. However, the
stack implementation hurts pretty badly now that memory is
cheap.

I shouldn't criticize the 8051. I remember switching from the
8048 to the 8051 (8751 actually, at about $300 each) and
thinking it was wonderful. [Anybody who remembers fighting
with the 8048 page boundaries knows what I mean.]
:)

Where do you get such nice projects to work on?

Just lucky. :)
 
H

Hendrik van Rooyen

Assembler macros are indeed a lost art. Back in the day, I
remember seeing some pretty impressive macro libraries layered
2-3 deep. I've done assember macros as recently as about 2-3
years go because it was the easiest way to auto-magically
generate lookup tables for use by C programs (macro assemblers
always have a "repeat" directive, and cpp doesn't).
The 803x bit handling is, in my arrogant opinion, still the
best of any processor. - jump if bit set then clear as an
atomic instruction rocks.

The bit-addressing mode was (and still is) cool. However, the
stack implementation hurts pretty badly now that memory is
cheap.

I shouldn't criticize the 8051. I remember switching from the
8048 to the 8051 (8751 actually, at about $300 each) and
thinking it was wonderful. [Anybody who remembers fighting
with the 8048 page boundaries knows what I mean.]

You were lucky - I started with an 8039 and the 8048 was a step up!

You are right about the stack - there are a lot of implementations now with
two or more data pointers, which make a big difference. If only someone
would build one with a two byte stack pointer that points into movx space,
the thing would fly faster again. It would make a stunning difference to the
multitasking performance if you do not have to store the whole stack. Of
course, if you are mucking around in assembler, then the 128 bytes at the top
of the internal memory is often enough.

This is getting a bit far away from python and coroutines, though. :)

- Hendrik
 
P

Paul Rubin

Hendrik van Rooyen said:
You were lucky - I started with an 8039 and the 8048 was a step up!
....
This is getting a bit far away from python and coroutines, though. :)

Getting away from python in the opposite direction, if you click

http://cufp.galois.com/2008/schedule.html

the second presentation "Controlling Hybrid Vehicles with Haskell"
might interest you. Basically it's about a high level DSL that
generates realtime control code written in C. From the slides:

* 5K lines of Haskell/atom replaced 120K lines of matlab, simulink,
and visual basic.
* 2 months to port simulink design to atom.
* Rules with execution periods from 1ms to 10s all scheduled at
compile time to a 1 ms main loop.
* Atom design clears electronic/sw testing on first pass.
* Currently in vehicle testing with no major issues.

Code is here: http://hackage.haskell.org/package/atom

Blurb: "Atom is a Haskell DSL for designing hard realtime embedded
programs. Based on conditional term rewriting, atom will compile a
collection of atomic state transition rules to a C program with
constant memory use and deterministic execution time."
 
H

Hendrik van Rooyen

Getting away from python in the opposite direction, if you click

http://cufp.galois.com/2008/schedule.html

the second presentation "Controlling Hybrid Vehicles with Haskell"
might interest you. Basically it's about a high level DSL that
generates realtime control code written in C. From the slides:

* 5K lines of Haskell/atom replaced 120K lines of matlab, simulink,
and visual basic.
* 2 months to port simulink design to atom.
* Rules with execution periods from 1ms to 10s all scheduled at
compile time to a 1 ms main loop.
* Atom design clears electronic/sw testing on first pass.
* Currently in vehicle testing with no major issues.

Code is here: http://hackage.haskell.org/package/atom

Blurb: "Atom is a Haskell DSL for designing hard realtime embedded
programs. Based on conditional term rewriting, atom will compile a
collection of atomic state transition rules to a C program with
constant memory use and deterministic execution time."

Awesome! Thank you

- Hendrik
 
G

Grant Edwards

$10 is pretty expensive for a lot of applications. I bet that
processor also uses a lot of power and takes up a lot of board
space. If you've only got $2-$3 in the money budget, 200uA at
1.8V in the power budget, and 6mm X 6mm of board-space, your
choices are limited.

Besides If you can get by with 256 or 512 bytes of RAM, why pay
4X the price for a 1K part?

Besides which, the 8032 instruction set and development tools
are icky compared to something like an MSP430 or an AVR. ;)

[The 8032 is still head and shoulders above the 8-bit PIC
family.]

I was going to say, you want 256 bytes of RAM, you profligate
so-and-so? Here, have 32 bytes of data space and stop your
whining :)

What? You had 1's? All we had were 0's. And we _liked_ it.
 
D

Dave Angel

Grant said:
$10 is pretty expensive for a lot of applications. I bet that
processor also uses a lot of power and takes up a lot of board
space. If you've only got $2-$3 in the money budget, 200uA at
1.8V in the power budget, and 6mm X 6mm of board-space, your
choices are limited.

Besides If you can get by with 256 or 512 bytes of RAM, why pay
4X the price for a 1K part?

Besides which, the 8032 instruction set and development tools
are icky compared to something like an MSP430 or an AVR. ;)

[The 8032 is still head and shoulders above the 8-bit PIC
family.]
I was going to say, you want 256 bytes of RAM, you profligate
so-and-so? Here, have 32 bytes of data space and stop your
whining :)

What? You had 1's? All we had were 0's. And we _liked_ it.
The 1's were left there by the UV light. If you wanted a zero, you had
to pulse it there on purpose.

DaveA
 
D

Denis

Please, please document this!  There are a lot of people who would
love to use this but give up when they don't find a guide or something
similar.

I've actually started doing that recently, check out http://gevent.org
Feedback is appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,190
Messages
2,571,017
Members
47,618
Latest member
Leemorton01

Latest Threads

Top