Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Project Part- Branches

12 views
Skip to first unread message

Bojan

unread,
Mar 15, 2012, 8:46:35 PM3/15/12
to
For the branch instructions the operation specifies (PC <= (rd==rs) ? PC + 2 + offset : PC

Why is it the PC + 2 + offset?

SPk

unread,
Mar 16, 2012, 5:21:12 PM3/16/12
to
PC+2 will take you to the next instruction as we have an 8-bit offset
following the instruction.

z2long

unread,
Mar 20, 2012, 11:16:43 PM3/20/12
to
Haven't the PC already incremented by 1 in the default IF in w450.v, in
which case branches should use PC + 1 for the skipping the offset? Or is
the + 1 in IF disregarded?

Also, either case, I think the PC for not-taken should be PC + 2 or PC +
1 rather than PC?
0 new messages