架构中粗粒度/细粒度的定义

发布于 2024-08-22 16:14:59 字数 61 浏览 4 评论 0原文

在谈论 API 时,经常使用术语“粗粒度”或“细粒度”。这些是什么意思/有什么例子吗?

谢谢

When talking about APIs, the terms "coarsely grained" or "finely grained" are used a lot. What do these mean/are there any examples?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

橙味迷妹 2024-08-29 16:14:59

通常指 FPGA(现场可编程门阵列)的最小逻辑元件。例如,如果它是 NAND 门,则它被认为是细粒度的。如果它是一个能够与许多 NAND 等效的复杂逻辑块,那么它就是粗粒度的。很容易看出,如果综合器选择一个复杂的块来执行“几个”门的逻辑,则会浪费芯片面积和利用率,最好留给细粒度架构。如果您想使用“大量与非门”进行浮点数学计算,那么效率不如具有浮点的粗粒度 FPGA,甚至是整数、加法器、桶式移位器和/或 PLA 元件,可以是级联更大的位字。这将构成一个快速加法器,并且占用的面积比细粒度的加法器要少,并且可以接近 100% 地利用复杂逻辑块。

Often in reference to FPGA's (Field Programmable Gate Arrays) smallest logic element. If it's, for example, a NAND gate, it is considered fine grained. If it's a complex logic block capable of MANY NAND equivalences, it is coarse grained. It is easy to see that if the synthesizer picks a complex block to do a "few" gates worth of logic, it was a waste of the chip area and utilization and best left for fine grained architectures. If you wanted to do floating point math with a "sea of nand gates" that would not be as efficient as a coarse grained FPGA that has floating point, or even integer, adders, barrel shifters, and or PLA elements in them that can be cascaded for larger bit words. that would make a fast adder and take less area than fine grained and utilize closer to 100% of the complex logic block.

瑶笙 2024-08-29 16:14:59

我已经看到 SOA 中经常使用这种区别,例如:

http

基本上,粗粒度系统比细粒度系统具有更少的方法调用。显然,与细分的细粒度版本相比,粗粒度方法的数量更少,工作量更多。

当调用成本高昂时(例如在分布式系统中),粗粒度接口通常会更好。

I've seen the distinction used a lot with SOA, e.g.:

http://www.ibm.com/developerworks/webservices/library/ws-soa-granularity/

Basically, coarse-grained systems will have less method calls than a fine-grained system. Clearly coarse-grained methods will be fewer and do more work than the broken-down fine-grained versions.

Coarse grained interfaces will generally be better where calls are expensive, in a distributed system for example.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文