Why are PDP-7-style microprogrammed instructions out of vogue?












5















DEC, and at least some of their computers, especially those in the 18-bit family and 12-bit family, had these opr instructions, which contained many bitfields which encoded something like "subinstructions". Things like




  • clear the accumulator

  • increment the accumulator

  • rotate the accumulator one place leftward

  • complement the accumulator

  • skip if the accumulator is zero


The nature of these simple operations is such that it's convenient to encode each one in some bit or bitfield in the instruction word, and to have the computer execute each one in a statically scheduled manner. My understanding is that's because they are often used together1, and have simple encodings.



A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations, which might not be as space or time efficient.



From what I can tell, using DEC-style microcoded instructions to perform any number of simple operations of a single register, has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures. Why is this?





1: Not only to load small integers into the accumulator, as in cla cll cml rtl inc to set the accumulator to 3 on the PDP-8, but also for examining or manipulating bitfields, probably long division, etc.










share|improve this question























  • What you're describing are VLIW architectures - except the question you have is quite unclear - adding 'Why this' to a description isn't exactly a question.

    – Raffzahn
    13 hours ago











  • @Raffzahn I think I've identified a trend; I am asking if it's there, and if so, what's motivated it. My understanding of VLIW is that the operations are dyadic, or have variable transitivities, but on the PDP 7 et al., the operations were all strictly monadic.

    – Wilson
    13 hours ago






  • 1





    This is a little off topic. The DEC PDP-6 had 16 variations on the Boolean operations. It used four bits out of the opcode field to specify a truth table for the corresponding Boolean operation. Thus it was able to implement 16 operations with about the same logic that it would have taken to implement just one.

    – Walter Mitty
    13 hours ago













  • @Wilson VLIW is not intrinsic tied to any kind of operation. The basic idea is that there is no (general) decoding, but each function unit that can be initiated separate will get it's own mark in the instruction field. THus the decoder stage can be removed - or at least quite simplified.

    – Raffzahn
    13 hours ago











  • To my mind, orthogonality of instruction set (a la VAX and PDP-11) beats mix'n'match OPR instructions. I want to be able to 'clear' any valid operand, so having a bit somewhere in another instruction that allows me to clear just a particular register is more valuable. It's not clear (heh heh) to me that you can do the "microcoding instruction bits" thing at the same time as supporting generalized operands.

    – another-dave
    6 hours ago
















5















DEC, and at least some of their computers, especially those in the 18-bit family and 12-bit family, had these opr instructions, which contained many bitfields which encoded something like "subinstructions". Things like




  • clear the accumulator

  • increment the accumulator

  • rotate the accumulator one place leftward

  • complement the accumulator

  • skip if the accumulator is zero


The nature of these simple operations is such that it's convenient to encode each one in some bit or bitfield in the instruction word, and to have the computer execute each one in a statically scheduled manner. My understanding is that's because they are often used together1, and have simple encodings.



A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations, which might not be as space or time efficient.



From what I can tell, using DEC-style microcoded instructions to perform any number of simple operations of a single register, has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures. Why is this?





1: Not only to load small integers into the accumulator, as in cla cll cml rtl inc to set the accumulator to 3 on the PDP-8, but also for examining or manipulating bitfields, probably long division, etc.










