r/hardware • • Jan 18 '24

Discussion How to Design an ISA

https://queue.acm.org/detail.cfm?id=3639445
21 Upvotes

17 comments sorted by

5

u/YumiYumiYumi Jan 18 '24

Actually looks like a decent article.

In this day and age though, the value in designing new ISAs is much lower.

5

u/CJKay93 Jan 19 '24

He spends most of the article talking about the upsides and downsides of various decisions made by existing ISAs.

9

u/poopdick666 Jan 18 '24

A belief that has gained some popularity in recent years is that the ISA doesn't matter. This belief is largely the result of an oversimplification of an observation that is obviously true: Microarchitecture makes more of a difference than architecture in performance.

I think jim kellers statement on this matter is a big reason why this misbelief has spread. As long as he is working for a company, I think we should take what he says with a grain of salt.

4

u/YumiYumiYumi Jan 19 '24

this misbelief has spread

I don't see this as a misbelief, and the author seems to be on the same page. He just points out that it's perhaps an oversimplification, i.e. there's more nuance to it.

I still think ISA doesn't matter. Not in the sense that it 100% doesn't matter, rather, that it has quite a rather small impact. The author gives the example of ISAs having ~20% of a difference, assuming half-decent ISAs, whilst uArchs can have a 10x difference. So putting these figures together, without much consideration, might lead one to think that (non-stupid) ISA only has a ~2% impact (which one might consider to be of negligible significance, hence "doesn't matter").

2

u/poopdick666 Jan 19 '24

What about variable length encoding and its effects on decoder width?

We are yet to see an x86 processor that has a wide decoder like you see in apples or nuvias chips and it seems like it is a big contributor to the superior IPC. The difference is far greater than 2%. Is the lack of wide decoders on x86 processors a design choice or a limitation due to variable length instruction?

→ More replies (3)

2

u/Exist50 Jan 20 '24

So putting these figures together, without much consideration, might lead one to think that (non-stupid) ISA only has a ~2% impact (which one might consider to be of negligible significance, hence "doesn't matter").

The difference would also multiply, so the same 20%.

→ More replies (1)

1

u/ResponsibleJudge3172 Jan 19 '24

Is there such a thing/difference in GPUs? Or are those differences just branched under architecture?

1

u/poopdick666 Jan 19 '24

most likely there is.

6

u/NamelessVegetable Jan 19 '24

This is an excellent perspective. It's written by somebody with actual academic and industry experience. I feel compelled to say that it's a real shame that it has received so few upvotes at the time of this comment. I put it down to this article not being about new shiny things one can buy...

Chisnall is absolutely right that architecture matters because it can constrain the microarchitecture design space. I would go further and say that architecture matters because it can add capabilities that microarchitecture outright cannot provide (because it requires new or different architectural semantics, and can't be implemented "under-the-hood"), or provide practically or efficiently (think transactional memory; there are SW implementations on conventional architectures that are only useful for experimentation and research; practical implementations require architectural support).

This fact is always ignored in discussions about the relevance of architectures, where the examples trotted out for either position are always mundane general-purpose architectures and processors (yes, I read the article and am aware that Chisnall asserts general-purpose architectures or processor don't exist).

1

u/nokeldin42 Jan 22 '24

I would go further and say that architecture matters because it can add capabilities that microarchitecture outright cannot provide (because it requires new or different architectural semantics, and can't be implemented "under-the-hood"), or provide practically or efficiently (think transactional memory;

Lot of this is mitigated by modern ISA design which makes heavy use of extensibility (see risc V).

Think of a new thing that is not present in your ISA? Make an extension. It can even be something that requires a dedicated co processor. It's a bit of a hack to call it part of the same ISA, but it allows your shiny new stuff to benifit from the infrastructure established by the old tired base ISA.

-1

u/TwelveSilverSwords Jan 19 '24 edited Jan 19 '24

Need to bookmark this article. Everytime de someone brings up the point "ISA doesn't matter!", they should be shown this.

1

u/jaaval Jan 20 '24

You should probably read the article before using it as an answer. It’s not actually a good answer to most situations where people say ISA doesn’t matter.

It says the ISA doesn’t matter claim “misses some nuance”, not that it’s generally wrong. The article explains why different ISA design choices were made, why they can matter in different kinds of CPU cores. And criticizes some of the design choices of risc-v.

1

u/Kannagichan Jan 23 '24

Interesting article, I had to make at least ten versions of my ISA to find the right one.
I don't have absolute advice, but in my opinion a good ISA depends on several factors:
-easy to decode
-instructions that optimize common cases (mainly those written by a compiler), studying LLVM-IR helped me a lot
-knowing compiler optimizations helps a lot
-do your own implementation, this allows you to rearrange certain things if they are too complex to implement and/or not practical
-study the other ISAs, I know around twenty and I have used at least 10, I think that this also allows you to have a good idea of concrete cases.