Discussion:
Homework, 5.11
(too old to reply)
TNKS
2005-10-04 02:02:41 UTC
Permalink
Hi all,

I'm reviewing my homework solutions and two things about the problem
statement of 5.11 (the one about implementing l_inc) are bugging me.

1) I feel pretty sure that the $rs's and the $rt's in the problem
statement are reversed and do not correctly reflect the instruction
fields that are really employed by the instruction.

2) Does it make sense to add 1? Wouldn't it make more sense to add 4?
lw uses a byte-offset, and since we've loaded a word's worth of data,
shouldn't we increment to just past the last read byte?

I looked on the errata sheet, but I didn't find anything about this.
Anyway. . . just wondering if anyone had any different thoughts about
this. If it's really an error, maybe it's worth sending the authors a
note. Otherwise, I wouldn't mind if someone let me know that I'm wrong
about something.

- Sukant
--
/************************************************
* P.S. - THE E-MAIL ADDRESS I PROVIDE IS BOGUS *
* TO PROTECT ME FROM SPAMMERS. PLEASE *
* JUST POST BACK TO THE GROUP. *
************************************************/
...
2005-10-04 04:47:09 UTC
Permalink
Post by TNKS
1) I feel pretty sure that the $rs's and the $rt's in the problem
statement are reversed and do not correctly reflect the instruction
fields that are really employed by the instruction.
Yeah, I just assumed this was wrong. Rewiring the datapath to support
the opposite registers would be a big pain, but not impossible (and so
not related to 5.12).
Post by TNKS
2) Does it make sense to add 1? Wouldn't it make more sense to add 4?
lw uses a byte-offset, and since we've loaded a word's worth of data,
shouldn't we increment to just past the last read byte?
I missed that one; probably saw L($rt) as a multiply, not an addition. 4
makes more sense to me.
David Grohmann
2005-10-04 13:53:59 UTC
Permalink
this book is so horrible, I think they forgot to hre an editor.

I agree with your interpretation.

I'm lost as to how to change the datapath and control signals though to
implement this, oh well.


______________

David Grohmann
Post by TNKS
Hi all,
I'm reviewing my homework solutions and two things about the problem
statement of 5.11 (the one about implementing l_inc) are bugging me.
1) I feel pretty sure that the $rs's and the $rt's in the problem
statement are reversed and do not correctly reflect the instruction
fields that are really employed by the instruction.
2) Does it make sense to add 1? Wouldn't it make more sense to add 4?
lw uses a byte-offset, and since we've loaded a word's worth of data,
shouldn't we increment to just past the last read byte?
I looked on the errata sheet, but I didn't find anything about this.
Anyway. . . just wondering if anyone had any different thoughts about
this. If it's really an error, maybe it's worth sending the authors a
note. Otherwise, I wouldn't mind if someone let me know that I'm wrong
about something.
- Sukant
Continue reading on narkive:
Loading...