[MUSIC] The last block to be implemented is the go_to block in charge of the computation of the number of the next instruction to be executed. This is its functional specification in which NUMBER is an internally stored value. Once again the behavior of this block depends on the instruction under execution, so we define a 4-bit control signal numb_sel. The two first bits are equal to 11 if the executed instruction is a jump, conditional or unconditional. The third bit is equal to 1 in the case of a conditional jump and equal to 0 in the other cases. Finally, the fourth bit is used to distinguish between the two possible jump conditions: a positive or a negative value of some data. Then, with the definition of this 4-bit control signal numb_sel, the functional specification is modified. The inputs to the go_to block are this control signal number_sel, a number N included in the instruction, a DATA that comes from the register bank and a RESET signal that allows setting to 0 the initial value of the instruction number. The only output is the instruction number. The functional specification can be modified: if numb_sel is equal to 1110, that is to say, if the instruction is an unconditional jump instruction, then the new value of number is N; if numb_sel is equal to 1100, that corresponds to a JUMP_POS instruction, then if DATA is positive, the new value of number is N; if it is not positive the new value of number is number + 1. If numb_sel is equal to 1101, that orrespond to a JUMP_NEG instruction, then if data is negative, the new value of number is N; if it is not negative, the new value of number is number + 1. And, finally, in all other cases the new value of number is number + 1. Here is a possible implementation consisting of three subcircuits. The main circuit is this programmable counter with a RESET input, to set number = 0, initially, and a LOAD input to set number equal to the input value N. The sign block is a combinational circuit defined by this table. It generates an output POS equal to 1 if and only if DATA is a positive number, and it generates (this was the output POS) it generates an output NEG 1 if and only if DATA is negative. The LOAD block is also defined by a table. It's output LOAD is equal to 1 if number_sel corresponds to an unconditional jump or if number_sel encodes a JUMP_POS instruction and POS = 1, or when it encodes a JUMP_NEG instruction and NEG = 1. As an exercise, try to describe the go_to block in VHDL. For that associate a VHDL process to each block: SIGN, LOAD and COUNTER, and define port "number" with the type INOUT, because it's at the same time an input and an output port, so that you can write assignments such as number <= number + 1. Here is a possible solution. After making visible several IEEE packages as well as our user defined package main_parameters, the entity is declared; it gives the list of inputs and outputs, namely: N and DATA are m-bit vectors, CLK and RESET are input bits, number_sel is a 4-bit control signal, and number is a bi-directional port and it's an m-bit vector. Then, the circuit description consists of three processes. The first process describes the SIGN computation table. Assume that data is represented in 2's complimented form. Then, the most significant bit of DATA, DATA(m-1), is it's sign bit; if it is equal to 1, then POS = 0 and NEG = 1; if DATA = 0, then both POS and NEG are equal to 0; and in the third case POS = 1 and NEG = 0. The second process describes the LOAD table: this is a straightforward table description done by means of a "case" statement: when number_sel is equal to 1110, then LOAD = 1, equal to 1100, LOAD = POS, and so on. And the third process describes the programmable counter. On the positive edge of the CLK signal, if LOAD = 1, then the new value of number is N, and if LOAD is not equal to 1, then the value of number is number + 1. Summary. The sequential go_to block has been implemented and a VHDL model has been generated.