The RISC-V Reader

I must have missed a Tweet, I just discovered this book existed. Has anybody read it yet? It looks like it’ll be a very useful reference to have on hand.

I got it as soon as it was available and read it cover to cover (something I rarely have the
luxury to, but this was short and easy).

I’ve been involved with RISC-V since before it was public, but I very much enjoyed
reviewing it all and reading the discussions.

Beware there is a minor (obvious) typo in the example on page 23 in the inner-for loop. The “…; j-) {” is missing a “-”.

Other points I noted:

  • insertion_sort: gcc should, but can’t (even gcc 7) eliminate the redundant index calculation.
    FWIW, RISC-V looks even better if you use a sentinel and pointers, leading to this
    inner loop:

    sw a4,0(a5)
    add a5,a5,-4
    lw a4,-4(a5)
    bgt a4,a3,.L4

  • RVC is great, but the cost is not just the 400 gate expansion, but also the complexity
    incurred by allowing 32-bit instructions to span two cache lines (or even pages)!

  • The jalr instruction on page 152 doesn’t say anything about stripping the LSB
    whereas it does on page 101 in the bottom sidebar.

1 Like

I hesitated to post this, because I do not want to be negative, and most readers here are probably not affected anyway. Nevertheless, I decided to post for those readers who, like me, are not yet very deep into ISA material. When ordering from Amazon I was expecting:

The RISC-V Reader is a concise introduction and reference for embedded systems programmers, students, and the curious to a modern, popular, open architecture. RISC-V spans from the cheapest 32-bit embedded microcontroller to the fastest 64-bit cloud computer. The text shows how RISC-V followed the good ideas of past architectures while avoiding their mistake.

Highlights include:

Introduces the RISC-V instruction set in only 100 pages, including 75 figures

When I reached page xiii, I felt like the victim of a sucker punch after reading

This book assumes readers have seen at least one instruction set beforehand. If not, you might want to browse our related introductory architecture book based on RISC-V: Computer Organization and Design RISC-V Edition: The Hardware Software Interface.

That book has 721 pages, and I wonder if, after reading it, I will have any need for “The RISC-V Reader”.

1 Like

You might well be correct that after reading the brand new RISC-V version of “Computer Organization and Design: The Hardware Software Interface” you might not need the RISC-V Reader.

It’s perhaps more accurate to say that the RISC-V Reader would be useful after reading the 20 year old (1st edition published in 1997) MIPS version of the book. That should be pretty easy to find in libraries.

I’d also suggest any of the late 1970s/early 1980s books by Rodnay Zaks or Lance Leventhal on programming the 8080/Z80/6800/6502/6809.

The pain of programming any of those (except possibly the 6809) sure makes you appreciate more modern designs such as RISC-V!


Thanks for the feedback, everyone. I’ll place an order.

[quote=“tommythorn, post:2, topic:821”]I’ve been involved with RISC-V since before it was public, but I very much enjoyed
reviewing it all and reading the discussions[/quote]


I certainly didn’t read your post as such, but interpreted it as qualifying the intended audience.

I’ve skimmed through that one and I’ve held off from buying the RISC-V edition, waiting for a book more like this which is directed at learning the ISA itself, rather than using the ISA as a tool to learn computer architecture.

"Men were real men, women were real women and small furry creatures from Alpha Centauri were real small furry creatures from Alpha Centauri.”

There’s truth to that, mind. In my formative years I learned far more about actual fundamentals from my Acorn Electron than I did the PC my parents later invested in. The latter could play Civilization though. :slight_smile:

1 Like

My copy arrived yesterday and I’m about halfway through. Good read so far, but definitely not a standalone book. There have been quite a few places where I’ve had to stop and Google something, either because I needed a refresher or simply didn’t know something. Often those are parts where an explicit comparison to x86 is made which I don’t know so, ironically, it’s teaching me something x86 along the way (e.g., enter and leave for stack frames). :wink:

I don’t think compilers even generate those instructions any more … sloooow.

You could read instead VAX “CALLS” and “RET” if you prefer…

1 Like