C
Christoph M. Wintersteige
Guest
Hello there!
I'm not a pro in vhdl, just another student who has problems getting things
working like the teachers want to. We need to design a simple risc cpu,
without pipelining and all the fancy stuff, and actually I got everything
working quite nice so far, except for one quite important thing:
Assume all operations take either 2 or 3 cycles (logic ones 2, load/store
3). Within the first cycle, the program counter is increased (through the
ALU - no seperate adder for the pc). Naturally I need to fetch the opcode of
the next instruction within the last cycle... and here comes my problem: The
register that holds the opcode is written upon the rising edge of the clock,
while i need this new opcode right in the same cycle (the first cycle (pc =
pc+1) is the same for most operations, but not all, e.g. JMPs).
Now the rising edge of the clock writes the driver for the opcode register,
and my main control process has a
I'm not a pro in vhdl, just another student who has problems getting things
working like the teachers want to. We need to design a simple risc cpu,
without pipelining and all the fancy stuff, and actually I got everything
working quite nice so far, except for one quite important thing:
Assume all operations take either 2 or 3 cycles (logic ones 2, load/store
3). Within the first cycle, the program counter is increased (through the
ALU - no seperate adder for the pc). Naturally I need to fetch the opcode of
the next instruction within the last cycle... and here comes my problem: The
register that holds the opcode is written upon the rising edge of the clock,
while i need this new opcode right in the same cycle (the first cycle (pc =
pc+1) is the same for most operations, but not all, e.g. JMPs).
Now the rising edge of the clock writes the driver for the opcode register,
and my main control process has a