On 3/19/07, Petter Urkedal <[EMAIL PROTECTED]> wrote:
On 2007-03-18, Timothy Normand Miller wrote:
> Yes, unfortunately. Also, we make a convention out of registering
> outputs (consistent with the way that these RAMs work), so we have to
> figure out how to do all our math from inputs inward.
So, if I understand this correctly, looking at your previous sketch, the
branch computation should be move from stage 2 (decode_wb) to stage 1
(fetch):
// Compute branch
assign branch_addr = indirect_branch ? data_a : ins_out[...];
assign do_branch = unconditional_branch || (branch && somefunc(data_b));
I think that can be done by passing data_a and data_b as input instead
of passing branch_addr and do_branch.
I'd have to draw out a timing diagram (can't seem to do this in my
head), but that's the right idea.
Now, maybe I don't know how exactly over building blocks looks like, but
what strikes me is that in the spirit of minimising the hardware, we
let register 1 always be the output of the ALU, and register 2 always
the output of the memory stage. If the registers in the register file
is compatible with our stage output registers, then that should
eliminate the extra muxing, and we still have 29 registers left.
I THINK I see what you're suggesting. Since the pipeline is totally
deterministic, we know at compile time exactly where a result is going
to be, so we could alias certain register numbers to refer to those
pipeline slots.
However, if we ever want to allow interrupts or anything else that
would alter pipeline flow, we can't do this.
I think your registered-output convention makes sense!
I can't take credit. When you read tutorials on things like "how to
get good performance out of your Xilinx chip" or other chip design
such things, they're always suggesting that you register all outputs.
Alternatively, you can register all inputs, but it's a less common
convention. Either way, the idea is to have a convention as to where
you put your combinatorial logic and where you put your registers.
--
Timothy Normand Miller
http://www.cse.ohio-state.edu/~millerti
Favorite book: The Design of Everyday Things, Donald A. Norman, ISBN
0-465-06710-7
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)