Hacker News new | past | comments | ask | show | jobs | submit login
Open-source high-performance RISC-V processor (github.com/openxiangshan)
262 points by burakemir on March 26, 2023 | hide | past | favorite | 109 comments



The license in case anyone was wondering: https://spdx.org/licenses/MulanPSL-2.0.html Seems BSD-ish and it is approved by OSI: https://opensource.org/license/mulanpsl-2-0/


Another very high performance effort is VRoom![0].

As of the latest update in the blog, they are at 10.3 DMips/MHz.

0. https://moonbaseotago.github.io/


The practically live blogging of this VRoom! core is such a glorious thing to behold.

Amazing work. And it's talked about!! We can see learn & follow that. One of the most unique singular experiences in the modern world, creating a high performance core, and we can read about it, see the process unfold, see the team iterate. Gobsmackingly amazing.


>they are at 10.3 DMips/MHz

I understand Dhrystone isn't everything, but that's pretty impressive, and up there with high performance CPUs from the established players.


'Isn't everything' is a huge understatement. It's a performance nice smoke test for a CPU in that if it isn't hitting the numbers you'd expect given the microarchitecture (issue width etc) you know there's a problem and due to the simplicity of the benchmark it shouldn't be hard to analyse and track down.

Though there's way more a modern high performance CPU needs to do. It doesn't do anything meaningful to stress the memory system for instance. Hitting good Drystone numbers is stage 1 in a long process to building a modern high performance CPU.


That's fair. Perhaps "is only an imperfect early indicator" would have been better than "isn't everything".


As I understand that is performance in a simulator, and it is unknown what delays are going to be between pipeline stages on real hardware.


Performance in a simulator is cycle accurate to the real world.


"delays" affect the MHz, not the performance per MHz. Tools for predicting MHz are fairly accurate.

Also, VROOM works in FPGA not only in verilator.


Does anybody have a list of DMips/MHz per CPU results, for comparison?


China already surpassed US economy according to some studies. And it was at 1/100 of US economy tens of years ago.

Part of this rise to power is due to US companies investing there, buying and giving know-how in the process, but the huge part is they've built some of the world best learning systems, the state is massively investing in education, they invest more than any other country in research. And, perhaps one of the biggest factors, unthinkable in the West, is that Chinese economic entities are cooperating instead of being secretive. If one Chinese company will develop something, you can bet the rest will learn that fast and will use it in the next economic cycle. In China all knowledge is in fact a big open source scheme. Every new startup can benefit from the know how, experience and research done by others. This accelerates accomplishments like crazy.

So, to recap: CCP makes good plans for very large time scales, they have one of best education systems, they try to educate as much people as possible, they invest heavily in research, companies are more likely to cooperate instead of competing, knowledge is shared.

It's a perfect recipe for success. And I just wonder why other countries can't apply the same recipe.


Yeah no. The education system you’re referring to is optimized strictly for performance on standardized tests. From a very early age kids are trained to answer test questions, not to understand those questions or how to apply them in real life. It has been this way in China for thousands of years; their civil service exams were the only way to move ahead of your station in life without connections.

Innovating is not done in polite company in China. If you come up with a clever new way of doing something, there is an extremely high possibility that your superiors will suppress it on the off chance that it could embarrass them (“lose face“).

These big long term plans you’re referring to exist, but in the plane of reality you imagine. There is nothing like a meritocracy in the CCP. That is even more true now than 10 years ago, because Xi has systematically removed dissenting voices in what you have heard is an anti-corruption campaign. Companies like Blackrock and Boeing are breathtakingly corrupt and are taking us taxpayers for a huge ride. But they can usually do a pretty competent job of getting the job done. They are run by technocrats, who often have an engineering background.

Imagine if the top 10 levels or so of any of these companies were nothing but connected people and their friends and children. That’s what happens to all of these projects in China. China can’t build a 5m chip or a new type of wing or a useful new programming language. Most of the people who could even do that job are either out of the country or unable to be recognized for their work.


> China can't build a 5 nm chip or a new type of wing or a useful new programming language.

You are saying this in a reply to the post to open source RTL of high performance CPU from China?

China also can demonstrably build a competitive distributed database like TiDB. I think PL vs DB boils down to that it is hard to create a profitable business building PL, compared to a profitable business building DB.


Have you lived in China? Or worked for a Chinese company? Have you spoken to Chinese engineers about how they work?

I'm asking because your comment reads like culture essentialist bullshit that doesn't match my experience.


Vast majority of my family is Chinese nationals, many of them software engineers, EEs, mathematicians. Have done extensive business in China, mostly real estate. Not getting into any more detail publicly.