share|improve this question























  • What you're describing are VLIW architectures - except the question you have is quite unclear - adding 'Why this' to a description isn't exactly a question.

    – Raffzahn
    13 hours ago











  • @Raffzahn I think I've identified a trend; I am asking if it's there, and if so, what's motivated it. My understanding of VLIW is that the operations are dyadic, or have variable transitivities, but on the PDP 7 et al., the operations were all strictly monadic.

    – Wilson
    13 hours ago






  • 1





    This is a little off topic. The DEC PDP-6 had 16 variations on the Boolean operations. It used four bits out of the opcode field to specify a truth table for the corresponding Boolean operation. Thus it was able to implement 16 operations with about the same logic that it would have taken to implement just one.

    – Walter Mitty
    13 hours ago













  • @Wilson VLIW is not intrinsic tied to any kind of operation. The basic idea is that there is no (general) decoding, but each function unit that can be initiated separate will get it's own mark in the instruction field. THus the decoder stage can be removed - or at least quite simplified.

    – Raffzahn
    13 hours ago











  • To my mind, orthogonality of instruction set (a la VAX and PDP-11) beats mix'n'match OPR instructions. I want to be able to 'clear' any valid operand, so having a bit somewhere in another instruction that allows me to clear just a particular register is more valuable. It's not clear (heh heh) to me that you can do the "microcoding instruction bits" thing at the same time as supporting generalized operands.

    – another-dave
    6 hours ago














5












5








5


1






DEC, and at least some of their computers, especially those in the 18-bit family and 12-bit family, had these opr instructions, which contained many bitfields which encoded something like "subinstructions". Things like




  • clear the accumulator

  • increment the accumulator

  • rotate the accumulator one place leftward

  • complement the accumulator

  • skip if the accumulator is zero


The nature of these simple operations is such that it's convenient to encode each one in some bit or bitfield in the instruction word, and to have the computer execute each one in a statically scheduled manner. My understanding is that's because they are often used together1, and have simple encodings.



A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations, which might not be as space or time efficient.



From what I can tell, using DEC-style microcoded instructions to perform any number of simple operations of a single register, has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures. Why is this?





1: Not only to load small integers into the accumulator, as in cla cll cml rtl inc to set the accumulator to 3 on the PDP-8, but also for examining or manipulating bitfields, probably long division, etc.










share|improve this question














DEC, and at least some of their computers, especially those in the 18-bit family and 12-bit family, had these opr instructions, which contained many bitfields which encoded something like "subinstructions". Things like




  • clear the accumulator

  • increment the accumulator

  • rotate the accumulator one place leftward

  • complement the accumulator

  • skip if the accumulator is zero


The nature of these simple operations is such that it's convenient to encode each one in some bit or bitfield in the instruction word, and to have the computer execute each one in a statically scheduled manner. My understanding is that's because they are often used together1, and have simple encodings.



A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations, which might not be as space or time efficient.



From what I can tell, using DEC-style microcoded instructions to perform any number of simple operations of a single register, has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures. Why is this?





1: Not only to load small integers into the accumulator, as in cla cll cml rtl inc to set the accumulator to 3 on the PDP-8, but also for examining or manipulating bitfields, probably long division, etc.







instruction-set microcode






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 14 hours ago









WilsonWilson

12.4k557140




