是否可以在 GA144 上运行模拟的 C 代码?
该公司拥有一个有趣的CPU,运行速度惊人。可以模拟C还是内存太小?
This company have an interesting CPU that run at an amazing speed. Will it be possible to emulate C or is the memory too small?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
有SEAforth40芯片(GA144芯片之前版本)的C编译器
介绍:
http://www.asu.ru/files/documents/00002990.pdf
There is C translator for SEAforth40 chip (previous version of GA144 chip)
Presentation:
http://www.asu.ru/files/documents/00002990.pdf
粗略地浏览指令集表明“colorForth”可以被认为是一种简单的机器语言。鉴于此,也许可以编写一个 C 编译器来编译 colorForth 作为其目标指令集。
当然,首先在 colorForth 中编写代码可能更容易。
A first cursory glance at the instruction set suggests that "colorForth" can be thought of as a simple machine language. Given that, it may be possible to write a C compiler that compiles to colorForth as its target instruction set.
Of course, it may be easier to write code in colorForth in the first place.
看起来,如果有人写了一个可以输出机器码(33条指令,不太复杂)的编译器,就不需要模拟C,直接编译就可以了。
当然,这将是极其有限的,因为看起来每个芯片都有少量的内部 RAM(64 个字并不算多)。其中一个核心有一个 18 位内存地址端口,因此您可以拥有 256MB 的外部 RAM,但它只能由其中一个核心直接访问,然后需要将其传递给另一个核心。
不同的内核可能用于不同的功能,但这会使编译器变得相当复杂。
From the looks of it, if someone writes a compiler which can output the machine code (33 instructions, not too complex), you won't need to emulate C, you could just directly compile it.
Of course, it would be extremely limited, since it looks like each chip gets a tiny amount of internal RAM (64 words isn't a lot to work with). There's an 18-bit memory address port attached to one of the cores, so you can have 256MB of external RAM, but it can only be directly accessed by a single one of the cores, and then it would need to be passed to the other.
It's possible that different cores could be used for different functions, but that would complicate the compiler quite a bit.
这是可以做到的,但他们的解释器应该处理并行任务、负载分配等。最好选择他们的 Forth 解释器。
It could be done, but their interpreter should handle parallel tasks, load distribution, etc. It will probability be best to just go with their Forth interpreter.
叶绿素有一些普遍感兴趣的想法。我也恰好看起来像C:
http://www.eecs.berkeley.edu/~mangpo/www /talks/1311_forthday_handout.pdf
http://www.eecs。 berkeley.edu/~nishant/papers/Chlorophyll.pdf
Chlorophyll has some ideas of general interest. I also happens to look similar to C:
http://www.eecs.berkeley.edu/~mangpo/www/talks/1311_forthday_handout.pdf
http://www.eecs.berkeley.edu/~nishant/papers/Chlorophyll.pdf
您需要使用外部存储器,但除此之外,根据此 Greg Bailey 的“nofollow">白皮书:
他还在该论文中讨论了 eForth 虚拟机的实现。
You would need to use external memory, but apart from that, it is certainly doable, according to this white paper by Greg Bailey:
He also discuss their implementation of a eForth virtual machine in that paper.