I don't know what "culture essentialist" means, sorry. And it's good to hear your experience is unusual. I'm quite surprised. But the simple fact is conformity is treasured in China, and has been for untold generations.


We are doing well then by abandoning SAT. Fruits soon to be ripped.

https://www.npr.org/2023/03/26/1164832694/to-help-new-studen...


I think you are extrapolating from to few cases to something that is way broad.

How do you know China is successful because if its investing in education and research. Maybe it was investment in housing. Or transportation. Or whatever. Economists do not agree on the relative importance in those things.

> they invest more than any other country in research

Is that true in per-captia terms, because I don't think so.

> If one Chinese company will develop something, you can bet the rest will learn that fast

This is like cooperating companies here. They might talk a big game but we all no that there is a huge amount of internal infighting.

The same kind of things were said about the Soviet Union. "Oh look at the cooperation" but when we actually got the documents, what it showed was bitter infighting.

So I would be careful with claims that all these companies are just perfectly willing to share all their technology even if you assume the all belong to CPP memebers.

> In China all knowledge is in fact a big open source scheme.

That sound like you are projecting. I have seen no evidence that this is the case.

Maybe China isn't that special. Maybe its just late to the party and is really fucking damn big with a huge amounts of people and resources. Once the US was reasonably poor and then it grew as fast as anybody ever had in history, and it didn't have massive state driven education and industrial policy and yet by the 1910s it was matching Britain and Germany in many things.

Before that Britain was matched an partly overtaken by Germany. And it looked like Germany was magic because its companies were organized by the state in corporatism fashion. Yes they also invested in education, infrastructure and research. But its not a magic pill and the companies in Germany were just as competitive against each other as those in Britain.


> In China all knowledge is in fact a big open source scheme.

This is not strictly true. Witness anyone trying to get a Chinese company to produce GPL source code or contribute back. Open source is something to be taken for free and we don't need to worry about silly obligations, moral or otherwise.

I think a more accurate statement is "patents and copyrights do not functionally exist in China" so open source is synonymous with "public domain". Some try to protect their work through encryption or DRM, to give them a head start on the clones that will inevitably follow but that's not the same thing at all.


The US has always made up for it's poor planning and educational system by accepting immigrants. SV is full of immigrants. By limiting immigrants, the US is limiting it's best advantage.

It is not like Washington is going to stop fighting culture wars and stabbing each other in the back.


That’s complete historical revisionism. Historically, america took in the poorest and least educated immigrants. There was a major influx of highly educated German immigrants during World War II, but the modern system of skilled immigration through H1B didn’t exist until 1990.


immigrants which mostly arrived BEFORE 1990... I don't actually see contradictions between your comment and the parent you're replying to.


The parent comment said that america always made up for its poor educational system by accepting immigrants, and then used SV as an example. But having educated immigrants is a relatively recent phenomenon. Nearly all immigrants before H1B were refugees or poor and poorly educated.

You’d be surprised how relatively recently most of the skilled immigrant groups have been in the US. In 1990 there were 781,000 Indian Americans. Today there are 2,800,000. The non-Hispanic white population grew 8% over that time (and birth rates aren’t any higher among Indian Americans). The other 1.95 million or so are immigrants and their kids who came here after 1990.


> If one Chinese company will develop something, you can bet the rest will learn that fast and will use it in the next economic cycle.

Where exactly is an incentive for a Chinese private company to share its knowledge with other private or state companies?


>they have one of best education systems, they try to educate as much people as possible

"Approximately 500 million people in China, or 70% of the labor force, do not have a high school education. By this metric, China is the least educated middle-income economy in the world"

https://sccei.fsi.stanford.edu/china-briefs/invisible-china-...

from standford 2021


> It's a perfect recipe for success. And I just wonder why other countries can't apply the same recipe.

Because in capitalistic market economies you need to compete. This is a law of nature! Or something like that… /s

I would indeed like to see how this works in reality on side in China. But China has one big issue: Its written language. This is something that makes me really fear the idea to go there. If they would just manage to finally switch to some proper writing system, so even dumb boys like me could learn it, I would invest some time and try to learn the language. But as long as you need to memorize thousands of signs (and can't even use a dictionary…) this is really off-putting. I'm dyslexic and have already problems to write correctly in my mother tongue (German), and had a very hard time to learn English. The second most useful language to put effort in would be Chinese, sure. But this writing system, oh boy…

The Chines are smart and have a powerful government. Why can't they make this Pinyin finally happen? It would make learning reading and writing likely even easier for the still illiterate people on the Chines country side. (And no, I don't buy the argument that you need the signs to distinguish meaning for things that sound alike. The spoken language has no signs and it still works fine. And the whole language is anyway very context depended, so you need to think about the meanings of words or phrases quite precisely anyway.)