12.4k557140













  • What you're describing are VLIW architectures - except the question you have is quite unclear - adding 'Why this' to a description isn't exactly a question.

    – Raffzahn
    13 hours ago











  • @Raffzahn I think I've identified a trend; I am asking if it's there, and if so, what's motivated it. My understanding of VLIW is that the operations are dyadic, or have variable transitivities, but on the PDP 7 et al., the operations were all strictly monadic.

    – Wilson
    13 hours ago






  • 1





    This is a little off topic. The DEC PDP-6 had 16 variations on the Boolean operations. It used four bits out of the opcode field to specify a truth table for the corresponding Boolean operation. Thus it was able to implement 16 operations with about the same logic that it would have taken to implement just one.

    – Walter Mitty
    13 hours ago













  • @Wilson VLIW is not intrinsic tied to any kind of operation. The basic idea is that there is no (general) decoding, but each function unit that can be initiated separate will get it's own mark in the instruction field. THus the decoder stage can be removed - or at least quite simplified.

    – Raffzahn
    13 hours ago











  • To my mind, orthogonality of instruction set (a la VAX and PDP-11) beats mix'n'match OPR instructions. I want to be able to 'clear' any valid operand, so having a bit somewhere in another instruction that allows me to clear just a particular register is more valuable. It's not clear (heh heh) to me that you can do the "microcoding instruction bits" thing at the same time as supporting generalized operands.

    – another-dave
    6 hours ago



















  • What you're describing are VLIW architectures - except the question you have is quite unclear - adding 'Why this' to a description isn't exactly a question.

    – Raffzahn
    13 hours ago











  • @Raffzahn I think I've identified a trend; I am asking if it's there, and if so, what's motivated it. My understanding of VLIW is that the operations are dyadic, or have variable transitivities, but on the PDP 7 et al., the operations were all strictly monadic.

    – Wilson
    13 hours ago






  • 1





    This is a little off topic. The DEC PDP-6 had 16 variations on the Boolean operations. It used four bits out of the opcode field to specify a truth table for the corresponding Boolean operation. Thus it was able to implement 16 operations with about the same logic that it would have taken to implement just one.

    – Walter Mitty
    13 hours ago













  • @Wilson VLIW is not intrinsic tied to any kind of operation. The basic idea is that there is no (general) decoding, but each function unit that can be initiated separate will get it's own mark in the instruction field. THus the decoder stage can be removed - or at least quite simplified.

    – Raffzahn
    13 hours ago











  • To my mind, orthogonality of instruction set (a la VAX and PDP-11) beats mix'n'match OPR instructions. I want to be able to 'clear' any valid operand, so having a bit somewhere in another instruction that allows me to clear just a particular register is more valuable. It's not clear (heh heh) to me that you can do the "microcoding instruction bits" thing at the same time as supporting generalized operands.

    – another-dave
    6 hours ago

















What you're describing are VLIW architectures - except the question you have is quite unclear - adding 'Why this' to a description isn't exactly a question.

– Raffzahn
13 hours ago





What you're describing are VLIW architectures - except the question you have is quite unclear - adding 'Why this' to a description isn't exactly a question.

– Raffzahn
13 hours ago













@Raffzahn I think I've identified a trend; I am asking if it's there, and if so, what's motivated it. My understanding of VLIW is that the operations are dyadic, or have variable transitivities, but on the PDP 7 et al., the operations were all strictly monadic.

– Wilson
13 hours ago





@Raffzahn I think I've identified a trend; I am asking if it's there, and if so, what's motivated it. My understanding of VLIW is that the operations are dyadic, or have variable transitivities, but on the PDP 7 et al., the operations were all strictly monadic.

– Wilson
13 hours ago




1




1





This is a little off topic. The DEC PDP-6 had 16 variations on the Boolean operations. It used four bits out of the opcode field to specify a truth table for the corresponding Boolean operation. Thus it was able to implement 16 operations with about the same logic that it would have taken to implement just one.

– Walter Mitty
13 hours ago







This is a little off topic. The DEC PDP-6 had 16 variations on the Boolean operations. It used four bits out of the opcode field to specify a truth table for the corresponding Boolean operation. Thus it was able to implement 16 operations with about the same logic that it would have taken to implement just one.

– Walter Mitty
13 hours ago















@Wilson VLIW is not intrinsic tied to any kind of operation. The basic idea is that there is no (general) decoding, but each function unit that can be initiated separate will get it's own mark in the instruction field. THus the decoder stage can be removed - or at least quite simplified.

– Raffzahn
13 hours ago





@Wilson VLIW is not intrinsic tied to any kind of operation. The basic idea is that there is no (general) decoding, but each function unit that can be initiated separate will get it's own mark in the instruction field. THus the decoder stage can be removed - or at least quite simplified.

– Raffzahn
13 hours ago













To my mind, orthogonality of instruction set (a la VAX and PDP-11) beats mix'n'match OPR instructions. I want to be able to 'clear' any valid operand, so having a bit somewhere in another instruction that allows me to clear just a particular register is more valuable. It's not clear (heh heh) to me that you can do the "microcoding instruction bits" thing at the same time as supporting generalized operands.

