Compatibility with C #10
Replies: 5 comments 3 replies
-
I dont think literally identical source code compiles at the moment in that example. But minor changes and yeah, it should compile and run on a CPU too (definitely not as high performance as highly optimized software-C code). But yeah the intent was to try and allow you to compile and run little chunks of your hardware description PipelineC with gcc as a first level of functional verification. (before going to full sim or hardware test). I have not tried such a test mostly since I am not crypto expert really + I was not the original author of the C code that the PipelineC example is based off of. https://github.com/JulianKemmerer/PipelineC/wiki/Example:-Nexus-Proof-of-Work-Function |
Beta Was this translation helpful? Give feedback.
-
I was able to compile the vga pattern source with a normal C compiler, with a minimum of modifications (see usage of SKIP_DEBUG_OUTPUT macro that I set before compilation). Just the extra code to run on the simulator should me modified. It would be better to change a bit the way of communicating with the simulator so the same code compiles and run with a normal C compiler as I did.
|
Beta Was this translation helpful? Give feedback.
-
Usage of & instead of && generates some warnings with clang, it would be better that && operator is accepted in PipelineC with same meaning (test if both operands are != 0) |
Beta Was this translation helpful? Give feedback.
-
Another idea: Minimal size registers Register types should support fixed width (i.e. uint4_t is "4 bits") and types that means "at least N bits". That way, when compiled with a C compiler, the smaller registers would be implemented in 8, 16, 32 or 64 bits as neeed. |
Beta Was this translation helpful? Give feedback.
-
Yes, this is ok for "fast" versión bit bit exact version will need the
exact size types as provided by the templated class I posted
El jue., 30 sep. 2021 17:11, Julian Kemmerer ***@***.***>
escribió:
… @suarezvictor <https://github.com/suarezvictor> That was sort of what I
was thinking with the contents of
https://github.com/JulianKemmerer/PipelineC/blob/master/uintN_t.h
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBHVWP7RBCMPVYZOIKJZHDUETAAZANCNFSM5EFHHVMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
I've seem the completely awesome implementation of "Nexus Proof of Work" algorithm that avoids the manual pipelining.
Does the modified source compile with a C compiler and run with same results? Is this at least possible?
A C source compatible with FPGA and regular compilers seems like a dream...
Beta Was this translation helpful? Give feedback.
All reactions