Well I was formally diagnosed with dislexia and ADHD, which is worse. I can tell you what I did. I worked hard, read a lot, taught myself to finish projects. And I did lots of accomplishments and way more than my peers without ADHD.


Why convert to Pinyin? Simplified Chinese is about 80% more efficient. How would you like to see every piece of English take up 400% more space?

The more I think about your comment the more I suspect you’re trolling, though. Good work!


No, I'm not trolling. This is honestly me true opinion.

And no, I don't believe in the "more efficient" argument. I was told that before, and I've played with quite some translations, and came to the conclusion that written Chinese isn't "more efficient" than say English or German. It's maybe ~20% to max. ~25% more concise. That's not a big win.

In the end that's not even surprising to me. To get some amount of information over you need some encoding that can be processed and understood by human brains, and I guess there is more or less some kind of natural limit to how "compressed" information can be before it gets incomprehensible for the average human. If you compare translations of longer texts in different languages and writing systems you will notice that all of them are more or less the same in length. Some are a little bit longer, some are a little bit shorter, but all in all it's the same magnitude. It's not like the same content can be expressed in one language a few times more concise than in another.

-- A quick test with the help of deepl.com | Chinese translation --

不,我不是在开玩笑。这确实是我的真实想法。

不,我不相信 "更有效 "的说法。我以前被告知,我已经玩了很多翻译,得出的结论是,中文书写并不比英语或德语 "更有效"。它可能比英语或德语 "更有效",最多也就20%。~这不是一个大的胜利。这并不是一个大的胜利。

最后,这对我来说甚至都不令人惊讶。为了获得一定数量的信息,你需要一些可以被人类大脑处理和理解的编码,我想在普通人无法理解之前,信息的 "压缩 "程度或多或少有一些自然限制。如果你比较不同语言和书写系统中较长文本的翻译,你会发现所有这些文本的长度或多或少都是一样的。有的长一点,有的短一点,但总的来说都是一样的幅度。这并不是说同样的内容在一种语言中可以比另一种语言表达得更简洁几倍。

-- German translation | by deepl.com as I'm lazy --

Nein, ich scherze nicht. Dies ist ehrlich meine wahre Meinung.

Und nein, ich glaube nicht an das Argument "effizienter". Das hat man mir schon mal gesagt, und ich habe mit einigen Übersetzungen gespielt und bin zu dem Schluss gekommen, dass Chinesisch nicht "effizienter" ist als etwa Englisch oder Deutsch. Es ist vielleicht ~20% bis maximal. ~25% prägnanter. Das ist kein großer Gewinn.

Letztendlich ist das für mich nicht einmal überraschend. Um eine gewisse Menge an Informationen zu erhalten, braucht man eine Kodierung, die von menschlichen Gehirnen verarbeitet und verstanden werden kann, und ich schätze, es gibt mehr oder weniger eine Art natürliche Grenze dafür, wie "komprimiert" Informationen sein können, bevor sie für den Durchschnittsmenschen unverständlich werden. Wenn Sie Übersetzungen längerer Texte in verschiedenen Sprachen und Schriftsystemen vergleichen, werden Sie feststellen, dass sie alle mehr oder weniger gleich lang sind. Manche sind etwas länger, manche etwas kürzer, aber alles in allem sind sie gleich lang. Es ist nicht so, dass derselbe Inhalt in einer Sprache ein paar Mal prägnanter ausgedrückt werden kann als in einer anderen.

-- Korean translation by deepl.com | just to try out some other "compact" signs --

아니요, 트롤링이 아닙니다. 이것은 솔직히 제 진심입니다.

그리고 저는 "더 효율적"이라는 주장을 믿지 않습니다. 저도 그런 말을 들은 적이 있고, 꽤 많은 번역을 해본 결과 중국어 문장이 영어나 독일어보다 '더 효율적'이지 않다는 결론에 도달했습니다. 적게는 20%에서 최대. 최대 ~25% 더 간결합니다. 이는 큰 이득이 아닙니다.

결국 그다지 놀랍지도 않습니다. 어느 정도의 정보를 전달하려면 인간의 두뇌가 처리하고 이해할 수 있는 인코딩이 필요하며, 일반인이 이해할 수 없을 정도로 정보를 '압축'하는 데에는 어느 정도 자연적인 한계가 있다고 생각합니다. 다른 언어와 문자 체계로 된 긴 텍스트의 번역본을 비교해 보면 모든 번역본의 길이가 거의 같다는 것을 알 수 있습니다. 어떤 것은 조금 더 길고 어떤 것은 조금 더 짧지만 대체로 같은 크기입니다. 같은 내용을 한 언어가 다른 언어보다 몇 배 더 간결하게 표현할 수 있는 것은 아닙니다.