– another-dave
6 hours ago





To my mind, orthogonality of instruction set (a la VAX and PDP-11) beats mix'n'match OPR instructions. I want to be able to 'clear' any valid operand, so having a bit somewhere in another instruction that allows me to clear just a particular register is more valuable. It's not clear (heh heh) to me that you can do the "microcoding instruction bits" thing at the same time as supporting generalized operands.

– another-dave
6 hours ago










2 Answers
2






active

oldest

votes


















10














The PDP-7 was a one address machine. All instructions occupied 18 bits. The operations that manipulated the accumulator didn't reference memory, and therefore didn't need an address. But the address bits were in the instruction anyway, because all instructions were encoded in an 18 bit word. So why not use these unused bits to get more use out of the instruction bits?



Once you get to opcodes with a variable number of operand addresses, the need to economize in this way goes away.






share|improve this answer































    5















    [...] had these opr instructions, which contained many bitfields which encoded something like "subinstructions"[...]




    What you describe is basically a VLIW instruction format - at least that's what it might be called today. That's what computers started out with. Separate bits for each function to be applied to the value addressed.



    The DEC is somewhat of a bad example here, as its accumulator instructions are a special kind, already a bastard between clean all over VLIW and dedicated encoding. The VLIW aspect only used on this accumulator subset.



    Zuse's machines, like the Z22, might make a better example with their ability to have each and every instruction carry multiple operations.




    A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations,




    Yes - and no. For one, not all possible combinations could be archived always at once, resulting in illegal instructions. In fact, depending on the machine's construction, most of these combinations where illegal. And that's why dedicated instructions took over. Let's assume, there are like 8 different operational units in the data path. Having one bit for each in the instruction word makes easy decoding, as each would just be wired up with the enable for a single function, resulting in a fast and simple machine structure.



    Of these 256 combinations (one would be a nop), many would not make sense - think shifting left and shifting right, or adding and subtracting at the same time. By encoding only those 20 useful combinations into a 5 bit field, 3 bits, almost half, could be freed - at the cost of an additional decoding stage.



    Now, back in the old times, when machines were word orientated (like 36 bits in one word or so), there was much space - even resulting in unused bits. No need to add a decoding stage. Even worse, doing so would slow down the execution. Well, only a bit, but it would.



    The situation changed when machines became byte orientated and variable length instruction formats were used. Here cramping down the 8 unit lines into a single encoded 5 bit field enabled to squeeze it into a byte while leaving room for more (like a register number), without the need to fetch two bytes. Heck, it even leaves 12x8 instruction points for other encodings/irregular instructions without needing more.




    which might not be as space or time efficient.




    That's in part true for the time efficiency, but not space - space-wise it's an extreme saving enabling more compact code. The inner workings are (can be) still (mostly) the same, but less visible. Instead of setting a shift and an add bit, there's now a Add-And-Shift instruction.



    Then again, by now encoding it into a single byte instead of a full 36 bit word. The CPU can fetch the instructions at the same speed (byte bus vs. word bus) or even 4 times the speed (word sized bus) than before. So with memory always being the slowest part, tighter encoding does not only save space, but also speeds up execution - despite the additional decoding stage.




    From what I can tell, [this] has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures.




    Not nearly as common on the surface is maybe the point here. For one, explicit VLIW instructions are still a thing (think Itanium), but more important, they are always an option for internal workings of modern CPUs. Where 'traditional' code gets first decoded into sub-operations, and these later get either combined to CLIW instructions again, or scheduled in parallel over different function units.



    In fact, the mentioned ARM makes another good point for it to vanish. ARM had traditionally the ability to have every instruction being executed conditionally (much like Zuse did first). Cool when thinking in sequential execution, but a gigantic hurdle when it comes to modern CPUs with the ability to reorder instructions according to available data and function units. It makes rescheduling not just a hard task, but almost impossible. Even worse, ARM featured a DEC like condition handling, where each and every load did (could) change the flags.



    Bottom line: Just because something isn't (always) visible to the user side programmer, doesn't mean it isn't there.






    share|improve this answer


























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "648"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9666%2fwhy-are-pdp-7-style-microprogrammed-instructions-out-of-vogue%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      10














      The PDP-7 was a one address machine. All instructions occupied 18 bits. The operations that manipulated the accumulator didn't reference memory, and therefore didn't need an address. But the address bits were in the instruction anyway, because all instructions were encoded in an 18 bit word. So why not use these unused bits to get more use out of the instruction bits?



      Once you get to opcodes with a variable number of operand addresses, the need to economize in this way goes away.






      share|improve this answer




























        10














        The PDP-7 was a one address machine. All instructions occupied 18 bits. The operations that manipulated the accumulator didn't reference memory, and therefore didn't need an address. But the address bits were in the instruction anyway, because all instructions were encoded in an 18 bit word. So why not use these unused bits to get more use out of the instruction bits?



        Once you get to opcodes with a variable number of operand addresses, the need to economize in this way goes away.






        share|improve this answer


























          10












          10








          10







          The PDP-7 was a one address machine. All instructions occupied 18 bits. The operations that manipulated the accumulator didn't reference memory, and therefore didn't need an address. But the address bits were in the instruction anyway, because all instructions were encoded in an 18 bit word. So why not use these unused bits to get more use out of the instruction bits?



          Once you get to opcodes with a variable number of operand addresses, the need to economize in this way goes away.






          share|improve this answer













          The PDP-7 was a one address machine. All instructions occupied 18 bits. The operations that manipulated the accumulator didn't reference memory, and therefore didn't need an address. But the address bits were in the instruction anyway, because all instructions were encoded in an 18 bit word. So why not use these unused bits to get more use out of the instruction bits?



          Once you get to opcodes with a variable number of operand addresses, the need to economize in this way goes away.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 13 hours ago









          Walter MittyWalter Mitty

          772312




          772312























              5















              [...] had these opr instructions, which contained many bitfields which encoded something like "subinstructions"[...]




              What you describe is basically a VLIW instruction format - at least that's what it might be called today. That's what computers started out with. Separate bits for each function to be applied to the value addressed.



              The DEC is somewhat of a bad example here, as its accumulator instructions are a special kind, already a bastard between clean all over VLIW and dedicated encoding. The VLIW aspect only used on this accumulator subset.



              Zuse's machines, like the Z22, might make a better example with their ability to have each and every instruction carry multiple operations.




              A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations,




              Yes - and no. For one, not all possible combinations could be archived always at once, resulting in illegal instructions. In fact, depending on the machine's construction, most of these combinations where illegal. And that's why dedicated instructions took over. Let's assume, there are like 8 different operational units in the data path. Having one bit for each in the instruction word makes easy decoding, as each would just be wired up with the enable for a single function, resulting in a fast and simple machine structure.



              Of these 256 combinations (one would be a nop), many would not make sense - think shifting left and shifting right, or adding and subtracting at the same time. By encoding only those 20 useful combinations into a 5 bit field, 3 bits, almost half, could be freed - at the cost of an additional decoding stage.



              Now, back in the old times, when machines were word orientated (like 36 bits in one word or so), there was much space - even resulting in unused bits. No need to add a decoding stage. Even worse, doing so would slow down the execution. Well, only a bit, but it would.



              The situation changed when machines became byte orientated and variable length instruction formats were used. Here cramping down the 8 unit lines into a single encoded 5 bit field enabled to squeeze it into a byte while leaving room for more (like a register number), without the need to fetch two bytes. Heck, it even leaves 12x8 instruction points for other encodings/irregular instructions without needing more.




              which might not be as space or time efficient.




              That's in part true for the time efficiency, but not space - space-wise it's an extreme saving enabling more compact code. The inner workings are (can be) still (mostly) the same, but less visible. Instead of setting a shift and an add bit, there's now a Add-And-Shift instruction.



              Then again, by now encoding it into a single byte instead of a full 36 bit word. The CPU can fetch the instructions at the same speed (byte bus vs. word bus) or even 4 times the speed (word sized bus) than before. So with memory always being the slowest part, tighter encoding does not only save space, but also speeds up execution - despite the additional decoding stage.




              From what I can tell, [this] has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures.




              Not nearly as common on the surface is maybe the point here. For one, explicit VLIW instructions are still a thing (think Itanium), but more important, they are always an option for internal workings of modern CPUs. Where 'traditional' code gets first decoded into sub-operations, and these later get either combined to CLIW instructions again, or scheduled in parallel over different function units.



              In fact, the mentioned ARM makes another good point for it to vanish. ARM had traditionally the ability to have every instruction being executed conditionally (much like Zuse did first). Cool when thinking in sequential execution, but a gigantic hurdle when it comes to modern CPUs with the ability to reorder instructions according to available data and function units. It makes rescheduling not just a hard task, but almost impossible. Even worse, ARM featured a DEC like condition handling, where each and every load did (could) change the flags.



              Bottom line: Just because something isn't (always) visible to the user side programmer, doesn't mean it isn't there.






              share|improve this answer






























                5















                [...] had these opr instructions, which contained many bitfields which encoded something like "subinstructions"[...]




                What you describe is basically a VLIW instruction format - at least that's what it might be called today. That's what computers started out with. Separate bits for each function to be applied to the value addressed.



                The DEC is somewhat of a bad example here, as its accumulator instructions are a special kind, already a bastard between clean all over VLIW and dedicated encoding. The VLIW aspect only used on this accumulator subset.



                Zuse's machines, like the Z22, might make a better example with their ability to have each and every instruction carry multiple operations.




                A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations,




                Yes - and no. For one, not all possible combinations could be archived always at once, resulting in illegal instructions. In fact, depending on the machine's construction, most of these combinations where illegal. And that's why dedicated instructions took over. Let's assume, there are like 8 different operational units in the data path. Having one bit for each in the instruction word makes easy decoding, as each would just be wired up with the enable for a single function, resulting in a fast and simple machine structure.



                Of these 256 combinations (one would be a nop), many would not make sense - think shifting left and shifting right, or adding and subtracting at the same time. By encoding only those 20 useful combinations into a 5 bit field, 3 bits, almost half, could be freed - at the cost of an additional decoding stage.



                Now, back in the old times, when machines were word orientated (like 36 bits in one word or so), there was much space - even resulting in unused bits. No need to add a decoding stage. Even worse, doing so would slow down the execution. Well, only a bit, but it would.



                The situation changed when machines became byte orientated and variable length instruction formats were used. Here cramping down the 8 unit lines into a single encoded 5 bit field enabled to squeeze it into a byte while leaving room for more (like a register number), without the need to fetch two bytes. Heck, it even leaves 12x8 instruction points for other encodings/irregular instructions without needing more.




                which might not be as space or time efficient.




                That's in part true for the time efficiency, but not space - space-wise it's an extreme saving enabling more compact code. The inner workings are (can be) still (mostly) the same, but less visible. Instead of setting a shift and an add bit, there's now a Add-And-Shift instruction.



                Then again, by now encoding it into a single byte instead of a full 36 bit word. The CPU can fetch the instructions at the same speed (byte bus vs. word bus) or even 4 times the speed (word sized bus) than before. So with memory always being the slowest part, tighter encoding does not only save space, but also speeds up execution - despite the additional decoding stage.




                From what I can tell, [this] has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures.




                Not nearly as common on the surface is maybe the point here. For one, explicit VLIW instructions are still a thing (think Itanium), but more important, they are always an option for internal workings of modern CPUs. Where 'traditional' code gets first decoded into sub-operations, and these later get either combined to CLIW instructions again, or scheduled in parallel over different function units.



                In fact, the mentioned ARM makes another good point for it to vanish. ARM had traditionally the ability to have every instruction being executed conditionally (much like Zuse did first). Cool when thinking in sequential execution, but a gigantic hurdle when it comes to modern CPUs with the ability to reorder instructions according to available data and function units. It makes rescheduling not just a hard task, but almost impossible. Even worse, ARM featured a DEC like condition handling, where each and every load did (could) change the flags.



                Bottom line: Just because something isn't (always) visible to the user side programmer, doesn't mean it isn't there.






                share|improve this answer




























                  5












                  5








                  5








                  [...] had these opr instructions, which contained many bitfields which encoded something like "subinstructions"[...]




                  What you describe is basically a VLIW instruction format - at least that's what it might be called today. That's what computers started out with. Separate bits for each function to be applied to the value addressed.



                  The DEC is somewhat of a bad example here, as its accumulator instructions are a special kind, already a bastard between clean all over VLIW and dedicated encoding. The VLIW aspect only used on this accumulator subset.



                  Zuse's machines, like the Z22, might make a better example with their ability to have each and every instruction carry multiple operations.




                  A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations,




                  Yes - and no. For one, not all possible combinations could be archived always at once, resulting in illegal instructions. In fact, depending on the machine's construction, most of these combinations where illegal. And that's why dedicated instructions took over. Let's assume, there are like 8 different operational units in the data path. Having one bit for each in the instruction word makes easy decoding, as each would just be wired up with the enable for a single function, resulting in a fast and simple machine structure.



                  Of these 256 combinations (one would be a nop), many would not make sense - think shifting left and shifting right, or adding and subtracting at the same time. By encoding only those 20 useful combinations into a 5 bit field, 3 bits, almost half, could be freed - at the cost of an additional decoding stage.



                  Now, back in the old times, when machines were word orientated (like 36 bits in one word or so), there was much space - even resulting in unused bits. No need to add a decoding stage. Even worse, doing so would slow down the execution. Well, only a bit, but it would.



                  The situation changed when machines became byte orientated and variable length instruction formats were used. Here cramping down the 8 unit lines into a single encoded 5 bit field enabled to squeeze it into a byte while leaving room for more (like a register number), without the need to fetch two bytes. Heck, it even leaves 12x8 instruction points for other encodings/irregular instructions without needing more.




                  which might not be as space or time efficient.




                  That's in part true for the time efficiency, but not space - space-wise it's an extreme saving enabling more compact code. The inner workings are (can be) still (mostly) the same, but less visible. Instead of setting a shift and an add bit, there's now a Add-And-Shift instruction.



                  Then again, by now encoding it into a single byte instead of a full 36 bit word. The CPU can fetch the instructions at the same speed (byte bus vs. word bus) or even 4 times the speed (word sized bus) than before. So with memory always being the slowest part, tighter encoding does not only save space, but also speeds up execution - despite the additional decoding stage.




                  From what I can tell, [this] has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures.




                  Not nearly as common on the surface is maybe the point here. For one, explicit VLIW instructions are still a thing (think Itanium), but more important, they are always an option for internal workings of modern CPUs. Where 'traditional' code gets first decoded into sub-operations, and these later get either combined to CLIW instructions again, or scheduled in parallel over different function units.



                  In fact, the mentioned ARM makes another good point for it to vanish. ARM had traditionally the ability to have every instruction being executed conditionally (much like Zuse did first). Cool when thinking in sequential execution, but a gigantic hurdle when it comes to modern CPUs with the ability to reorder instructions according to available data and function units. It makes rescheduling not just a hard task, but almost impossible. Even worse, ARM featured a DEC like condition handling, where each and every load did (could) change the flags.



                  Bottom line: Just because something isn't (always) visible to the user side programmer, doesn't mean it isn't there.






                  share|improve this answer
















                  [...] had these opr instructions, which contained many bitfields which encoded something like "subinstructions"[...]




                  What you describe is basically a VLIW instruction format - at least that's what it might be called today. That's what computers started out with. Separate bits for each function to be applied to the value addressed.



                  The DEC is somewhat of a bad example here, as its accumulator instructions are a special kind, already a bastard between clean all over VLIW and dedicated encoding. The VLIW aspect only used on this accumulator subset.



                  Zuse's machines, like the Z22, might make a better example with their ability to have each and every instruction carry multiple operations.




                  A later computer like the Z80 or ARM7 needs to fetch, decode and execute a separate instruction to perform each of these operations,




                  Yes - and no. For one, not all possible combinations could be archived always at once, resulting in illegal instructions. In fact, depending on the machine's construction, most of these combinations where illegal. And that's why dedicated instructions took over. Let's assume, there are like 8 different operational units in the data path. Having one bit for each in the instruction word makes easy decoding, as each would just be wired up with the enable for a single function, resulting in a fast and simple machine structure.



                  Of these 256 combinations (one would be a nop), many would not make sense - think shifting left and shifting right, or adding and subtracting at the same time. By encoding only those 20 useful combinations into a 5 bit field, 3 bits, almost half, could be freed - at the cost of an additional decoding stage.



                  Now, back in the old times, when machines were word orientated (like 36 bits in one word or so), there was much space - even resulting in unused bits. No need to add a decoding stage. Even worse, doing so would slow down the execution. Well, only a bit, but it would.



                  The situation changed when machines became byte orientated and variable length instruction formats were used. Here cramping down the 8 unit lines into a single encoded 5 bit field enabled to squeeze it into a byte while leaving room for more (like a register number), without the need to fetch two bytes. Heck, it even leaves 12x8 instruction points for other encodings/irregular instructions without needing more.




                  which might not be as space or time efficient.




                  That's in part true for the time efficiency, but not space - space-wise it's an extreme saving enabling more compact code. The inner workings are (can be) still (mostly) the same, but less visible. Instead of setting a shift and an add bit, there's now a Add-And-Shift instruction.



                  Then again, by now encoding it into a single byte instead of a full 36 bit word. The CPU can fetch the instructions at the same speed (byte bus vs. word bus) or even 4 times the speed (word sized bus) than before. So with memory always being the slowest part, tighter encoding does not only save space, but also speeds up execution - despite the additional decoding stage.




                  From what I can tell, [this] has fallen out of vogue, or are at least not nearly as common on modern instruction set architectures.




                  Not nearly as common on the surface is maybe the point here. For one, explicit VLIW instructions are still a thing (think Itanium), but more important, they are always an option for internal workings of modern CPUs. Where 'traditional' code gets first decoded into sub-operations, and these later get either combined to CLIW instructions again, or scheduled in parallel over different function units.



                  In fact, the mentioned ARM makes another good point for it to vanish. ARM had traditionally the ability to have every instruction being executed conditionally (much like Zuse did first). Cool when thinking in sequential execution, but a gigantic hurdle when it comes to modern CPUs with the ability to reorder instructions according to available data and function units. It makes rescheduling not just a hard task, but almost impossible. Even worse, ARM featured a DEC like condition handling, where each and every load did (could) change the flags.



                  Bottom line: Just because something isn't (always) visible to the user side programmer, doesn't mean it isn't there.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 12 hours ago









                  LangLangC

                  6891212




                  6891212










                  answered 13 hours ago









                  RaffzahnRaffzahn

                  55.9k6136225




                  55.9k6136225






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Retrocomputing Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9666%2fwhy-are-pdp-7-style-microprogrammed-instructions-out-of-vogue%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Statuo de Libereco

                      Tanganjiko

                      Liste der Baudenkmäler in Enneberg