Question: Show the state diagram and explain the vhdl code flow for the next instructions ( I have included an example of what the state diagram
Show the state diagram and explain the vhdl
code flow for the next instructions I have included an example of what the state diagram should look like:
LDADIR
STADIR
ADDAB
BRA
BEQ
State Diagram for LDAIMM
The following is the state diagram for LDAIMM. This load instruction will move
information from memory into register A Immediate addressing implies that the
information to be put into A is provided as the operand of the instruction.
BusSelatrommemory
IRload
This state will place the PC value into the MAR in order to
provide the address for the gpcode. MAR will be updated with
PC in the next state.
MAR is now holding the address of the opcode. it will take
clock cycle for the memory to provide the opcode after
recelving the address. While waiting, the PC can be
incremented to the next address in the program memory.
The ppcode that has been read from memory is now avallable
on Bus and can be latched into IR by asserting IRLoad. IR
will be updated with the opcode in the next state.
The epcode now resides in IR and is decoded to determine
which instruction is being executed.
to other instructions.
If IRLDAIMM
"Load A Immediate" means that the operand of the instruction
is the information to be loaded into A PC is already pointing
to this location in memory so we can put it out on MAR. MAR
will be updated with PC in the next state.
MAR is now holding the address of the operand. It will take
clock cycle for the memory to provide the operand after
receiving the address. While waiting, the PC can be
incremented to the next address in the program memory.
The operand that has been read from memory is now
available on Bus and can be latched into A by asserting
ALoad. Register A will be loaded with the operand in the
next state eg SFETCH
We are done executing this instruction so we can return to the
beginning and fetch the opcode of the next instruction. Notice that the
PC is already pointing to the next address in program memory.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