-- Russian translation by deepl.com | trying out some alternative western script in a different language family --

Нет, я не троллю. Это мое искреннее мнение.

И нет, я не верю в аргумент "эффективнее". Мне говорили это раньше, и я играл с некоторыми переводами, и пришел к выводу, что китайский язык не "более эффективен", чем, скажем, английский или немецкий. Он, может быть, на ~20% максимум. ~25% более лаконично. Это не большая победа.

В конце концов, меня это даже не удивляет. Для того чтобы передать какое-то количество информации, вам нужна кодировка, которая может быть обработана и понята человеческим мозгом, и я полагаю, что существует более или менее естественный предел того, насколько "сжатой" может быть информация, прежде чем она станет непонятной для среднего человека. Если вы сравните переводы длинных текстов на разные языки и системы письма, вы заметите, что все они примерно одинаковы по длине. Некоторые немного длиннее, некоторые немного короче, но в целом это одна и та же величина. Не то чтобы одно и то же содержание можно было выразить на одном языке в несколько раз лаконичнее, чем на другом.

-- Japanese translation by deepl.com | another eastern language with sings --

いや、荒らしているわけではありません。これは正直に私の本当の意見です。

そして、私は「より効率的な」議論を信じていません。以前、そのように言われたことがありますが、私はかなりの数の翻訳で遊んでみて、中国語の文章は英語やドイツ語よりも「効率的」ではない、という結論に達しました。20%から最大で25%程度です。~25%程度です。それは大きな勝利ではありません。

結局のところ、それは私にとって驚くべきことでもないのです。ある程度の情報量を得るには、人間の脳が処理し理解できるエンコーディングが必要で、平均的な人間にとって理解不能になる前に情報を「圧縮」できる自然な限界というものが多かれ少なかれあるのでしょう。異なる言語や文字体系で書かれた長い文章の翻訳を比較すると、どの文章も多かれ少なかれ同じ長さであることに気づきます。少し長いものもあれば、少し短いものもありますが、全体として同じ大きさなのです。同じ内容でも、ある言語では別の言語より数倍簡潔に表現できるわけではないのです。

----

My conclusion: Yes, Chinese is the most compact one. But like I've said, it's the typical ~25% less, so not a big difference. To my surprise Japanese is almost as "chatty" as German. (But OK, their writing system—or better said their three mixed writing systems—is even more crazy than Chinese, which is at least somehow consequent, even that's historically not true). It's also interesting to see that Korean seems to strive a very good balance. It's quite concise, but the writing system is much much simpler than the Chinese or Japanese one.

The other thing is how long it would take to read the text aloud in all the different languages. Chinese is quite concise when written, yes, but it's actually not when spoken out. Reading even a few signs aloud takes some time…


Honestly learning mandarin is not as difficult as you might think. There's a lot of structure and rules that allow you to "memorize thousands of signs".

Of course it requires work, it's a language that's very different from English.

Also, the ROI (in terms of new potential conversation partners) is probably larger for mandarin than for any other language just because of its sheer size and non-overlap with English speakers.


The person you're responding to already mentioned variations in pronunciation. There's also the problem of homophones. Then there's the even bigger problem of reading speed. You can comprehend a lot at a glance with characters, which you can't do with pinyin due to homophones. And the biggest problem is losing access to existing literature. While the 繁体/简体 gap can be easily overcome, at least for reading, the character pinyin gap is pretty much impossible to bridge.


--Japanese translation by deepl.com modified by me.--

いいえ。トロールではありません。本当の意見です。

24 characters compared to 35 in translation posted above. I think it is a better translation but not because of the written language. I think it is more idiomatic of how a native person would speak, though I am not a native speaker and others more knowledgeable may disagree.

My point is that you should not judge from the alphabet or dictionary how concise a language is. And you certainly should not go off a saas translation (although I think deepl is very good).

Now back to the topic of high performance CPUs...


Sorry, I guess I misunderstood your idea. I meant Simplified Chinese is more compact than Pinyin.


Sure it is! But Pinyin is more or less what you need to spell out, and there you can see that Chinese is actually not a very "compact" language. But it makes no big difference at all, imho. Human languages seem to have a more or less common "information density".

My point is: I would really like to learn the language. But the writing system is just off-putting.

This is imho an unnecessary high barrier to entry. OTOH I can understand why it isn't an issue for China. They don't "need" any foreigners. They have enough people.


oh no! you're going to have to scroll!

it's not like you need more materials of any sort to deal with a 400% increase in the space occupied by text


Hanzi is necessary because there are many regional dialects with significantly different pronunciation (and thus different pinyin, or even none), but mostly the same spelling.

It takes a while to learn for sure, but it's not that hard. The relationship between the written and spoken language isn't that much worse than in English. And at least the grammar is trivial.


Some people might be interested in Ocelot:

https://github.com/tenstorrent/riscv-ocelot

Its basically the evolved BOOM Core from Berkley but with a full RISC-V Vector Unit attached.

I had really hoped more people put more investment in BOOM.


by boom core, do you mean the latest “sonic boom”?


Yes, I'm not aware of anything after that:

https://carrv.github.io/2020/papers/CARRV2020_paper_15_Zhao....


That remark was something like ChatGPT would have told ;)


