The description of the decoder


As the show by the previous example, the description of the decoder can be described in the part which hits State of the decoding in case of state transition. However, in some cases, it sometimes had better describe separately as the combination circuit, too. Hereinafter, SIGN which is the control signal which decides whether it makes all values of 8 bits of higher ranks 0 when reading a 8-bit value from BRANCH which is the control signal which decides whether or not to branch or whether or not not to do "YO" sea urchin and the control-register or whether or not it makes them 1 and so on are the example.

  reg       BRANCH ;       // Branch TRUE for decode
  reg       SIGN ;         // Sign Extention mode for decode

//------------------------------------------------------------------//
// BRANCH flag and SIGN flag are made from IR and FR
//------------------------------------------------------------------//


  always @ (IR or FR)
    begin
      BRANCH<= 1'bx;
      SIGN   <= 1'bx;
      case ( `OP_4 )
      `IR_JP   : BRANCH<=1;
      `IR_JPS  : BRANCH<=FR[3];
      `IR_JPZ  : BRANCH<= ...
      `IR_JPV  : BRANCH<= ...
      `IR_JPC  : BRANCH<= ...
      default :
        case ( `OP_6 )
	`IR_ADD  : SIGN<=IR[7];
	`IR_SUB  : ...
	`IR_OR   : if ( `OP_M==`IMM ) SIGN<=0;    else SIGN<=IR[7];
	`IR_EOR  : ...
	`IR_AND  : ...
	`IR_LD   : ...
	`IR_ST   : ...
        endcase
      endcase
    end

The way of thinking
Next, description of control signal generation attempts to have.


| CAD Home |