Slashdot Mirror


Building a 32-Bit, One-Instruction Computer

Hugh Pickens writes "The advantages of RISC are well known — simplifying the CPU core by reducing the complexity of the instruction set allows faster speeds, more registers, and pipelining to provide the appearance of single-cycle execution. Al Williams writes in Dr Dobbs about taking RISC to its logical conclusion by designing a functional computer called One-Der with only a single simple instruction — a 32-bit Transfer Triggered Architecture (TTA) CPU that operates at roughly 10 MIPS. 'When I tell this story in person, people are usually squirming with the inevitable question: What's the one instruction?' writes Williams. 'It turns out there's several ways to construct a single instruction CPU, but the method I had stumbled on does everything via a move instruction (hence the name, "Transfer Triggered Architecture").' The CPU is implemented on a Field Programmable Gate Array (FPGA) device and the prototype works on a 'Spartan 3 Starter Board' with an XS3C1000 device available from Digilent that has the equivalent of about 1,000,000 logic gates, costing between $100 and $200. 'Applications that can benefit from custom instruction in hardware — things like digital signal processing, for example — are ideal for One-Der since you can implement parts of your algorithm in hardware and then easily integrate those parts with the CPU.'"

269 comments

  1. That instruction is .......... by 140Mandak262Jamuna · · Score: 4, Insightful
    -------------drum roll

    0x2A

    That is the ultimate instruction.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    1. Re:That instruction is .......... by snspdaarf · · Score: 1

      So, the mice beat everyone to it?

      --
      Why, without your clothes, you're naked, Miss Dudley!
    2. Re:That instruction is .......... by Megane · · Score: 0, Redundant

      f0 0f c7 c8

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    3. Re:That instruction is .......... by MozeeToby · · Score: 2, Funny

      Unless of course, the ultimate question really is 'What is 6 times 9?' as some people believe (meaning 42 is base 13 for some unknown reason). Which would of course make the ultimate instruction 0x36.

    4. Re:That instruction is .......... by ksemlerK · · Score: 1, Funny

      6 times 9 is 54.

    5. Re:That instruction is .......... by MozeeToby · · Score: 4, Informative

      Hence the '42 is in base 13' part of my comment. 42(base 13) == 54(base 10) == 36(base 16). Of course, Adams himself denied this was the case... "No one writes jokes in base 13" but after this theory emerged he did work it into some of his later jokes, probably just to keep people wondering.

    6. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      6 times 9 is 54.

      Wow, I never knew that!!! mod parent informative!!!!

    7. Re:That instruction is .......... by confused+one · · Score: 1

      Not in base 13. It is 42, like the parent poster said.

    8. Re:That instruction is .......... by dgatwood · · Score: 2, Funny

      Appropriate that the ultimate instruction would also be a wildcard (*) in ASCII.

      And speaking of your drums, on Apple II, it's rotate accumulator left, the ROL instruction.

      How curious.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    9. Re:That instruction is .......... by gblues · · Score: 1

      Fail! That's not even a 32-bit instruction. Everyone knows the ultimate instruction is 0xDEADBEEF!

    10. Re:That instruction is .......... by LowlyWorm · · Score: 1

      No, it needs a two button keyboard for really low-level programers.

      --
      Time flies like an arrow. Fruit flies like a banana.
    11. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      Rolling On the Laugh?

      Yeah, I can see that.

    12. Re:That instruction is .......... by EkriirkE · · Score: 2, Funny

      But that's just 0xBAADF00D

      --
      from 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
      to 45 2F 6E 40 3C DF 10 71 4E 41 DF AA 25 7D 31 3F
    13. Re:That instruction is .......... by mwvdlee · · Score: 2, Funny

      That's the only thing you can get at the 0xFEEDCAFE

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    14. Re:That instruction is .......... by mwvdlee · · Score: 2, Interesting

      It's got only one instruction. ...and the first parameter to that instruction controls what the instruction does with the rest of the parameters.

      (p.s. I wish this was just a joke, but this is pretty much what it seems to be doing)

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    15. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      move along nothing to see on this planet.

    16. Re:That instruction is .......... by nogginthenog · · Score: 2, Funny

      Shouldn't that be 0xABADCAFE ?

    17. Re:That instruction is .......... by MagicM · · Score: 2, Funny

      Is that where they sell 0xBADC0FEE?

    18. Re:That instruction is .......... by Chris+Burke · · Score: 0, Offtopic

      "No one writes jokes in base 13"

      Yeah, even Intercal stops at base 7.

      --

      The enemies of Democracy are
    19. Re:That instruction is .......... by hitnrunrambler · · Score: 1

      Apparently Douglas Adams was wrong.... on slashdot people DO make jokes in base 13.

    20. Re:That instruction is .......... by Anonymous Coward · · Score: 5, Funny

      This thread can be categorized as 0xNONEOFTHISISFUNNY

    21. Re:That instruction is .......... by pgn674 · · Score: 1

      0x2A

      Took me a while to see the Hitchhiker reference.
      Very interesting, though, that 0x2A is SUB r8 r/m8 in the x86 instruction set. Isn't a Turing difference machine just subtraction with two read/write heads and a linear medium?

    22. Re:That instruction is .......... by Nethead · · Score: 1

      Wow! It's the same as on a VIC-20, wonder why.

      --
      -- I have a private email server in my basement.
    23. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      Wow, and you're reading Slashdot? Turn in your geek badge.

    24. Re:That instruction is .......... by toriver · · Score: 1

      Fun fact: All Java class files start with 0xCAFEBABE - I think Gosling had a crush on someone? Ah romantic hex.

    25. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      0x2A=0. Now was that so hard?

    26. Re:That instruction is .......... by psYchotic87 · · Score: 2, Interesting

      What you describe is pretty much how the linux kernel handles system calls. See this: How system calls work on linux/i86

      For an example of what a single instruction CPU might look like, take a look at this: Building the Turing complete coffee machine: an adequate assembly langauge

    27. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      On the Z80 it's load HL register pair from immediate address/LD HL,(nn), which isn't interesting at all. I call shenanigans.

    28. Re:That instruction is .......... by ajs · · Score: 1

      It's got only one instruction. ...and the first parameter to that instruction controls what the instruction does with the rest of the parameters.

      (p.s. I wish this was just a joke, but this is pretty much what it seems to be doing)

      Yep, the one instruction is a store (I think he needs a load too, but I guess you could get around that by self-modifying).

      You'll just have to prefix all instructions with "STORE" as all other instructions will be accumulators rather than instructions. Of course, this makes pipelining more complex, but nothing else really changes.

    29. Re:That instruction is .......... by V!NCENT · · Score: 2, Funny

      You mean 10 buttons?

      --
      Here be signatures
    30. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      Yes! It's just another thing about 42 that makes it... that much more mysterious.

    31. Re:That instruction is .......... by emandres · · Score: 1

      Depends on the endian-ness of your architecture. I'm getting 0xFECABEBA on an intel architecture running linux.

      --
      The only way to tell the difference between a hamster and a gerbil is that the hamster has more white meat.
    32. Re:That instruction is .......... by da5idnetlimit.com · · Score: 1

      You got an Inversed Polish Notation keyboard ? oh, you naughty geek ! 8p

      --
      It takes 40+ muscles to frown, but only four to extend your arm and bitchslap the motherfucker
    33. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      Women have always known that men confuse love and hex.

    34. Re:That instruction is .......... by amazingxkcd · · Score: 1

      i thought base 13 is evil anyway... 0xWHATABYTE

    35. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      I understand the HHGTTG reference, but Planet of the Ape Descendants says......

      Wait for it......

      0xD000 (arguments)

    36. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      How do you figure that? The instruction format is pretty straight forward: { condition and mask} { source functional unit } { destination functional unit } So I'm not following what you mean wrt to "first parameter to the instruction? Did you read the article?

    37. Re:That instruction is .......... by glumx · · Score: 1

      Yeah, the thread really smells like 0xDEADBEEF

    38. Re:That instruction is .......... by XDirtypunkX · · Score: 1

      Low-level? You only need one button and a good sense of rhythm.

    39. Re:That instruction is .......... by Anonymous Coward · · Score: 0

      that was not funny

    40. Re:That instruction is .......... by jasno · · Score: 1

      I prefer 0xB00B1355.

      --

      http://www.masturbateforpeace.com/
    41. Re:That instruction is .......... by Thud457 · · Score: 4, Funny

      This thread can be categorized as 0xNONEOFTHISISFUNNY

      I don't get it.
      That's not a valid hexadecimal number.

      --

      the preceding comment is my own and in no way reflects the opinion of the Joint Chiefs of Staff

  2. But can it by Anonymous Coward · · Score: 0

    But can it run Vista?

  3. "ideal for One-Der"? by mpoulton · · Score: 4, Insightful

    It seems specious to say that One-Der is optimal for a task because it offers the flexibility of the underlying FPGA hardware. If you have the FPGA hardware present to run the One-Der implementation, then you could just configure a more optimally designed processor out of it for whatever task you are actually performing.

    --
    I am a geek attorney, but not your geek attorney unless you've already retained me. This is not legal advice.
    1. Re:"ideal for One-Der"? by Bakkster · · Score: 2, Interesting

      But most FPGAs utilize a CPU core, which is often hard-wired and has ports to access the programable elements. Assuming the single-instruction MIPS runs faster than the common 'standard' CPUs such as PowerPC, then there would be a benefit. The CPU could be smaller (leaving more space for programmable elements) and more easily expanded upon (run additional functions by address rather than by OPCODE).

      That's a big 'if', but there's merit in exploring it. The biggest barrier I can think of right now is with programming time, and that's the most expensive part of most FPGA projects already.

      --
      Write your representatives! Repeal the 2nd Law of Thermodynamics!
    2. Re:"ideal for One-Der"? by mattdm · · Score: 1
      The sentence from the summary which you're replying to makes more sense in its full context in the article:

      Even so, One-Der is imminently usable as it is. Unlike many other FPGA CPU cores, this one is very simple to customize even if you aren't an expert on its internals. Applications that can benefit from custom instruction in hardware -- things like digital signal processing, for example -- are ideal for One-Der since you can implement parts of your algorithm in hardware and then easily integrate those parts with the CPU.

      In other words, it's an ideal starting point for these applications.

    3. Re:"ideal for One-Der"? by Anonymous Coward · · Score: 1, Funny

      And now introducing the O-NEE-DERS

    4. Re:"ideal for One-Der"? by Anonymous Coward · · Score: 0

      But most FPGAs utilize a CPU core

      Wrong! High end FPGAs have CPUs, but most affordable devices are just configurable logic with hardened RAMs and multipliers.

      Maybe you are thinking of something like http://en.wikipedia.org/wiki/Microblaze, which is a functional CPU which can be efficiently implemented on FPGA.

    5. Re:"ideal for One-Der"? by SharpFang · · Score: 2, Interesting

      FPGA is usually the prototype phase.

      Actually, this could be implemented as a really small handful of transistors for the actual processor and a ton of various memory-mapped peripherials. Some of them being really simple old basic logic chips for ALU.

      It would mean a simple version for cheap microcontrollers would be really cheap to make, a family of compatible devices of different scale would be possible, and extending/upgrading existing instruction set would be easy too.

      The above is not a conflicting statement with the 1-instruction set idea. The MOV would not be really THE instruction set. The real instructions would be "place data in register A, read result from register B" and the memory map would be the real instruction set.

      But I just can't see it for anything bigger. It might be used for massively multicore processors if the address and data bus could be shared somehow. But I think it would be the bottleneck really fast.

      --
      45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
    6. Re:"ideal for One-Der"? by suburbanmediocrity · · Score: 1
      Sounds like IBM's Daisy.

      http://www.research.ibm.com/daisy/

    7. Re:"ideal for One-Der"? by Anonymous Coward · · Score: 0

      Let's generalize it, then. TTA is the single instruction, and NAND is the single physical gate. All else can be thus expressed (if a bit verbosely).

      Now all we need is that NAND chip to run at forty-trillion giga-shizzles, and we'll be on a par with today's consumer-grade hardware.

    8. Re:"ideal for One-Der"? by mrand · · Score: 1

      FPGA is usually the prototype phase.

      That used to be the case much more than it has been over the past five to ten years, and it is even less true the past couple years. It all depends on the application. There are millions of telecom systems with FPGA's in them - full production (volume doesn't justify moving to ASIC because FPGA priced fall faster). I believe a large number ofHDTV's have FPGA's in them as well (time to market is the most important thing here, so they don't mind the slight extra cost of the FPGA).

      Note that while these examples are true, there are obviously cases where ASIC's do make sense. Ultra high volume, ultra-low margin consumer stuff may need to be ASIC. Or designs that simply max out the density of current FPGA's (usually where you can combine functionality onto one die what would have taken multiple FPGAs).

      Marc

      --
      -- PGP keyID: 0x4C95994D
    9. Re:"ideal for One-Der"? by SharpFang · · Score: 1

      or designs for which speed of FPGA is too limited. Don't forget these.

      --
      45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
  4. nihilist by Nadaka · · Score: 4, Insightful

    vaguely reminds me of the nihilist language joke. A language that realizes that ultimately all things are futile and irrelevant, thus allowing all instructions to be reduced to a no-op.

    1. Re:nihilist by Anonymous Coward · · Score: 4, Funny

      ... and then it does dead code elimination, right?

    2. Re:nihilist by krkoch · · Score: 2, Funny

      Or just the instruction KAH: Push the status register to stack and proceed to kill all humans.

    3. Re:nihilist by shutdown+-p+now · · Score: 1

      Personally, I prefer my own Nirvana programming language: it reduces all instructions to an infinite loop.

    4. Re:nihilist by Anonymous Coward · · Score: 0

      Eh. What's the point?

    5. Re:nihilist by eknagy · · Score: 1

      No, that would be futile.

  5. He's Building a One-Der, Stop Him by eldavojohn · · Score: 5, Funny

    Everyone attack him before he wins this round of Age of Empires. Quickly, he's probably low on resources right now.

    --
    My work here is dung.
    1. Re:He's Building a One-Der, Stop Him by Iamthecheese · · Score: 3, Funny

      Some of us are recovering AOE addicts you insensitive clod!

      --
      If video games influenced behavior the Pac Man generation would be eating pills and running away from their problems.
    2. Re:He's Building a One-Der, Stop Him by Quantumstate · · Score: 4, Funny

      Some of us are still addicted you insensitive clod!

    3. Re:He's Building a One-Der, Stop Him by Anonymous Coward · · Score: 0

      Some of us never played AOE you insensitive clod!

  6. Cheating? by happy_place · · Score: 4, Insightful

    So the one instuction is essentially a move command that has multiple modes... Ahem. Isn't that cheating? Isn't move considered two instructions already, a load and store? I guess this is really dependent upon how you define what is and isn't an instruction.

    --
    http://www.beanleafpress.com
    1. Re:Cheating? by Anonymous Coward · · Score: 2, Interesting

      Erm, no. The canonical single instruction machine uses "subtract and branch if negative" and that's not considered to be three instructions (subtract, test, branch) but one.
      Using memory-mapped facilities to perform operations like addition...now THAT is cheating.

    2. Re:Cheating? by quickOnTheUptake · · Score: 2, Informative

      Using memory-mapped facilities to perform operations like addition...now THAT is cheating.

      Isn't that what it does?
      Strikes me that that is just complicating things, insofar as you still effectively have multiple instructions, there is just another semantic level tacked on to hide them.

      --
      Mod points: Guaranteed to remove your sense of humor.
      Side effects may include gullibility and temporary retardation
    3. Re:Cheating? by Talennor · · Score: 2, Informative

      So the one instuction is essentially a move command that has multiple modes... Ahem. Isn't that cheating?

      Yes, it is cheating. He basically took the instruction bits of the program and said, "Behold, for they are now address bits!" With the caveat that the address bits happen to address INSTRUCTIONS. It's all pretty brain-dead.

      --

      //TODO: signature
    4. Re:Cheating? by Anonymous Coward · · Score: 0

      No, it strikes me as "exposing the microcode" in a conventional CPU. And the way it is like a address bus would make it easy to add or delete instructions even on the fly.

    5. Re:Cheating? by maxwell+demon · · Score: 5, Interesting

      I'd also consider it cheating. I can also invent a one-instruction computer, where the one instruction is a move immediate instruction. The move instruction moves a byte-sized value into a "command register" which does different things depending on the value of the byte you load into it and the current state of the machine. Indeed, since there's just one instruction, and it always has a single one-byte operand, I just don't encode the instruction itself, I just put all the operands into memory, one after another. And I define the state machine so that the actions are exactly the same as the actions of an x86 interpreting those bytes as separate instructions. Therefore I can avoid doing an implementation myself; I can just use a stock x86 processor as proof of concept.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    6. Re:Cheating? by Anonymous Coward · · Score: 0

      A move is one instruction, two operations. Some processors have multiply-accumulate instruction that does two sequential operations. 68k and ARM have instructions that load/stores a number of registers with up to 8 or 16 operations per instruction. X86 have instructions that moves an arbitrary (limited by addressable range) number of bytes/words or double-words, up to 2^32 or 2^64 operations per instruction.

      By implying that the size of an instruction depends on "multiple modes", isn't every instruction in a ordinary processor potentially the size as all architectural state? Or in a Internet connected machine the state of every connected machine, or even the state of the universe given that some of the machines could be connected to telescopes or other sensors?

      So yes, it's a matter of definition.

    7. Re:Cheating? by wd5gnr · · Score: 2, Interesting

      Well with bias, I don't think that's exactly the point. In fact, it is more like exposing the microcode engine directly to the programmer. The advantage is that you can readily add function blocks and therefore instructions without having to know about how the CPU works internally. So regardless of if it is really "one instruction" or not, it could be useful for quickly building application-specific CPUs, or even building CPUs on the fly to best suit certain programs (which could be interesting for "big iron" running lots of CPUs to solve a big problem, for example).

    8. Re:Cheating? by Nazlfrag · · Score: 2, Interesting

      I suppose it's cheating. I think it's useful though simply as a backbone for a custom processor, then patch in what you need. You might need an ALU and DSP for a complex project, and an accumulator & bit shifter for a simpler one. This lets you link them to a common bus architecture which could make for easy prototyping.

    9. Re:Cheating? by bzipitidoo · · Score: 1

      Single instruction set computers were a hotter subject some years ago, or so it seems to me-- I haven't heard much on it lately. It circles back to the concept of the Turing Machine. A combination instruction like that "subtract and branch if negative" really can be the only instruction needed. That's enough to achieve universal computing. Cellular automata such as Conway's Game of Life are another popular way to achieve universal computing with a minimal design.

      The "move" idea is exactly what I thought of then. But it's not quite what you say. Yours really is just a conventional architecture hidden behind a move. What they're talking about goes like this: Move data into input registers. Then if one wanted the product, that value is in a particular output register, and one merely moves the value of that register out to memory, or perhaps into another input register. Same drill for all the operations. The sum is in another register, and if that is not wanted, then it is ignored. Could possibly waste a lot of effort computing every possible binary operation on 2 operands, when most of the time only a few or just 1 is wanted. After thinking about it some more, I decided it was cheating, and the big difference between that and a conventional multiply instruction was mostly semantics. Since every instruction is a move, all that's really needed is source and destination, and then, there doesn't seem much difference between the bits that represent the address of one of the registers that holds a product, and bits that represent an opcode for a combined multiply and store operation.

      The "move" idea isn't exactly new. It leads to what is called a dataflow computer architecture. When the architecture can chain operations together, so that a*b+c can be done by moves of a and b and c into 3 places, and then the result out of some other place, with no intermediate move instruction to move the result of a*b into the input of an add operation with c, then you begin to have dataflow. And it seems that's what this latest "move" architecture can do. I guess they're calling it Transport Triggered Architecture now.

      --
      Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    10. Re:Cheating? by jtgd · · Score: 1

      It would be separate instructions on a RISC machine, but not a traditional CISC machine.
      This is a One Instruction CISC (although that seems like an oxymoron)

      --
      J
  7. Good-bye Python!!! by dmbasso · · Score: 0

    Programming in Assembly for this architecture is certainly delightful!!!

    --
    `echo $[0x853204FA81]|tr 0-9 ionbsdeaml`@gmail.com
  8. GOTO ... by gstoddart · · Score: 4, Funny

    I vote for GOTO as the only instruction.

    That would be hilarious.

    Cheers

    --
    Lost at C:>. Found at C.
    1. Re:GOTO ... by jfengel · · Score: 1

      Actually, it sounds an awful lot like a COME FROM instruction.

      http://en.wikipedia.org/wiki/Come_from

    2. Re:GOTO ... by jeffmeden · · Score: 1

      I think I was in a high school 'comp sci for dummies' class based on that principle. You would be surprised how much qBasic can do with generous use of GOTO.

      Well, at least, it seemed like an impressive program at the time. Good thing I don't write code for a living!

    3. Re:GOTO ... by nschubach · · Score: 1

      goto:
      goto goto

      ?

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    4. Re:GOTO ... by gstoddart · · Score: 2, Funny

      Actually, it sounds an awful lot like a COME FROM instruction.

      Well, if we're going with joke operations, I'm changing my vote to HCF. ;-)

      Cheers

      --
      Lost at C:>. Found at C.
    5. Re:GOTO ... by thrillseeker · · Score: 0, Redundant

      1) build one instruction computer
      2) goto: goto goto
      3) profit

    6. Re:GOTO ... by Quiet_Desperation · · Score: 1

      NOOP would be funnier.

    7. Re:GOTO ... by deander2 · · Score: 1

      that would be the JMP instruction. =P

    8. Re:GOTO ... by gstoddart · · Score: 1

      that would be the JMP instruction. =P

      Or B (branch), depending on your architecture.

      Cheers

      --
      Lost at C:>. Found at C.
    9. Re:GOTO ... by ctrl-alt-canc · · Score: 1

      A NOP is better. Further developments will make available an indexed NOP, so that the CPU will jump and do nothing at the same time.

    10. Re:GOTO ... by jfengel · · Score: 1

      COME FROM is a joke, but it really does kind of model what they're doing here. The "one instruction" is a MOVE, but every time you move something to a particular location, some other part of the chip notices and performs operations on it.

      Move one number into location A and another into location B, and magically the CPU knows to multiply them and stick it in location C, like sticking a COME FROM at the instruction that stores into B. It's not exactly a COME FROM since control returns to your next instruction (even before the operation is complete, making for some interesting parallel operations) but it's not completely dissimilar.

      If I were to program it, I'd probably end up implementing HCF anyway.

    11. Re:GOTO ... by Anonymous Coward · · Score: 0

      "Where do you want to go to today?"

    12. Re:GOTO ... by Anonymous Coward · · Score: 0

      So is it like AOP?

    13. Re:GOTO ... by maxwell+demon · · Score: 1

      If you make a one-instruction CPU, then the obvious choice of instruction would be DWIM. Note that with that instruction you could restrict yourself to one-instruction codes without losing generality, which should greatly simplify the processor design (for example, you need no instruction queue; indeed, you can spare the whole instruction reading circuit, because you know what instruction you'd read anyway).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    14. Re:GOTO ... by Anonymous Coward · · Score: 0

      0x20090d0a would be even better - especially for secure code

    15. Re:GOTO ... by anotheregomaniac · · Score: 2, Funny

      The Jack Palance computer:

      Curly: Do you know what the secret of life is?
      Curly: This. [holds up one finger]
      Mitch: Your finger?
      Curly: One thing. Just one thing. You stick to that and the rest don't mean shit.
      Mitch: But what is the "one thing?"
      Curly: [smiles] That's what you have to find out.

    16. Re:GOTO ... by ciaran.mchale · · Score: 1

      I vote for GOTO as the only instruction.
      That would be hilarious.

      Actually, GOTO would be considered harmful.

    17. Re:GOTO ... by Anonymous Coward · · Score: 0

      COME FROM is actually pretty close to reality if you work with continuations, which are a very, very powerful abstraction. Co-routines, ultra lightweight threads, Python-style generators etc., you can define anything in terms of call/cc.

  9. Can be a bit tricky to program... by nokiator · · Score: 5, Interesting

    I built a single instruction microprocessor at grad school. The only instruction was to move a 32-bit data from one address to another address. All the ALU and I/O functions were memory mapped. For example, you could have an adder where address A was operand #1, address B was operand #2 and address C was the result. Branches were handled through ALU units where the result of the operation changed the instruction pointer for some future instruction. It was very easy to implement and notoriously difficult to program.

    1. Re:Can be a bit tricky to program... by purpledinoz · · Score: 4, Interesting

      For a few seconds there, I thought you said grade school. Made me feel very inferior :) Wouldn't the complexities of programming it be handled by a compiler? If someone managed to write one for a 1 instruction processor?

    2. Re:Can be a bit tricky to program... by Chris+Burke · · Score: 1

      So... how did you encode what operation the ALU should perform? And wouldn't that then be the ISA? Couldn't you then make a "one-instruction microprocessor" where the only instruction is "move bytes to x86 processor instruction cache"? ;)

      Or was each possible ALU operation a different memory-mapped address? Was writing the operands to the addresses what caused the operation, or did you have to write to a "do-it" ?

      Not that making such a processor isn't cool. Cus it's cool. Making just about any kind of processor in school is cool. :)

      Just when I read "one instruction processor" I was thinking of something more traditional, where instructions map to execution units. So like a machine where the only instruction is NAND with memory arguments. Now that would be a bitch to program. ;)

      --

      The enemies of Democracy are
    3. Re:Can be a bit tricky to program... by multipartmixed · · Score: 2, Interesting

      Interesting.

      First off, your one-instruction CPU, I guess you didn't need to express the instruction in machine code, just the arguments.

      Here's the funny question, why not develop an assembler with synthetic instructions, like SPARC v9? It would certainly make it easier to program.

      --

      Do daemons dream of electric sleep()?
    4. Re:Can be a bit tricky to program... by bigdavex · · Score: 1

      It seems to me that the the distinction between the microprocessor and the ALU is arbitrary. How is this different than a CPU that comprises address load hardware and ALUs?

      --
      -Dave
    5. Re:Can be a bit tricky to program... by Lord+Ender · · Score: 1

      Wouldn't the complexities of programming it be handled by a compiler? If someone managed to write one

      What you say is true, but the most important part, which you leave out, is that managing to write a compiler is crazy difficult for some instructions sets. x86 is not around today because it's technically superior; it's with us because the compilers for better architectures are just too damn hard to write.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    6. Re:Can be a bit tricky to program... by speculatrix · · Score: 1

      x86 is with us because of backwards compatibility. even Intel were unable to shrug it off with Itanium and various other things. Intel even threw away Xscale Arm devices (sold off to Marvell, where Silicon IP goes to die) and did Atom instead.

      there are loads of very good compilers; way back when I tried second guessing a C compiler for 68000 series processors and found it was very very hard to improve on what it could do. These days it's hard to write an x86 compiler because the x86 instructions are decoded and parallel-ised and executed out of order to keep the pipeline clear, and so you almost need a different compiler for each generation of CPUs (core2 is very different from P4 for example).

    7. Re:Can be a bit tricky to program... by epee1221 · · Score: 1

      You've never written an x86 compiler, have you?

      --
      "The use-mention distinction" is not "enforced here."
    8. Re:Can be a bit tricky to program... by Blue+Lozenge · · Score: 1

      It sounds to me like you just moved the instruction opcodes into the address operand.

  10. Wrong part number in summary by mako1138 · · Score: 5, Insightful

    It's XC3S1000, not XS3C1000. Been working with these parts too long...

    1. Re:Wrong part number in summary by Anonymous Coward · · Score: 0

      It's XC3S1000, not XS3C1000. Been working with these parts too long...

      Alternate theory: maybe you're dlysexic...

  11. So old it's new. by LaminatorX · · Score: 5, Insightful

    Sounds a hell of a lot like the read/write head of the Turing Machine to me.

  12. What's the one instruction? by Chris+Mattern · · Score: 5, Funny

    Why, DWIW (Do What I Want), of course.

    1. Re:What's the one instruction? by codecore · · Score: 1

      I'll take my model T. Can I get that in black?

    2. Re:What's the one instruction? by beh · · Score: 1

      No, It's been proven that 'do-what-I-want' leads to misunderstandings and bugs...

      It's DWIM (Do-What-I-MEAN!) you're after...

    3. Re:What's the one instruction? by Anonymous Coward · · Score: 0

      sudo get me sandwich

    4. Re:What's the one instruction? by V!NCENT · · Score: 4, Funny

      get me a sandwich is not in the sudoers file. This incident will be reported.

      --
      Here be signatures
    5. Re:What's the one instruction? by Niomosy · · Score: 1

      That instruction can already be found in most females.

    6. Re:What's the one instruction? by wd5gnr · · Score: 2, Informative

      I thought it was: Anonymous Coward is not in the sudoers file. This incident will be reported. ;-)

    7. Re:What's the one instruction? by Anonymous Coward · · Score: 0

      get.me@sandwich:~$ sudo make me a sandwich

    8. Re:What's the one instruction? by Anonymous Coward · · Score: 0

      Abracadabra! You are now a sandwich.

    9. Re:What's the one instruction? by kamochan · · Score: 1

      Of course. It's "sudo make me a sandwich".

    10. Re:What's the one instruction? by V!NCENT · · Score: 1

      sudo make install sandwich

      Yummy!

      --
      Here be signatures
  13. One instruction... by hey · · Score: 3, Insightful

    ... whose first operand is the task to perform. Followed by the necessary operands for that task.

    1. Re:One instruction... by pz · · Score: 5, Interesting

      ... whose first operand is the task to perform. Followed by the necessary operands for that task.

      Exactly. It isn't a single instruction computer.

      And the idea isn't new.

      If a single instruction architecture is designed, then there is only one instruction (duh), and there's no reason to encode that instruction in the instructions themselves. All that will be left is encoding for operands. There's a tempting but brief foray into semantics where you can argue that the first handful of bits in TFA's instruction set are operands to the execution control unit, but that is, in fact, what most would consider defining a set of instructions where each distinct value in that first handful of bits describes more-or-less a distinct instruction. One quickly realizes, however, that there is a fundamental difference between data operands and instruction operands, and, by stating that it is a single instruction architecture, the implication is that there are no instruction operands. Therefore, TFA's architecture is not single instruction.

      It's well known that there are universal logic elements (like the two-input NOR gate), and, by extension, you can create single instruction architectures that compute the universal logic element operation on two arguments, writing the results to a third. Instructions in such architectures are just memory locations -- source A, source B and destination. While incredibly simple, such a machine is going to have a very, very low instruction set density. It's an interesting project for intellectual curiosity (like in an introductory graduate level machine architecture course) but hardly worthy of a Slashdot front page mention.

      --

      Put my fist through my alarm clock with its ding-dong death inside my ear. - The Blackjacks.
    2. Re:One instruction... by Anonymous Coward · · Score: 0

      From what I can see the value here is that it would be quite simple to add or delete functions to the "bus". That wouldn't be true with a sea of NOR or NAND gates (or muxes or LUTs which is what the FPGA is anyway).

      So I can write my HCF "module" plug it in on bus address 20 and now I have a set of new instructions without knowing much about the actual CPU architecture/datapath.

      As for the performance. I have a 20MHz PIC project I am working on now. The PIC /4 so that's really 5Mhz and 8 bits. This is 10Mhz and 32 bits. So for embedded systems, maybe. I imagine my PIC runs longer on a 9V battery than the FPGA though ;-)

    3. Re:One instruction... by Anonymous Coward · · Score: 0

      VINDICATION! Six years ago I had a heated "debate" with my Computer Systems & Their Architectures lecturer in Liverpool University hypothesizing a single instruction machine using only MOVE. He was practically laughing at me when he told me that wasn't possible.

      I'm currently performing a double hand gesture in his honour.

    4. Re:One instruction... by nameer · · Score: 1

      Like this course ? I saw a brief (1h) Google video of a talk that the professor gave. Didn't I come across that link from the Slashdot front page? Anyway, yeah, I'd take that course. Even if it just intellectual curiosity.

      --
      "Uh... yeah, Brain, but where are we going to find rubber pants our size?" --Pinky
    5. Re:One instruction... by wd5gnr · · Score: 1

      I'm missing the comment about "first operand is the task". If you read the article the instruction format is simply {condition} source -> destination. So, what does that mean first operand is the task? The idea is NOT new -- the article leads off mentioning that. As for the universal logic elements, that's what the FPGA is. I think a lot of poster have kind of missed the point. There are at least 3 pretty useful things to do with the CPU presented: 1) Build a CPU with custom instructions without having to become an expert on designing CPUs. 2) Learning a lot about coding in Verilog and doing significant hardware designs. 3) As the article talks about at the end, there are lots of applications for this as a base for reconfigurable computing. You compiler looks at your source code, figures out what functional units you need, creates the processor Verilog, and then compiles the code to run on that ISA. Oh, there is a video of the Linux-based simulator running a monitor and a test program at: http://www.youtube.com/watch?v=KnQGcoe6oGg

  14. Microblaze by Anonymous Coward · · Score: 0

    It occurs to me that the Microblaze would be 10 times faster, much easier to program and probably of a similar size.

    1. Re:Microblaze by wd5gnr · · Score: 1

      It is very difficult to add instructions to microblaze. Beyond that, it would be even harder to have a compiler reconfigure the ISA of microblaze on the fly.

  15. Old news by Al+Kossow · · Score: 1

    Mike Albaugh did this in 1986
    Google for
    urisc macro package in the net.arch archives.
    His instruction was "Reverse subtract and skip if borrow"

  16. Not the Ultimate RISC Architecture by fm6 · · Score: 1

    That would be the system with no instructions at all!

    1. Re:Not the Ultimate RISC Architecture by harry666t · · Score: 4, Interesting
    2. Re:Not the Ultimate RISC Architecture by fm6 · · Score: 1

      Cruel of you to spoil the joke.

    3. Re:Not the Ultimate RISC Architecture by maxwell+demon · · Score: 1

      I vote for systems with a negative number of instructions! :-)
      You just tell the computer what not to do, and the computer does something which you didn't forbid.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    4. Re:Not the Ultimate RISC Architecture by epee1221 · · Score: 2, Funny

      Prolog implemented in hardware?

      --
      "The use-mention distinction" is not "enforced here."
    5. Re:Not the Ultimate RISC Architecture by harry666t · · Score: 1

      That would explain my nickname. (:

  17. It's obvious by SnarfQuest · · Score: 1

    The instruction is "What is 7 times 9"

    --
    Who would win this election: Andrew Weiner vs Andrew Weiner's weiner.
    1. Re:It's obvious by Yvan256 · · Score: 1

      I knew something was wrong.

  18. Memory of this from Engineering School by systemeng · · Score: 3, Funny

    I remember hearing about building a one instruction computer back in engineering school. The one I heard about was based on Subtract and Branch if Not Equal. My roommate at the time figured it ought to be a way to get a very high clock rate. It seems like he found a proof in a hoary old book that such a computer was in fact Turing complete. I'm sure I'll get flamed for posting a vague recollection but. . . here it is.

    1. Re:Memory of this from Engineering School by Terje+Mathisen · · Score: 1

      This sure didn't deserve 'funny':

      "Subtract and Branch if Not Equal" (SBNE?) is indeed one of the simplest real single-instruction architectures that works.

      The Single-instruction computer in the original article is no such thing, instead it is a Transport-Triggered Architecture (TTA), where the instruction set is encoded on the address bus.

      This has even been used on x86 machines:

      Many years ago (286/386 timeframe) the x87 coprocessors were still very slow (microcoded!), so Weitek manufactured a fp unit which was memory mapped. It grabbed a full 64kB of address space, which meant that the main cpu could use this space as a 16-bit opcode.

      I.e. by moving data to/from various addresses in this 64K block, the Weitek unit would use the address data to determine the fp opcode to perform.

      Terje

      --
      "almost all programming can be viewed as an exercise in caching"
  19. AAA AA A A by tonique · · Score: 5, Funny

    AA A AA  AAAA A  AAA AA   A A  AA  A A AAA    A A AAAA    AAA  AAAA

  20. Ummmm by Sycraft-fu · · Score: 1, Insightful

    "The advantages of RISC are well known -- simplifying the CPU core by reducing the complexity of the instruction set allows faster speeds, more registers, and pipelining to provide the appearance of single-cycle execution."

    Is it just me, or does this sound like RISC fanboyism from the 1990s? The "advantages" of RISC are not nearly so clear these days. Indeed, it is getting rather hard to find real RISC chips. While there are chips based on RISC ISA idea (like being load/store and such), they are not RISC. RISC is about having few instructions and instructions that are simple and only do one thing. Those concepts are pretty much thrown out when you start having SIMD units on the chip and such.

    These days complex processors are the norm. They have special instructions for special things and that seems to work well. RISC is just not very common, even in systems with a RISC heritage.

    I'm just not seeing what this processor is supposed to accomplish, especially being on an FPGA. If you can implement a CPU to do what you need on an FPGA, you can probably implement a dedicated solution on the FPGA that is faster. That is rather the idea of an FPGA over a CPU. You can implement things in hardware that are faster.

    1. Re:Ummmm by Anonymous Coward · · Score: 0

      In my opinion RISC was not about a reduced number of instructions (it was really a bad choice for what, I guess, was a back-cronym). It was more about having instructions encoded in a regular way, hence the fixed size instructions and the reduced instruction formats.

      Your example of SIMD units, if you take this into account, is completely oposite. SIMD units have really minimized instruction sets encoded in a very regular way.

      Btw, I dont agree at all with the notion that a processor based on triggered operations by a move instruction being RISC at all. One of the design goals of traditional RISC processors was increased orthogonality. I cant see the orthogonality of triggering operations by writing to magic addresses.

    2. Re:Ummmm by Anonymous Coward · · Score: 2, Informative

      This isn't true. Modern processors are highly RISCy -- they just have front-ends that translate from CISC ISAs. The last genuinely CISC processor was, I believe, the Pentium (non-pro edition).

    3. Re:Ummmm by julesh · · Score: 5, Informative

      Is it just me, or does this sound like RISC fanboyism from the 1990s? The "advantages" of RISC are not nearly so clear these days. Indeed, it is getting rather hard to find real RISC chips. While there are chips based on RISC ISA idea (like being load/store and such), they are not RISC. RISC is about having few instructions and instructions that are simple and only do one thing. Those concepts are pretty much thrown out when you start having SIMD units on the chip and such.

      I wouldn't say that's what RISC was about at all; the basic idea was to have only instructions that could be implemented using a few simple pipeline stages. This is a substantial improvement over the microcoded architectures that were prevalent prior to RISC, because it can be much more easily pipelined (or, indeed, pipelined at all). I don't see SIMD as incompatible with RISC in any fashion; it just happens that the instruction operates on very wide data, but it's still a relatively simple instruction that should be able to complete quite quickly.

      These days complex processors are the norm. They have special instructions for special things and that seems to work well. RISC is just not very common, even in systems with a RISC heritage.

      I'd say it's more the other way around. Even in systems with a CISC ISA (e.g. x86), you tend to find that under the hood the CISC instructions are translated into a series of microops that are then dispatched in a system that is somewhat RISC-like. The most common processor family in the world is the ARM family, and all of those processors subscribe pretty well to the original principles of RISC, from instruction set to internal design of the processor core.

      All of these are much more faithful to the principles of RISC than the chip described in TFA, whose instruction performs two memory accesses on each execution -- note that the removal of such instructions and consequent simplification of the execution pipeline (by having only a single pipleline stage that could access memory) was the original motivation behind RISC architectures.

    4. Re:Ummmm by Dunbal · · Score: 1

      Is it just me, or does this sound like RISC fanboyism from the 1990s?

            The good thing about fashion is that if you wait long enough, everything will be in vogue again. I'm just waiting for the day when my crates of punch cards will be in demand by everyone. My great grand-children will surely respect me THEN.

      --
      Seven puppies were harmed during the making of this post.
    5. Re:Ummmm by Anonymous Coward · · Score: 0

      How does multi-threading work without complex atomic instructions?

    6. Re:Ummmm by Dogtanian · · Score: 1

      This isn't true. Modern processors are highly RISCy -- they just have front-ends that translate from CISC ISAs. The last genuinely CISC processor was, I believe, the Pentium (non-pro edition).

      As far as I'm aware, that's correct. (For those not familiar with the Pentium Pro, it formed the basis of the more affordable- and successful- Pentium II. Both were, as the AC says, totally different to the original Pentium and its predecessors).

      One point I'll make is that having once posted on Slashdot pretty much what you said, someone else replied out that this (supposedly) RISC core of modern "x86" isn't actually *that* RISCy.

      Having said *that*, when I think about it, we're assuming that the same or similar core architecture for x86-compatible chips has been in use since the Pentium-Pro/Pentium II, which might well not be the case. So long as they don't expose the internal implementation to end-user use (*), there's no reason they couldn't change it completely, as long as it does the job and comes with a suitable translation layer.

      (*) And that's why you don't necessarily let people access the internal workings of your chip; if it's 100% black-box, you can totally change the internal workings, and so long as the translation layer does its work, no-one knows or cares. Whereas letting people access the "native" instructions means that some people *will*, forcing the chipmakers to support support them in every successive generation for compatibility reasons- either having to retain that architecture, or adding it to translation-layer baggage and pointlessly complicating the instruction set.

      --
      "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
    7. Re:Ummmm by pslam · · Score: 1

      How does multi-threading work without complex atomic instructions?

      There are a few exceptions to the simple instruction / simple pipeline. They tend to stall everything but they're rare and don't complicate the design. For example on ARM:

      Before ARMv6, the 'swp' instruction performed a bus-locked swap of a register with a word of memory, returning the existing value. That was all you needed.

      ARMv6 and up, there's 'ldrex/strex', which perform a load/store of a word, with the store failing if a non-ldrex instruction or other core accessed the same cache line before the strex. Slightly more efficient, and all you need.

      Even on x86 you'll find that the vast majority of multi-threading is done using just 'cmpxchg'. You don't need a huge amount of instruction set to get it done.

    8. Re:Ummmm by gbelteshazzar · · Score: 1

      RISC is definately the way these days, even if things look CISC from the outside, internally the best way is to use components that are simpler as they are much easier to understand and optimise, so CISC architectures end up deconstructing their instructions anyway. RISC isn't just about reducing the instruction set, but about providing less complex instructions that can be implemented more efficiently, although there is one instruction I'd argue that this is a CISC architecture.

    9. Re:Ummmm by snaz555 · · Score: 1

      ARMv6 and up, there's 'ldrex/strex', which perform a load/store of a word, with the store failing if a non-ldrex instruction or other core accessed the same cache line before the strex. Slightly more efficient, and all you need.

      This is a lot like MIPS. And indeed, a RISC processor is pipelined rather than microcoded. In a microcoded design it's not really feasible to execute multiple instructions in parallel. ARM strays a little from the pure pipelined model in that it offers complex instructions like stm/ldm, mainly to make it easier to program and reduce code footprint - which is understandable given is origin as a home computer CPU (for the Acorn).

      I think it would be cool to take RISC one step further where a single instruction is broken into 5-7 parts (or however deep the pipeline is), which each part controlling each step in the pipeline. But the assembler exposed a very traditional RISC instruction set similar to MIPS or Sparc, with a naked pipeline model - but then does initial instruction decode and generates pipeline steps instead. So while you might write "bal $a0", meaning store PC in LR, and A0 in PC, the assembler breaks this into pipeline controls over multiple instructions. Doing so would make it easier to fill delay slots and manage hazards, allowing the assembler to optimize the pipeline. Exposing a traditional RISC ISA would make porting a toolchain relatively easy, requiring only a version of gas with a pipeline optimizer. Of course, such a processor would require a slightly different pipeline, but it's somewhat plausible the changes would be mostly simplifications to reduce complexity.

    10. Re:Ummmm by pslam · · Score: 1

      I think it would be cool to take RISC one step further where a single instruction is broken into 5-7 parts (or however deep the pipeline is), which each part controlling each step in the pipeline. But the assembler exposed a very traditional RISC instruction set similar to MIPS or Sparc, with a naked pipeline model

      This is pretty much what microcode is. The trouble is you need a huge amount of control signals to drive the pipeline - much more than 32 bits for a start. The vast majority of combinations also don't make sense (99% of signals are halt-and-catch-fire). So you'll have to encode the signals to some extent. At which point you've rediscovered instruction set encoding :) An ancient 6502 has about 130 signals for its non-pipelined architecture, and last I checked x86 (which was years ago) it was in the thousands!

      To be fair, there are architectures where driving the pipeline is much more explicit. A lot of (older) DSPs are like this. You'll find some that don't have any hazard protection (e.g Motorola 56k): you're not supposed to write (or generate) code that has input/output conflicts, or accesses values before they're ready. Some vector DSPs has explicit input/output driven by the number of cycles between instructions, and yes that's fairly insane.

      The reason it's not common is it's not much benefit. There's not a huge amount of extra silicon to have a statically scheduled pipeline, e.g like ARM. Even Cortex-A8, which has dual pipelines, admits to having a few instructions with unnecessary extra cycles of delay due to simplifying the scheduling (so it doesn't end up out-of-order scheduled).

      It is very tempting to have an instruction set designed exactly to a single generation of CPU and its exact pipeline. Transmeta's CPUs are the closest anyone's really come to this - it's a shame the timing of their venture was bad, because in the current low power market, with much better compilers and tools, I think it's a really good idea to test some more.

    11. Re:Ummmm by osu-neko · · Score: 1

      The problem with the 90s RISC vs. CISC thing was that it was based on what turned out to be a false dilemma. Today's processors are both. They're arguably closer to RISC at the core, but the instruction sets haven't gotten any less CISC from the programmer's point of view, indeed more CISC than ever, leading to the apparently (but only apparently) paradoxical fact that a modern processor is more RISC-y than those 90s RISC chips AND more CISC-y than those 90s CISC chips. Trying to classify a modern processor as either is just continuing the 90s misconception that these design concepts were irreconcilable, when in fact what happened was clever engineers looked at both ideas and said, "yes, that's a great idea" and implemented both at once.

      --
      "Convictions are more dangerous enemies of truth than lies."
    12. Re:Ummmm by wd5gnr · · Score: 1

      You mean multithreading at the software level? As it appears in DDJ the CPU has no interrupts so threads would have to be cooperative. But there is a later version with interrupts that can support threading and tasking. I don't doubt you could set up an atomic (test and set) operation as is, but if you couldn't you could always add it as a functional unit as a "new instruction."

    13. Re:Ummmm by anss123 · · Score: 1

      I'd say it's more the other way around. Even in systems with a CISC ISA (e.g. x86), you tend to find that under the hood the CISC instructions are translated into a series of microops that are then dispatched in a system that is somewhat RISC-like.

      Keep in mind that even the ancient 8086 had microcode (aka. instructions that were broken up into simpler instructions) and IIRC the latest Core chips executes more instructions on a 1-to-1 basis than any earlier x86 chips, which arguably makes it more CISC than ever before. There is no clear definition on what CISC is though, it's more like CISC is "not RISC" and RISC is whatever pulls ARM/PPC/MIPS/ALPHA/!x86 under the same umbrella.

      To muddle matters the PPC970 chip cracks up instructions and ARM (with thumb) got variable length instructions - just like any good CISC... no wait :-)

    14. Re:Ummmm by julesh · · Score: 1

      Keep in mind that even the ancient 8086 had microcode (aka. instructions that were broken up into simpler instructions)

      Yes, but the way it worked is very different: it had what was effectively an interpreter for microcode programs and stepped through each microcode instruction on a one-per-cycle basis, with the single microcode instruction dictating everything that happened in the processor at the time. That's a very different architecture to translating the instructions to a RISC-like instruction set and then dispatching them on what is effectively a pretty-close to traditional RISC execution pipeline, which is what the more modern x86 processors do.

      ARM (with thumb) got variable length instructions

      ARM Thumb instructions aren't variable length; they're fixed-width at 16 bits. Whether to read 32-bit or 16-bit instructions is determined by a processor mode, not by the instruction encoding.

    15. Re:Ummmm by anss123 · · Score: 1

      dispatching them on what is effectively a pretty-close to traditional RISC execution pipeline

      Note sure what a "traditional RISC execution pipeline" is but the one in Core CPUs reminds me more of VLIW (instructions being bundled together). Core CPUs have internal "read modify write" instructions which is a CISCisim thing and while the inner instructions are pipelined and "fixed width", I think it wrong to say the innards are "RISC" for what exactly is RISC? Fixed width instructions that are scheduled? Load/Store? Single cycle instructions? I've heard all those explanations.

      ARM Thumb instructions aren't variable length; they're fixed-width at 16 bits. Whether to read 32-bit or 16-bit instructions is determined by a processor mode, not by the instruction encoding.

      My knowledge about ARM is lacking, but AFAIK an ARM application can freely switch CPU mode at any time. That means that when ARM fetches a bundle of instructions it needs some mechanism to search through the bundle and treat all instructions after a "mode switch" differently. Depending on how fast the implementation needs to be you can end up with something not that different from a decode stage, i.e. slips the 32-bit instructions through and expands the 16-bit instructions.

    16. Re:Ummmm by wd5gnr · · Score: 1

      Well I don't think switching between ARM and Thumb mode counts ad variable size instructions in the purest sense. However, the newer ARMs have Thumb-2 which has nearly the entire ARM instruction set (and some new things) in Thumb mode and has some 32 bit instructions along with the traditional 16 bit Thumb instruction. Not only do some of the newer ARMs support this, some like the Cortex-M3 apparently ONLY support this and ARM clearly wants this to be the "default" mode going forward. My only complaint is they had ARM and THUMB. Then they went to THUMB2. I would have named it MIDDLE-FINGER.

    17. Re:Ummmm by julesh · · Score: 1

      My knowledge about ARM is lacking, but AFAIK an ARM application can freely switch CPU mode at any time.

      It's been a while since I programmed an ARM, and I've never programmed in Thumb, but I believe a mode switch can only occur at a call/return boundary, so the mechanism for determining which instruction decoding system to use will be bound up with branch prediction.

  21. All on one page version by KnownIssues · · Score: 1

    Link to the Print version--article on one page with no advertising since I haven't seen that posted yet.

  22. One-der peripherals by ZipK · · Score: 1

    Is there an optional one-way infinite tape drive?

  23. Not new, and not too useful by Animats · · Score: 5, Interesting

    That's an old idea. The classic "one instruction" is "subtract, store, and branch if negative". This works, but the instructions are rather big, since each has both an operand address and a branch address.

    Once you have your one instruction, you need a macroassembler, because you're going to be generating long code sequences for simple operations like "call". Then you write the subroutine library, for shifting, multiplication, division, etc.

    It's a lose on performance. It's a lose on code density. And the guy needed a 1,000,000 gate FPGA to implement it, which is huge for what he's doing. Chuck Moore's original Forth chip, from 1985 had less than 4,000 gates, and delivered good performance, with one Forth word executed per clock.

    1. Re:Not new, and not too useful by avandesande · · Score: 1

      Let Chuck Norris create 'the instruction'

      --
      love is just extroverted narcissism
    2. Re:Not new, and not too useful by Bender_ · · Score: 1

      Fewer instructions does not always mean that the CPU architecture gets more optimized.

      To my knowledge, in terms of gatecount this is the most efficient CPU around:

      http://www.opencores.org/project,mcpu

      32 Macrocells in a CPLD.

    3. Re:Not new, and not too useful by Anonymous Coward · · Score: 0

      The monitor code in the article makes it look like it does have a macro assembler since it clearly uses lots of instructions. Why would you subroutine things like shifts and multiplies? Just make a new ALU destination so transfer 10 -> ACC_MULTIPLY or whatever.

      From my experience he probably doesn't NEED the million gate FPGA but probably needs the memory on it or the routing resources. Same for speed. You could coax more speed out of this. It seems like it would be really easy to make new "instructions" by just plugging something into the bus.

      Of course, I'd argue that the immediate move stuff is really a 2nd instruction. Picky picky.

    4. Re:Not new, and not too useful by SharpFang · · Score: 1

      That's not this approach. It's "memory-map every single operation, as input register/result register." It's really a CISC except mnemonics and data share the same namespace. There's no separation for command and arguments, all arguments are pointers (if you want a fixed value, you must pick it from a range of memory that just produces all possible values) and all commands are in fact "magic registers".

      --
      45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
    5. Re:Not new, and not too useful by osu-neko · · Score: 1

      Let Chuck Norris create 'the instruction'

      Chuck Moore was the Chuck Norris of the time... :p

      YOU FORTH LOVE IF HONK THEN

      --
      "Convictions are more dangerous enemies of truth than lies."
    6. Re:Not new, and not too useful by wd5gnr · · Score: 1

      Yep, the assembler lets you write things like CALL, JMP, PUSH, etc. The Maxim MAXQ does this too. It doesn't even expose its MOVE architecture. Its all hidden behind the assembler.

    7. Re:Not new, and not too useful by wd5gnr · · Score: 1

      Actually, a few points: 1) Yes it is an old idea. The article points out a few links to MOVE, MAXQ, and Wikipedia about it. 2) The assembler is there that does macro like CALL, PUSH, etc. Its actually an interesting piece in of itself since it converts assembly to C macros and then uses gcc to drive the output. 3) The board has a 1M gate FPGA but the CPU doesn't use anywhere near all of it, but you can't get an FPGA with exactly the gate count you need (gate count is deceptive anyway). And much of what it does use is for onboard "block RAM" to make it a SOC. Go with external memory for program and data and the gate count drops sharply. Oh and Novix was a 16 bit CPU with no onboard memory, so that's kind of an apple and orange comparison. You can reduce the gate count by dropping unused FUs too. The CPU as presented actually does shifting and a host of other operations in one cycle. The DDJ version does not do hardware multiply or divide but it is easy to add that or any other operation you might want.

    8. Re:Not new, and not too useful by renoX · · Score: 1

      >It's a lose on performance. It's a lose on code density.

      More importantly it's a loss of ISA compatibility, as x86 has shown what backward compatibility is important..

    9. Re:Not new, and not too useful by wd5gnr · · Score: 1

      Given this was in the embedded portion of Dr. Dobb's I don't think anyone in that audience cares about x86 compatibility. PICs, AVRs, and ARMs won't run a line of x86 code but are quite popular. In the FPGA space, ARM and PPC are both well represented. Ditto for speed. A 32 bit CPU at 10MIPs is handling 40 megabytes per second (and that's not the maximum speed for One-Der). A PIC running at 5MIPS (20MHz clock) is handling 5 megabytes per second.
      Even in the "PC" space. I have an Arm-based processor that runs Linux, gcc, and just about any piece of code I want. If we could ever get a mass market CPU that DIDN'T have to maintain a 23 year old instruction set so it can boot MSDOS we could really get some inexpensive horsepower.
      As for the original comment, lose on performance is unsubstantiated. With the correct functional units for a particular task, a processor like this can blow the doors off of a generic CPU. Code density. Sure. But its an engineering trade. Do I make my datapath more complex or do I spend on memory? There's not one right answer for that (or most design trades, for that matter). In some applications, I'd rather simplify my datapath and add custom instructions with ease and buying a few memory chips isn't killing me. In some cases, though, I agree you'd want to trade the other way and work harder to conserve memory. Of course, there's opcode compression (a la VLSI) etc.
      Each CPU I've ever designed has been different and that's because they were built for different purposes. The idea that one CPU architecture, or one programming language, or one brand of computer, or one operating system is The One True Way is fanboy religion and I've never really got that. Well, other than emacs vs vi. That's a worthy argument I can be baited into.

  24. RISC vs CISC - sigh by peter3125 · · Score: 2, Informative

    "The advantages of RISC are well known — simplifying the CPU core by reducing the complexity of the instruction set allows faster speeds, more registers, and pipelining to provide the appearance of single-cycle execution." I know this has been argued to death already - but it just isn't completely true that a RISC has advantages over a CISC. The gain in speed is usually negated by the lack of expressiveness and the number of registers would help a CISC just as much as a RISC. Why is this being dragged up again?

    1. Re:RISC vs CISC - sigh by Anonymous Coward · · Score: 0

      "The advantages of RISC are well known — simplifying the CPU core by reducing the complexity of the instruction set allows faster speeds, more registers, and pipelining to provide the appearance of single-cycle execution."

      I know this has been argued to death already - but it just isn't completely true that a RISC has advantages over a CISC. The gain in speed is usually negated by the lack of expressiveness and the number of registers would help a CISC just as much as a RISC. Why is this being dragged up again?

      That depends on how you look at it. On one level, almost all x86 CPUs in existence today are RISC CPUs with an instruction translator that translates CISC instructions into RISC instructions bolted on at the front. If you take that perspective then the quote is entirely true, but not very meaningful since there essentially aren't any true CSIC chips around any more.

    2. Re:RISC vs CISC - sigh by RzUpAnmsCwrds · · Score: 1

      Right, I personally despise the term "RISC" because it conflates a number of architecture aspects.

      Does RISC mean few instructions? If so, how do you explain modern PowerPC CPUs, which have a full set of vector, floating-point, and other instructions?

      Does RISC mean load-store (most instructions only support register direct and immediate addressing)?

      Does RISC mean pipelined?

      There are pipelined CISC CPUs, there are CISC CPUs with fewer instructions than RISC CPUs, and there are "RISC" CPUs that aren't load-store.

  25. if the instruction is NAND by bugs2squash · · Score: 1

    I think you can get it to compute anything - if you have enough of them.

    --
    Nullius in verba
    1. Re:if the instruction is NAND by omnichad · · Score: 1

      That was exactly my first thought.

    2. Re:if the instruction is NAND by SpazmodeusG · · Score: 1

      That's absolutely true. Anyone who has studied CPU logic knows that the CPU is made of NAND gates which can be arranged to make any other gate. A NAND instruction which takes 2 addresses of 2 different bits (has to be bitwise not bytewise) and stores the result can do anything.

      One thing i don't get is why it hasn't been done? The wikipedia article on the one instruction computer doesn't list a bitwise AND instruction as being one of the possible instructions for a one instruction computer.

      http://en.wikipedia.org/wiki/One_instruction_set_computer

      But the fact is simple NAND instuctions can do anything.

    3. Re:if the instruction is NAND by Strilanc · · Score: 1

      NAND is only universal in the context of circuits. A program composed only of a series of NANDs is trivially not turing-complete because it terminates. You need some sort of iterating mechanism in your one instruction.

    4. Re:if the instruction is NAND by SpazmodeusG · · Score: 1

      Yes although that iterating mechanism doesn't have to be an instruction. You can simply have the last instruction of the program lead into the first, no explicit iteration instruction is required.
      Essentially this is what a CPU does. It runs a cycle of the same NAND instructions every clock cycle.

  26. "One-der" by porges · · Score: 4, Insightful

    The hyphen being so everyone doesn't call it "The O-need-er", as in That Thing You Do.

  27. Far better embedded CPUs... by nweaver · · Score: 1

    All the FPGA vendors have their own embedded CPU cores, such as the Xilinx Microblaze and the Altera NIOS II which are very small FPGA-embeddable CPU cores.

    You also have free options that aren't tied to specific FPGAs like the LEON sparc-compatible processors.

    --
    Test your net with Netalyzr
    1. Re:Far better embedded CPUs... by Anonymous Coward · · Score: 0

      Adding new instructions to any of these is a pain. I think the attraction to this datapath is that you can add modules to do different things without mucking with the internals or being limited to an ARM-like coprocessor slot.

  28. This is not Computer Science by Anonymous Coward · · Score: 0

    We'll see lots of joke replies here. Computer Science is more concerned with O() notation--they have enough problems wrapping their heads around something like floating point numbers.

  29. Used to work for someone doing this by JKR · · Score: 1

    The idea of offloading software functions onto custom hardware built around a TTA is interesting - 5 years ago I used to work for Critical Blue who were writing software to design and build those custom processors and optimise an ISA for them. Worth a look.

  30. Re:AAA AA A A by Yvan256 · · Score: 5, Funny

    Compile error. Instruction "A" missing after "A".

  31. One command? by HockeyPuck · · Score: 2, Interesting

    Reminds me of this old saying,

    "Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work."

    I just wish I knew who came up with it.

  32. And now on stage... by aarenz · · Score: 1

    The Oneder(pronounced oneeder). Woops, joke lost on geek crowd that probably never saw the movie.

    1. Re:And now on stage... by db32 · · Score: 1

      I am Sparticus!

      --
      The only change I can believe in is what I find in my couch cushions.
    2. Re:And now on stage... by Anonymous Coward · · Score: 0

      I am Sparticus!

    3. Re:And now on stage... by Sulphur · · Score: 1

      I knew Spartacus. Spartacus was a friend of mine, and you are no Spartacus.

  33. According to MS the instruction is by KiwiCanuck · · Score: 3, Funny

    nop

  34. I think it's misleading to call it 1 instruction by shoor · · Score: 2, Insightful

    There can be different architectures for computers, but, nowadays, for many of us, I'd say there is one particular model of an architecture that is likely to be the only one we're really familiar with, and that automatically comes to mind when one speaks of a computer architecture. It's a rather compartmentalized architecture in which the CPU is the place where opcodes are executed and memory is just a big flat address space for data, including instructions. This "transfer triggered" architecture strikes me as being not so much a 1 instruction computer as one where instructions are implemented in a less compartmentalized fashion, spread out among special units activated by addresses, as opposed to the more plain architecture where bit patterns on the address bus simply activate individual generic memory cells along with a read/write signal. More than that may happen, cache memory comes into play with all it's complications for instance, but the 'model' for the programmer is that simple one.

    --
    In theory, theory and practice are the same; in practice they're different. (Yogi Berra & A. Einstein)
  35. Actually the real point by Anonymous Coward · · Score: 0

    If you read all the way through he talks about how the bus-like architecture would let you reconfigure the CPU although he doesn't have any tools for that. So you could scan your program, decide on an optimal architecture for it (I need 4 accumulators, 2 stacks, and 4 floating point units) and then compile a program just for that "new" CPU. You could do that with other schemes, I guess, but it becomes hard becuase the data path is usually pretty much wired one way. This is just a bus.

    Also, it looks like it would be nothing to add new "instructions" just by plugging relatively simple boxes onto the bus.

    There are a couple of old CPUs that did this (Burroughs maybe? I forget).

  36. Oneders? by Anonymous Coward · · Score: 1, Funny

    AH the ONEDERS! - didn't that band have to change their name to the wonders? silly movies.... GO ONEDERS! pronounced (oh-knee-ders)

  37. It's not working by rewt66 · · Score: 1

    The point was supposed to be speed. So, he gets 10 MHz? That's not very impressive...

    1. Re:It's not working by Rockoon · · Score: 1

      No matter how you look at this type of computer, its just not going to compete in the general computing space because you can't design a memory cache that can cope with the forced random access to memory.

      --
      "His name was James Damore."
    2. Re:It's not working by Anonymous Coward · · Score: 0

      Why is it random? The article is mute on this, but it looks harvard-architecture like to me. So the program access nominally goes in sequence. Data access is data access. So stacks will access linear. Now granted, just a quick glance looks like he's using on-chip "block RAM" and no caching, but doesn't mean there is no way to cache this machine.

  38. HP 1000 by mollog · · Score: 1

    Is this not a state machine design? A network switch ought to implement this sort of design. In fact, the design of TCP would also provide functionality for parallel processing, multiple cores, etc. That would make for a variable word size, too. The work would be in the implementation of the various functions such as add, subtract, etc.

    --
    Best regards.
    1. Re:HP 1000 by MyLongNickName · · Score: 0, Flamebait

      Thread-jacking is a no-no

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    2. Re:HP 1000 by DJRumpy · · Score: 0, Offtopic

      Lunkwill: Rubbish, we don't want to be happy, we want to be famous!
      Fook: Yeah! What is all this "is she the one" tripe?
      Lunkwill: Take his brain!

  39. Isn't it cheating? by HexaByte · · Score: 1

    Isn't it cheating to have a CPU with one instruction that relies on custom hardware to do the rest of the instructions? You're just re-defining the CPU and adding more hardware to 'simplify' the CPU!

    --
    HexaByte - he's a square and a half!
  40. This is progress? by pedantic+bore · · Score: 1

    2009: one million gates, one instruction, RISC, gnarly to program = 10 MIPS.

    1984: 200,000 gates, gobs of instructions, CISC, easy to program = 10 MIPS.

    We should have more to show for the last twenty-five years in microprocessor design.

    --
    Am I part of the core demographic for Swedish Fish?
    1. Re:This is progress? by UltimApe · · Score: 1

      more gates means you can do things like parallel multiplication and addition. While you may have more gates, the depth of the gates is smaller, so the results propagate quicker.

      I'm sure there are similar improvements in registers and other related areas.

      --
      "Infecting minds with my own memetic virus, one post at a time." Ultimape
    2. Re:This is progress? by pedantic+bore · · Score: 1

      Maybe you didn't RTFA?

      Oneder doesn't have multiplication. It doesn't have registers. And, to my point, it doesn't execute its instructions (each of which actually accomplishes almost nothing) any faster than a 25-year-old commodity microprocessor executes CISC instructions.

      Color me unimpressed.

      --
      Am I part of the core demographic for Swedish Fish?
    3. Re:This is progress? by wd5gnr · · Score: 1

      Actually it does have 63 registers and can easily have more. It is easy to add multiplication to the functional units in several ways including using the multiplier in the FPGA fabric. And actually it is faster than a lot of embedded CPUs, especially if you factor in the bit width. Now if you think you are going to match a Pentium IV on a Spartan 3 FPGA... well... yeah you are going to be disappointed. Also the whole point to this was the architecture of the CPU not specific features. And its meant for embedded use. So comparing it in any way to a desktop CPU and/or complaining it doesn't do _____ is sorta missing the point.

  41. Re: Computer architecture by JeffreyDanielRubard · · Score: 1

    What what?

  42. The first language I ever saw was GOTO only by istartedi · · Score: 1

    The language of naughty schoolboys was goto-only. However, it never fulfilled on its promise of naked chicks if you turned to page 69. Some of the programs written in said language were, however, quite humerous and complex. You could implement loops in that language of course, and perhaps even keep an idiot busy for hours. I'm not sure if it was Turing complete though.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    1. Re:The first language I ever saw was GOTO only by Anonymous Coward · · Score: 0

      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares?"

      "for all intents and purposes" is what you're looking for there.

      To whom are you speaking? ;-)

  43. Re:I think it's misleading to call it 1 instructio by DerekLyons · · Score: 1

    There can be different architectures for computers, but, nowadays, for many of us, I'd say there is one particular model of an architecture that is likely to be the only one we're really familiar with, and that automatically comes to mind when one speaks of a computer architecture.

    Which just goes to show how shockingly ignorant 'many of us' are.
     
    Now if 'many of us' (brighter than the norm, or so the theory goes) can be so ignorant - why do we laugh at Joe Sixpack?

  44. Re:AAA AA A A by Dr.+Evil · · Score: 4, Funny

    Press the key to continue.

  45. ...to rule them all! by Anonymous Coward · · Score: 0

    But, err, there are no instructions for it to rule. Oh well.

  46. Perfect for running CPM/86... by Anonymous Coward · · Score: 0

    ... the OS only had one instruction - "PIP" ("Peripheral Interchange Program").

  47. I've seen this before. by Anonymous Coward · · Score: 0

    It seems to me like all they're trying to do is reduce risc.

  48. I'd settle for base 2 by macraig · · Score: 4, Funny

    All this talk about 13th Base makes me jealous, 'cause I've never even got to 2nd Base yet. I'll have to die first and go to heaven before I'll get to 13th Base with a chick.

    1. Re:I'd settle for base 2 by pugugly · · Score: 1

      "There were other women, but I never got past one."
      "You mean first base."
      "No, no, I mean one. You see, we have six a .. we have six, you see, and each one is a different level of intimacy and pleasure. So, you know, first you have one, and that's naa-naa. Then there's two .. and by the time you get to five it's ..

      --
      An Invisible Entity of Vast Power whose existence must be taken on faith alone: Liberal Media
    2. Re:I'd settle for base 2 by Anonymous Coward · · Score: 0

      Um, 13th Base involves quite a bit more than just "a" "chick", and would likely not be available to one in "heaven". Um, just so you know.

    3. Re:I'd settle for base 2 by BasharTeg · · Score: 1

      13th base is when you get a Z-job.

    4. Re:I'd settle for base 2 by Anonymous Coward · · Score: 0

      Trust me, you're not missing out on anything. Base 13 with a chick is when you're married, with 3 bratty kids, and she's as big as a house and does nothing but complain.

    5. Re:I'd settle for base 2 by macraig · · Score: 1

      Personal anecdote, that is?

  49. Geez, History Repeats Itself by CAOgdin · · Score: 2, Informative

    I invented this and published it more than 30 years ago, during the early debate between CISC and RISC microprocessors. It was in the (now defunct) "Modern Data" magazine, in my column "Carol's Microcosm." It's an obvious solution for any computer programmer who understands hardware logic.

  50. An old saying... by Anonymous Coward · · Score: 0

    There's an old saying:

    "Every program can be reduced by one instruction, and every program has at least one bug.
    Therefore every programme can be reduced to one instruction, which is wrong."

    Seems like we've just taken a big step towards proving that...

  51. One instruction 2000 addressing modes. by tjstork · · Score: 1

    wonder how many addressing modes there are...

    --
    This is my sig.
    1. Re:One instruction 2000 addressing modes. by SharpFang · · Score: 1

      Just one. mov b,a
      The question is how many special magic registers, memory-mapped devices and such are there.

      Example:
      if(X==0) {
          BEEP();
      } else {
          BLINK();
      }

      All instructions are 2 bytes (of n bits each,n constant but not necessarily 8):
      0 bytes command, always mov,
      1 byte address of destination,
      1 byte address of source

      Alternate addressing modes are calculated in preprocessor, like #4 is address of a cell that contains value 4, #lab4 is address of cell that contains the address of label 4. (so #4 in fact means address where the label 'data' is)

      :sub1
      mov IS_ZERO_IN,X              ; is X zero?
      mov MUL_IN_1,IS_ZERO_OUT      ; multiply result of x==0 (0 or 1)
      mov MUL_IN_2,#4               ; ... by 4 (distance between :lab1 and :lab2)
      mov ADD_IN_1,MUL_OUT          ; Sum the result of multiplication (0 or 4)...
      mov ADD_IN_2,#lab1            ; ...and base address of the jump
      mov PC,ADD_OUT                ; jump either to beep or to blink
      :lab1
      mov BEEP, #1
      mov PC,#ret
      lab2:
      mov BLINK, #1
      :ret
      mov PC,STACK_POP
      :data                 ; this is never executed; just values stored for use above
      mov 4,1              ; the numbers "4" and "1" referred to by #4 and #1
      mov @lab1,@ret    ; the addresses of the labelled points, referred to by #lab1, #ret

      --
      45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
    2. Re:One instruction 2000 addressing modes. by wd5gnr · · Score: 1

      The machine directly addresses registers and functional units. The register bank had an indirect register much like a PIC's FSR register scheme. All memory access is via functional units. So you can design what memory addressing modes you want. The default machine has two memory access blocks. One has two pointers that can pre or post incremented by a constant (or not) and indexed. The other block implements a stack and can access off fixed offsets of the stack as well. But the memory FUs could be arbitrarily complex implementing an MMU, segmented memory, block transfers, and any addressing mode you might require. If you did, for example, an MMU and kept the same interface as the memory FU (perhaps adding a second FU to control the page tables) the change would be transparent to application code.

  52. One instruction to rule them all! by DarthVain · · Score: 1

    1) "KILL ALL HUMANS!"

  53. NOR or NAND? by karstdiver · · Score: 1

    All Boolean logic functions can be implemented with just a NOR or NAND. Add a conditional branch and a move (ok- more than one instruction now) and you have a general purpose computer.

  54. I prefer HALT by syousef · · Score: 1

    The only valid program is a single HALT instruction.

    --
    These posts express my own personal views, not those of my employer
    1. Re:I prefer HALT by speculatrix · · Score: 1

      actually, Halt-and-catch-fire might be more useful if you needed to light a fire.

  55. This machine has been around already! by Anonymous Coward · · Score: 0

    My 32-bit one command machine just needs Start. It's that big button on the bottom left. Been around since '95. There's a even a Stones song for it!

  56. Great, but... by CompressedAir · · Score: 1

    ... is it pronounced "O-knee-der" or "O-ned-der"?

    You know, every time it does that thing it does.

  57. 1998 called... by Anonymous Coward · · Score: 0

    I can't find his writeup anymore, but isn't this essentially Dave Taylor's 'pinky processor'?

    http://tech.slashdot.org/article.pl?sid=98/06/06/136239

  58. Patterson by Anonymous Coward · · Score: 0

    I remember reading on a Patterson book that the ultimate instruction was "Substract and Jump if zero". Everything could be implemented using that instruction alone.

  59. One-Der... by Anonymous Coward · · Score: 0

    I once did microcoding on an Array Processor back almost 30 years ago which worked with the UNIVAC 1100/80 mainframe... it was implemented by DataWest.

    Using the 1100 Meta-Assembler we wrote 288bit long instructions that handled moves through the various bits of the machine with 72bit per slice (there were 4 slices).

    And, yeah, the clock rate the 100ns/cycle so there was an instruction fetch 10 times a microsecond. This limit was do to being built using TTL...

    And to think that this machine had a theoretical peak throughput of 120MFlops... and, I recall, could sustain 80 MFlops.

    So, yeah, this could happen.

  60. Re:AAA AA A A by Anonymous Coward · · Score: 1, Insightful

    Ah, and here's the programmer's manual: clicky

  61. Re:I think it's misleading to call it 1 instructio by Anonymous Coward · · Score: 0

    Erm, you know that Memory Mapped devices are in every day use right? That the x86 CPU exports things like the APIC through memory mapping even though it's built-in to the CPU?

    If you have a video card, the card's control registers are memory mapped more likely then not.

    The real problem with alternative CPU architectures is the x86 arch has very good memory consistency, the out-of-order execution units block processing that read results which haven't been calculated yet whereas CPUs like the Alpha do not; this is just great in that you can read 2 numbers, add them, save to memory then read the memory and the read operation may actually return whatever was in the RAM before the add due to deciding that was the easiest operation to do first.

  62. Could really crank up the speeds by straponego · · Score: 3, Funny

    ...if the one instruction is NOP. He could easily crack the petanop barrier.

  63. This isn't a new idea by Theovon · · Score: 1

    Of course, that's true about just about everything. Back in the 80's, I heard of this being referred to as a MISC processor (minimal instruction set computer).

    Of course, it's cool that this guy actually BUILT one. :)

  64. ... and one instruction ... by Anonymous Coward · · Score: 0

    ... to rule them all!

  65. Oh my, you'll never believe what I'm about to say by stonewolf · · Score: 4, Interesting

    A cousin of mine (Howdy Rusty!) described this concept to me in the '70s while I was taking classes toward my CS degree.

    A little background: I went to the good old University of Utah which had a Boroughs 1700 with user writable microcode and so a lot of project centered around writing microcode and designing micro architectures. A friend was trying to code up a single instruction machine based on Curry Combinators. I thought he was nuts, but I liked the idea of a single instruction machine. So, I was talking to my cousin and he described an architecture that had one instruction that was a source and a destination address. Any address could be either memory or a register in a functional unit, an FU for short. No kidding, that is how he described it.

    The only trouble was trying to figure out how to do a conditional branch.

    A few years later while I was in gradual school I solved that problem and wrote paper about it. Being a gradual student I could not publish without permission from my adviser. Well, he got a good laugh out of the idea and told me not to show it to anyone. So, of course I sent it to everyone I knew. They all had a good laugh to. Said it was the funniest thing I had ever written. You see, I was into writing humorous stories at the time and people thought this was another one. Oh well, I have a print out of the thing around here somewhere.

    What I really liked about the architecture is that if you started modifying it to make it more economical, doing things like making the addresses have different lengths and adding a bit to tell you if the long address is the source or the destination, the move architecture starts looking more and more like a classic instruction set architecture. I thought that was very cool. When you look at micro coded architectures and think about a pure move based processor it really does look like all traditional architectures are attempts to make the one instruction machine make more economical use of instruction bits.

    So, how did I solve the conditional branch problem? Pretty much the way this fellow did. Every FU may, or may not, cause condition flags to be set. I added registers where you could read and write the condition bits and read and write the program counter. I also added a mask register that was anded with the condition register so you could enable and disable conditions. Then I just made the current instruction conditional on the values of the flags register anded with the mask register. If the result was non-zero the current instruction was skipped. Of course, the machine had to clear the condition register after each instruction was executed. (Hmm, it would make more sense to only make moves to the program counter conditional and it would make more sense to only clear the flags after a move to the instructions counter... Hey was a gradual student back then! :) That approach allowed you to select say the sign bit from one ALU, do an subtraction by moving values to two registers in the ALU, then jump if the sign bit is set. It also let you directly make any instruction conditional so you could implement something like the ABS() function without any jumps. Or, at least that was the idea.

    I called my one instruction: The Conditional Move From Here To There And Clear Flags, or TCMFHTTACF insturction. The assembly for it was really dull, it just always had the same op code down the left hand edge of the screen... Ok, really, I just never listed anything but addresses when I wrote code for it.

    Nice to see that someone actually built one of these. BTW, this kind of architecture makes it easy to add multiple execution units. With parallel execution and careful use of shared and private FUs and memories you can build a pretty damn powerful special purpose processor without a lot of hardware complexity.

    This just to damn cool... someone finally built it!

    Stonewolf

  66. Creating a one-intsruction computer is easy by Anonymous Coward · · Score: 0

    Even a child can create a one-instruction computer, as long as the instruction is "nop."

  67. the amazing zit shrinking cream by epine · · Score: 4, Interesting

    x86 is with us because of backwards compatibility. even Intel were unable to shrug it off with Itanium and various other things.

    x86 is still with us because is-gross turned out to be 20% is-gross and 80% with-gross. The 20% that actually is-gross has been a minor cross to bear, the other 80% was relegated to traps, microcode, and emulation. The most ridiculous CISC instruction from 1980 is a pimple on a bedbug in silicon area thirty years later. Moore's law: the amazing zit shrinking cream.

    you almost need a different compiler for each generation of CPUs

    If your compiler doesn't work well on a 486, it's badly broken. Since then, there have been two different approaches by Intel which annoy the compiler gods: the Pentium and Pentium IV which place a premium on low level instruction scheduling, and everything else, starting with the Pentium Pro and including the Core Duo, all non-deterministic data-flow architectures at heart.

    The main differences in a good Pentium Pro compiler was a few hazard-aware instruction order tweaks, mostly focused on the complex/simple/simple instruction decode architecture. Hand tweaking for the Pentium Pro did not offer as much as with other architectures. It was hard to gain complete control for cycle precise scheduling, and the OOO logic did a good job of mitigating dependency chains on the fly: you neither had a large problem to solve, nor much control in solving it.

    There's a rumour the trace cache is making a reappearance in Sandy Bridge, so perhaps the pendulum is swinging back to the Pentium/Pentium IV side of the fence.

    A long time ago I read some long papers on TTA, around the time Intel went the wrong direction with Itanium (defining bundles as a unit of independent instructions, rather than bundles as units of dependent instructions).

    What makes TTA interesting is having many buses, with as many buses utilized on each clock cycle as possible. This guy has not invented an instruction set. He has invented a microcode engine. In doing so, he's muddied the notion of processor state, so there's no abstraction for handling interrupts. The great thing on an FPGA is that you can program around the need for interrupts, if you can devote a small core to each concurrent task.

    Real microcode instructions tend to have very long bit vectors, so that multiple buses can be coordinated on the same clock cycles. If you aren't trying to throw maximal resources at a single, dominant task, you can instead have many concurrent execution engines, each with a single function unit bus. This works for some applications.

    My feeling about Itanium is that it should have allowed instruction clusters such as complex multiply in a single bundle.

    r = ac - bd
    i = ad + bc

    This requires four inputs from the register file, two outputs to the register file, four multiplications, and two additions. You can find many examples in TAOCP V4F1 of small instructions clusters of this nature. A single eight byte bundle will be hard pressed to encode six arbitrary registers from a 256 register set, but I would argue that you don't need to. Compilers are extremely clever at register colouring, so a clever subset of full generality would prove more than adequate. Hint: invent the compiler and prove this, before committing the design to silicon.

    From a TTA perspective, such a bundle achieves six operations at the expense of just four reads and two writes to the shared register file, with some intermediate results briefly shunted on local sidings. Managing the local sidings introduces some non-determinism from the perspective of the compiler, but nowhere near the scope of OOO shunting overhead in the Pentium Pro.

    I think the Itanium design fell victim to ATM logic: determinism at the expense of higher aggregate throughput in the common case. That bet rarely pays off. They tricked themselves into believing they could bet against the grain by shuffling the downside of this fictio

    1. Re:the amazing zit shrinking cream by wd5gnr · · Score: 1

      This guy has not invented an instruction set. He has invented a microcode engine. In doing so, he's muddied the notion of processor state, so

      Actually, there is a newer version that handles interrupts (required a very small set of changes in the core and all the interrupt hardware is in the FIO block except debugging interrupts which are in a new FDEBUG block). Saving the processor state is no worse than saving the things you use on the stack just like any other processor. There's more on this newer version at: http://www.awce.com/classroom/course/view.php?id=11

  68. A machine with just one instruction... by Fross · · Score: 1

    Would anyone like any toast?

  69. Re:AAA AA A A by Anonymous Coward · · Score: 0

    I'm confused; my computer doesn't have a key on it, only a wheel and a button!

    I tried taking a key out of my pocket and pushing it against the wheel, but that didn't seem to anything but scratch it! :-/

  70. Re:Oh my, you'll never believe what I'm about to s by snaz555 · · Score: 1

    BTW, this kind of architecture makes it easy to add multiple execution units. With parallel execution and careful use of shared and private FUs and memories you can build a pretty damn powerful special purpose processor without a lot of hardware complexity.

    All the execution units (aka co-processors in modern parlance) are still attached to a single bus, so theoretical max throughput is still one instruction per cycle. So this only makes sense if the CPs perform complex operations - like memory management, floating point, mul/div - or something of similar complexity. For the typical simple integer instruction that tends to dominate code it's no better than a microcoded processor - since now each normal instruction requires several cycles on the bus.

    Compare this to a pipeline, where each step is what you'd consider a FU, but each one only needs to interface to the previous one, not counting the occasional clever bypass and special linkage. In a pipeline each FU can be fed an input in one cycle and provide an output in the next, something "FU"s (CPs actually) on a shared bus can't.

    The other drawback is that anything that goes on the bus needs to implement a generic bus interface and its own internal sequencing logic. This doesn't come free. This is really just a CISC in silicon with exposed microcode, and it's pretty clear the author is thinking CISC all the way as can be witnessed by the stack operations. The typical RISC approach is to have a link register where the return address is placed on subroutine calls, so leaf functions don't have to push/pop it from the stack. Non-leaf functions start by saving the link register to the stack frame in the function prologue once space has been allocated for it.

  71. Re:AAA AA A A by Guppy · · Score: 1

    Press the key to continue.

    Ok, Steve Jobs has really gone too far with the minimalist controls this time.

  72. Re:AAA AA A A by Joelfabulous · · Score: 0, Redundant

    don't you mean "Press 'A' key to continue"? ;)

    --
    Sometimes I wonder if I think too much.
  73. well allow me to retort.. by hldn · · Score: 1

    - RISC architecture is gonna change everything.
    - Yeah. RISC is good.

    QED

    --
    http://www.accountkiller.com/removal-requested
    1. Re:well allow me to retort.. by peter3125 · · Score: 1

      you are entitled to your opinions sir, I don't believe that RISC (or CISC) are THE future - parallelism begs for solutions more akin to a Cell architecture. Both RISC and CISC will be around for a while longer. Our hardware architecture lecturer (former chief architect of AMDAHL) always maintained that (a) registers are an optimization/hack (b) RISC is an optimization, CISC can be opmtized to match RISC - it is only a matter of cost.

    2. Re:well allow me to retort.. by hldn · · Score: 1

      not necessarily my opinion, it was just a movie quote >

      --
      http://www.accountkiller.com/removal-requested
  74. This is what the ASM code looks like... by marciot · · Score: 1

    .MODEL Small .STACK 100h .DATA
          msg db 'Hello, world!$' .CODE
        start:
        simon_says mov ah, 09h
        simon_says lea dx, msg
        simon_says int 21h
        simon_says mov ax,4C00h
        simon_says int 21h
        end start

    (source: wikipedia)

  75. Pardon me for injecting something serious, but... by Bruce+Perens · · Score: 2, Insightful

    It seems to me that a transfer oriented architecture is conceptually very easy to parallelize.

  76. Re:Oh my, you'll never believe what I'm about to s by wd5gnr · · Score: 1

    Actually the bus interface is a tristate buffer and a decoder. Not free, but cheap especially on modern fabric. As for CISC thinking, the RISC text is emphasizing the one instruction not that the actual "derived" ISA is RISC-like. The advantage to this is you can plug in different FUs (or CPs if you rather) without mucking with the processor per se.

  77. One instruction OS by Anonymous Coward · · Score: 0

    That would be great for running Windows; all you need is one instruction:

    HLT.

  78. I've done this for a while by ewertz · · Score: 0

    My programs have just one instruction -- ESM (Execute State Machine). The instruction is exactly the length of my program.

  79. Just moves complexity, doesn't eliminate it by Anonymous Coward · · Score: 0

    All this does is move the complexity of the instruction decoding from the processor to the address decoders.

    1. Re:Just moves complexity, doesn't eliminate it by wd5gnr · · Score: 1

      But that does in fact reduce complexity when you go to add new "instructions". Suppose you want to add a multiplier. You simply build a module that does multiply, verify it, and then hang it off the bus. Same goes for if you want, say, a second stack (for the Forth compiler, for example). You just make a new instance of the stack FU.

  80. mod up by Anonymous Coward · · Score: 0

    Damn guys, mod this up.

    1. Re:mod up by Anonymous Coward · · Score: 1, Funny

      please translate parent's parent into english :-)

  81. Re:Oh my, you'll never believe what I'm about to s by TheThiefMaster · · Score: 1

    I've been mucking about with the idea of building a cpu from logic gates for a while now, and I might have to use a "single instruction" architecture. The registers and inputs and outputs of small function units would all be addressable memory. Technically you could argue that some addresses have instruction meanings as a result, but what the hell. A program would be along the lines of:
    Move from constant #000 (could be memory loc #000) to increment input 0 (say memory loc #002)
    Move from memory loc #100 (a real memory location) to add unit input 0 (say memory loc #006)
    Move from memory loc #101 to add unit input 1 (say memory loc #007)
    Move from add unit output 0 (say memory loc #008) to memory loc #101
    Move from increment output 0 (say memory loc #003) to increment input 0 (loc #002)
    and then a conditional jump to the top on the increment output reaching a value, which I figure would have to be handled by a subtract and a "conditional unit", with the conditional unit returning one input or another depending on yet another input (fed from the subtract), which could then be moved into the PC. Yes, this technically means it does a non-conditional jump to one of two addresses depending on a condition, not a "conditional jump", but that's close enough.

    It would be easy to build due to being so incredibly modular. You could even make it execute two "instructions" per clock or more to make some more traditional instructions take only a single clock cycle, instead of a cycle per input and output.

  82. I also did a TTA fun design by John+Bayko · · Score: 1

    I liked the idea and tried doing a design of my own. The thing I didn't like was that you now split up an operation into multiple instructions which couldn't operate concurrently, and I couldn't see how that could be sped up given instruction bus speed limits.

    What I figured was to make the functional units more complex, so instead of having two inputs (left and right operand, implicit function), they'd also take an op code. This meant that I could reduce the number of addresses enough that a single move instruction could be packed into one byte. I don't recall for sure, but I think I used two bits to indicate the bus the move operated on, so you could get three moves happening at once (I think the last 2-bit pattern was reserved for special operations, but I don't recall what they were).

    Branches were straightforward, in that the instruction read unit was just another functional unit, with left, right, and op input, you could just transfer the output from a logic/comparator unit to the op input of the instruction read unit to jump to the new (relative, I think) address or not.

    Constants were defined by a special instruction unit operation which would accumulate 1, 2, or 4 subsequent bytes into the output register, ready to be moved elsewhere (as well as regular load/store from memory).

    There was also a dedicated register file, where the op code was the register to read/write. Just in case the functional unit input/output registers weren't adequate.

    I liked this idea because there'd be no speed penalty - in fact, a typical "regular" instruction would only be 3 bytes, so with the same input bottleneck it could even be faster.

    It didn't get beyond a high level block diagram and instruction/unit descriptions. I'm sure I have a copy of it somewhere, but it got lost in a move (ironically).

  83. Re: nihilist - Marklar by fahrbot-bot · · Score: 1

    A language that realizes that ultimately all things are futile and irrelevant, thus allowing all instructions to be reduced to a no-op.

    Marklar: "You see, young marklar. Those marklars don't care about marklar marklar. They just want to take your marklar and marklar their own marklar. The only marklar for this is to marklar."

    --
    It must have been something you assimilated. . . .
  84. Re:Oh my, you'll never believe what I'm about to s by stonewolf · · Score: 1

    BTW, this kind of architecture makes it easy to add multiple execution units. With parallel execution and careful use of shared and private FUs and memories you can build a pretty damn powerful special purpose processor without a lot of hardware complexity.

    All the execution units (aka co-processors in modern parlance) are still attached to a single bus, so theoretical max throughput is still one instruction per cycle. So this only makes sense if the CPs perform complex operations - like memory management, floating point, mul/div - or something of similar complexity. For the typical simple integer instruction that tends to dominate code it's no better than a microcoded processor - since now each normal instruction requires several cycles on the bus.

    I see how you come to that conclusion. But, it is false. No reason why the inputs and outputs can't be on separate buses and no reason why you can't have separate machines communicating over yet another bus or set of buses to build a pipeline.

    One version I found in my notes use a one instruction machine to implement the microcode for another machines. Like I said, my version was inspired by microcode so it *should* look like microcode.

    Anyway, you are wrong, you're just assuming a limitation that isn't there.

    Stonewolf.

  85. Re:Oh my, you'll never believe what I'm about to s by snaz555 · · Score: 1

    I see how you come to that conclusion. But, it is false. No reason why the inputs and outputs can't be on separate buses and no reason why you can't have separate machines communicating over yet another bus or set of buses to build a pipeline.

    Ah yes, that would be a pipelined design. I think that would work more efficiently than the original DDJ story's.

    One version I found in my notes use a one instruction machine to implement the microcode for another machines.

    I think too much significance is place on the "single instruction" aspect; the DDJ design is really "single instruction format". It clearly has multiple operations, and the destination address is more or less an opcode field. So it's more accurate to describe it as a single-instruction format machine. Each operation has its own dedicated destination register which can be used as a source for operations.

  86. Re:Oh my, you'll never believe what I'm about to s by wd5gnr · · Score: 1

    Of course it has multiple operations. But in fact it has a single instruction. The CPU's control unit treats every instruction the same. Now if you want to nit pick, yes the immediate load format makes it really a 2 or 3 instruction machine. But your argument is confusing operation with instruction.
    Think of an analogy of a C program. If I write:
    void foo(int cmd) {
    switch (cmd) {
    case 0: // do zero stuff
    break;
    . . .
    Do I have one subroutine or many? I have one subroutine. The fact that it carries out multiple operations is not relevant to the count of the subroutines even though I could certainly write "n" subroutines foo0, foo1, foo2, etc.

  87. One-Der on YouTube by wd5gnr · · Score: 1
  88. Re:Pardon me for injecting something serious, but. by mollog · · Score: 1

    Truly, what were you thinking, that people were going to understand the architecture and comment in a coherent manner? :)

    I was wondering if this could be implemented with network switches and TCP packets.

    --
    Best regards.
  89. Re:Pardon me for injecting something serious, but. by Bruce+Perens · · Score: 2, Insightful

    The problem with social networking is that society, as an aggregate, sucks :-)

  90. A Computer Architecture Book focusing on OISC by Anonymous Coward · · Score: 0

    Funny how things crop up when books have been written about the topic. There is a computer architecture book "Computer Architecture: A Minimalist Perspective" that examines computer architecture using the one instruction.

    For those curious or interested the authors' website is http://www.caamp.info. As Mr. Spock says "Fascinating..." or perhaps "Pure energy" instead. It does take the intellectual exercise to a more in depth look. It seems OISC and RISC are the "minimalist philosophy" of computer architecture, that also pervades other areas of music, art, engineering--the "less is more" outlook. Whether its good or bad, order or chaos, franks or beans seems to remain a controversial topic for much heated debate.

    Cheers, be well, and may your code compile...

    Moses C. Kery