Professor Bao of the OpenXiangShan team is known for his outspokenness, particularly in advocating for the academic model of the RISELab at UC Berkeley, which he often refers to as "Open Source Heavy Industry". As a result, he is a strong proponent of the OpenXiangShan project, as he firmly believes that it is the ideal means of producing high-quality research.


All research in China is publicly shared. And while it is encouraged by the CCP is not demanded by law. It's a cultural fact and any entity in China can learn about R&D done by any entity, no matter if state owned or public owned, provided it is not classified as a secret.

Taking this precept down, they don't care about IP. If one Chinese company makes a product, in a few weeks you can find lots of different Chinese companies selling the same product on Aliexpress. Some of better quality, some cheaper, some with added functionality some with less functionality.

If you are to give your hardware design to a Chinese company and order a heavy lot you might have a good deal. But if your product is kind of successful, you shouldn't wonder if you see a lot of alternatives offered on Aliexpress by seemingly increasing unknown companies for a good rebate.


I'm more interested that they also developed an agile methodology for Hardware development here https://github.com/OpenXiangShan/XiangShan-doc/blob/main/pub... .


I'm squinting a lot to draw a net conclusion, but clearly a massive focus on testing & simulators.

They notably seem to be validating & simulating C/C++ targets for a lot of this.

They have a great breakdown of the tools they've used & build. Chisel, out of Berkeley, lies at the heart of almost everything. But they have reams of new tools they've madd. There's over a dozen simulators or tester pieces they said they've made. Which is epic, and makes total sense.

Great paper thanks for sharing. I quickly scanned their gitbub repos. A lot of these tools probably arent iterated on as much & I just haven't got to them yet. The paper claims the overarching development structure is embodied on a tool MinJie, which the paper says is open source. Fantastic, fingers crossed 50%+ of the tooling here is available.

I also feel like the US's OpenROAD deserves some shout out as related, relying on extremely good design checking/validators to be so agile at chipmaking that ML can spit out designs en mass & then we can run loss checks to find out how working the various designs are. Millions of monkeys on typewriters style ultra agile.


If China manages to reduce its dependency of US based tech like CPUs, I wonder how this will affect the two economies.

Would it be a viable idea to buy shares in China based tech companies now? The thinking is that if CCP pushes something real hard by investing large amounts of resources in it, the chances are higher that they will succeed. Not tomorrow but in 10 or 20 years. Conversely, if US based tech companies will have competition, it is likely that their value will go down a bit at one point.

Also, it's possible that if China builds domestic silicon tech we will see a race to the bottom if they will want to aggressively price their products and try to undercut their competitors. Then it might be a bad idea to own any shares in tech companies, no matter where they are located.


Competition is good, if the US and China end up competing to make more interesting CPUs, everybody wins. We’re wasting a lot of good brains in the US on ad companies and food delivery apps, a real competitor to focus our attention would be great, in my opinion.


I never looked at it in good/bad terms, but you are, probably, right.

I was more interested in terms of investment.


>Conversely, if US based tech companies will have competition, it is likely that their value will go down a bit at one point.

Keep thinking. If US tech firms don't have much competition right now, they are not incentived to innovate or improve their products. If they had more competition, they would need to put up or shut up, rather than reaping profits from money they might otherwise spend on R&D.

Personally, I think that if you put competitive pressure on a large and lazy incumbent, they will either increase in value or fold outright. (Or convince politicians to bail them out, write protectionist legislation, etc.)


Yes, US companies will have the incentive to innovate and better themselves. But my question is just about the material outcomes: how will the shares of US and China based companies be affected.


One more thing to consider: The new iron curtain, now called "sanctions".

My best guess currently would be that the US will try to outlaw the competing market should one arise: The US will just forbid its people and the people in the allied countries to make business with China, like they do with a lot of other countries, like Russia or Iran.

It's unlikely this would happen immediately as the US is currently still depended on China. But as the economic war intensives walling-off will happen at some point. There are already "sanctions" in place against Chinese companies in some market areas. This will likely only worsen over time.

You can still invest in China, sure. But you will be forced to move there at some point, or loss everything over there, I guess.


I think that the sanctions policy is terribly misguided, because they are basically trade protection in reverse. They may have some results in the short term, but in the long term they always backfire, unless when applied to terribly poor countries who are caught in a trap where they can't bootstrap their industry by themselves.


> The thinking is that if CCP pushes something real hard by investing large amounts of resources in it, the chances are higher that they will succeed. Not tomorrow but in 10 or 20 years.

China’s ASML is Years and Years Behind: https://www.youtube.com/watch?v=DtOyW-JpJjM

tl;dw - Nope. Can't just throw money at this problem.


28nm can cover the vast majority of chip production needs for the next 5-10 years. Most things don't need an advanced node.

By the time SMEE is hitting 5nm, processes for 3d will be mature. I wouldn't discount any of this at this point.


28nm with multi patterning can go to lower process node. SMIC has experience up to 7nm for that. I think early TSMC 7nm used DUV.


28nm is good for everything besides mobile, desktop and server which is a huge market.

I guess China will crack EUV in some time.


SMEE won't be making EUV, it has it's hands full of DUV.

Chinese Academy of Sciences will (a spinoff company for commercialization), they publish research papers on EUV and so on.

Multiple project are being developed in parallel.


Yes, I know. I didn't say SMEE will create EUV, I said China will. I don't think differentiation between various industrial arms of CCP is of importance.

Right now they've made bets on a large scale of different technologies. Many of them failed already. Probably they will focus on a few and succeed in a not very long time scale.


I agree, it is hubris and possibly racism that continues to discount Chinese grit and intelligence.


Just FYI the person giving the talk in my YouTube link is Chinese. Nor is the grit and intelligence of the knowledge workers that is being questioned.


To be clear, I wasn't accusing you of this, in general there is a broad sentiment going back all the way to the 80s that espoused a racist view that Asia could copy and produce but could not create. In middle school we were sold the vision that we would design products because of our superior creativity and intellect and people in Asia would make our products.


If a Chinese company isn't directly under US sanctions like Huawei is they can still use TSMC to fab chips.


It's important to also consider how much you trust the CCP to actually pay out your hypothetical shares, should they ever become worth anything. It's possible that they may just confiscate them (or outlaw foreigners from trading or something similar).


Are there precedents in which they didn't pay out?


There are examples where the CCP has materially reduced the stock price (e.g., by forbidding the company from making a profit) after it was marketed to western investors. And the typical ownership structure (VIEs) is incredibly fragile. As an individual I would not concentrate investment in Chinese companies due to CCP risk.

The SEC has this to say: https://www.sec.gov/corpfin/disclosure-considerations-china-...

> Current regulations in China limit or prohibit foreign investment in Chinese companies operating in certain industries. For example, there are restrictions on foreign ownership of telecommunications companies and prohibitions on ownership of educational institutions.[7] To circumvent these restrictions, many China-based Issuers form non-Chinese holding companies that enter into contractual arrangements, intended to mimic direct ownership, with Chinese operating companies. Through these contractual arrangements, the China-based Issuer is generally able to consolidate the Chinese operating company, commonly referred to as a variable interest entity or VIE, in its financial statements, although whether the China-based Issuer maintains legal control of the Chinese operating company is a matter of Chinese law. Under this structure, the Chinese operating company, in which the China-based Issuer cannot hold an equity interest, typically holds licenses and other assets that the China-based Issuer cannot hold directly.

> These China-based Issuer VIE structures pose risks to U.S. investors that are not present in other organizational structures. For example, exerting control through contractual arrangements may be less effective than direct equity ownership, and a company may incur substantial costs to enforce the terms of the arrangements, including those relating to the distribution of funds among the entities. Further, the Chinese government could determine that the agreements establishing the VIE structure do not comply with Chinese law and regulations, including those related to restrictions on foreign ownership, which could subject a China-based Issuer to penalties, revocation of business and operating licenses, or forfeiture of ownership interests.

> Legal claims, including federal securities law claims, against China-based Issuers, or their officers, directors, and gatekeepers, may be difficult or impossible for investors to pursue in U.S. courts. Even if an investor obtains a judgment in a U.S. court, the investor may be unable to enforce such judgment, particularly in the case of a China-based Issuer, where the related assets or persons are typically located outside of the United States and in jurisdictions that may not recognize or enforce U.S. judgments.

And of course, see Levine on the subject:

https://www.bloomberg.com/news/newsletters/2021-07-07/money-...

https://www.bloomberg.com/opinion/articles/2021-08-02/chines...


Even then, you can make some money by indirectly investing in China's tech infrastructure by buying shares in a company that will buy and use hardware made in China.


Has somebody compare-able DMips/Mhz numbers for:

* Intel i7-4600U CPU DMips/Mhz (I found about 10 DMips/Mhz)

* RISC-V VRoom = 10.3 DMips/MHz (still in development)

* RISC-V XiangShan = ?

* RISC-V others ?


Huge table here: https://en.wikipedia.org/wiki/Instructions_per_second

Best x86 and ARM are around there.


with out-of-order and branch predicting CPUs, those metrics are highly questionable.

Better "benchmark" real stuff: CPU bound AAA games, etc.


Most AAA games have not been ported to RISC-V yet.

But I bet pytorch has been, and also openCV and other compute-heavy stuff. (And Doom, of course.)


I'm guessing pytorch probably doesn't branch as much as a game.

One of the best "real" Benchmarks is compiling the Linux kernel, the issue is that on an emulator/verilog simulator that could take a very long time.


I also use this benchmark for a real world estimate. Here's some numbers. For the pretty ginormous Ubuntu kernel config for RISC-V, it's 7.5 hours on the HiFive Unmatched (at 1.5 GHz) versus 25 minutes cross compiled on a E5-1650 V4 Dell box.


1.5GHz, oooof... I guess they really need to catch up on the GHz front, not only the micro-architecture. Once they are in the 5GHz range, we will see how far the micro-architectures and compilers have to go.


5-6 GHz is a party trick of low core count CPUs (e.g. 4 or 8 cores) that use 250+ W of power to get less than twice the performance they can get at 25 W.

There is a sixty four core OoO RISC-V chip (SG2042) being demoed on a dev board in the last weeks. It runs at 2.0 GHz and has quite a bit of aggregate performance, at lower energy usage than an 8 core i9 running at 6 GHz.


AAA games want raw thread performance more than a huge core count.

I am afraid, but the GHz of RISC-V core for high performance desktop will have to go significantly higher.

That said, for self-hosted servers, and even some servers, RISC-V may already be ready for prime time.


There's nothing (other than loss of efficiency, which matters in these server-focused chips) in the way of higher clocks.


oh, and when I said compilers, that's for legacy code, since with a standard world-wide ISA, it is the start of the assembly era.


Tangential, but I'm intrigued to see Chisel having such success. Can anyone in the know comment on how it's doing and what impact it has in the hardware industry?


Interested in this as well. Also curious how it fares in comparison with BlueSpec and other technologies in this space (like HardCaml).


I understand SiFive uses it heavily.


Chisel usage rounds to zero in my estimation.


This is part of China's effort to have its own IC industry. The project is now owned by BOSC, Beijing Open Source Chip Research Instiutute[1]

[1] https://www.bosc.ac.cn/yjyjs


China has a very diverse mix of technology. They use x86, ARM, MIPS, RISC-V and others. I don't know if splitting the efforts in many different directions makes sense.


China is a huge country with a much bigger hardware industry than the US. Seems to me it's normal not everyone there is working with the same technology. It's just a massive number of different companies doing different things.

That being said, RISC-V is gaining a lot of traction. I wouldn't be surprised if it starts to become a real challenge to ARM in the next five years. You just need mature tooling and better cores. Probably also need a wider variety of smaller cores for embedded applications available at the right price points.


I had more luck understanding this by going to https://www.bosc.ac.cn/ and clicking on EN from there.

Open Source Chips to Benefit the World

There is no EN on any deeper, direct linked url. But once chosen from the top it sticks.


It's impressive how quickly they seem to have embraced open source.


You mean the “contributing” part of OSS?


Well, yes.

I was more talking about the government though, which isn't otherwise famous for it's love of openness. I'm not aware of any government currently promoting FOSS/FOSH as much as China's is.


Surely they understand there's no point in trying to keep it closed-source considering they're, well, China.


Was gonna flag this same thing. Maybe their hoping for help from the open source community?


I wonder, which instruction fusions are implemented, as it is key to high-performance RISC-V and the reason not to have conditional movs & alike in macro-ISA.

Unfortunately, documentation for Micro-ISA is in Chinese only :-(


Frankly, these days machine translation is more than enough to reproduce most technical documents at an acceptably high level of accuracy.

Fwiw, this is the relevant link: https://xiangshan-doc.readthedocs.io/zh_CN/latest/frontend/d...


Hmm, only strange combinations of arithmetic operations, no conditionals...


Why is that, that they are key to performance with RISC-V? And why are they the reason not to have conditional moves? Would love to know more!


Branches are very expensive in modern high-performance CPUs, even with good branch predictors (and good branch predictor is expensive too, in transistor budget and consumed power). Many short branches can be eliminated by using conditional instructions, cmov is one of them (most often used). RISC-V doesn't contain such instructions, and authors of ISA says, that it is not needed because it make small (not high-performance) implementations cheap (they don't need to implement complex conditional instructions), and big high-performance implementations can implement them via instruction fusing (recognize common patterns of short branches and replace with "internal" conditional moves and alike).


B extention does add have 'cmov' see:

https://raw.githubusercontent.com/riscv/riscv-bitmanip/maste...

If you do instruction fusion, you might be able to transform the typical pairs that would create a short branch and simply convert them into a cmov micro-instruction. That it does not make the branch predictor much more complex.


That's a draft, containing instructions under consideration for inclusion.

The ternary instructions didn't pass the test for utility vs cost and were not ratified.

For example `cmix` only replaces three other instructions, two of which can be done in parallel. Emulating `cmov` is slightly more expensive: generate an all-1s or all-0s mask from your condition (e.g. `slt mask,a,b; neg mask,mask` and then do a `cmix`.

Applications that want `cmov` for constant execution time for security reasons can cope with it using a couple of extra instructions. Applications that want `cmov` for average performance because the condition is unpredictable are mostly mistaken with modern branch prediction :-)

There is a fairly strong possibility that a pair of instructions might be added to put `cmov` emulation on the same footing as `cmix`:

    Rd = Rs2 ? Rs1 : 0
    Rd = Rs2 ? 0 : Rs1
These instructions only need two register inputs.


You are right, it was removed and is no longer in the newer spec:

https://wiki.riscv.org/display/HOME/Recently+Ratified+Extens...


>Would love to know more!

The specs themselves come with a lot of rationale for decisions taken.

But, as a starting point (from zero), I recommend the "RISC-V Reader" book, by the main authors of the ISA, as it makes a great introduction to the design of RISC-V.


Sad this is tainted by the current US-china conflict on chip manufacturing.

But there are good guys everywhere (and bad too), and anything pushing a world-wide royalty free modern ISA toward "real-life" usage does its part.

I hope one day I'll buy a AAA game, with a noscript/basic (x)html browser and play it on highly performant RISC-V CPU.

Don't forget, the bad guys hate simple but able to do a good enough job, stable in time standards.


> I hope one day I'll buy a AAA game, with a noscript/basic (x)html browser and play it on highly performant RISC-V CPU.

What a dream! I'd add the game would be open source; don't care about the art though.


are there any books to learn about advanced cpu design with dispatch queues, microop schedulers, etc. the most I could find would cover basics of CPU design, not advanced stuff.


Odd choice to do hardware design in scala...

I wasn't aware of any other big players doing this... I suspect it will limit the impact this project can have if industry can't adopt it easily into existing processes.


It's actually chisel. But github marks it as scala because chisel is based on scala.

Other HDL based on scala includes SpinalHDL.

These two HDL are pretty welcomed because of opensource and usability. You can find lots of projects in them. Notably rocket-chip, which is also in chisel. https://github.com/chipsalliance/rocket-chip

They're around for a while but still young and some people are pushing for adoption.


It is scala. Chisel is just a scala framework. Conceptually it's not quite an HDL but instead a scala program that metaprograms the actual RTL netlist. So there's no chisel compiler other than the standard scala one that comes with sbt; you then run the resulting chisel program on your computer to generate the netlist.


This is not strictly true anymore as the low-level (FIRRTL) compilation is powered by CIRCT (http://GitHub.com/llvm/circt) which is built using MLIR (part of the LLVM project: https://GitHub.com/llvm/llvm-project)


It's scala + a DSL called "chisel" that you write by chaining scala keywords and symbols in the right order.

There, solved it once and for all. :)


It's Chisel < https://www.chisel-lang.org/ > which runs on Scala and generates synthesizable Verilog for hardware implementation.

It was created and used by the same group that created RISC-V so it makes perfect sense.

SiFive, arguably the biggest player in RISC-V, use Chisel to design their processors.


Almost all of RISC-V is Scala land!

Scala has actually some stand in HW development and high-performance computing. See also https://spatial-lang.org/ which is another Scala DSL, this time for accelerators.

Scala in general is a much underrated language. One of the most powerful high level languages, but with a concise and very clean core. Since the new syntax was introduced in version 3 it even looks amazingly beautiful.

I know, people (frankly especially here on HN) are repeating some FUD about this language, but this are usually issues solved a decade ago.

People should really reconsider trying out Scala. Especially the new major version 3.

https://virtuslab.com/blog/the-most-common-scala-myths-debun...


This is a waste exaggeration. The Berkley people use Scala but just like everywhere else the majority of RISC-V is SystemVerilog and friends.


> Odd choice to do hardware design in scala...

Why? (I know nothing about hardware design, but know a thing or two about Scala. All the languages better than Scala are used even less than Scala.)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: