Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 11:21
    umarcor closed #1890
  • 11:21
    umarcor commented #1890
  • 11:20
    umarcor milestoned #1890
  • 11:20
    umarcor edited #1890
  • 11:20
    umarcor edited #1890
  • 11:19
    umarcor edited #1890
  • 11:19
    umarcor milestoned #1896
  • 09:19
    abyszuk closed #1893
  • 09:19
    abyszuk commented #1893
  • 06:38

    github-actions[bot] on nightly

    ortho/debug and ortho/oread: al… synth-static_oper: handle or/an… testsuite/synth: add a test for… (compare)

  • 05:55
    tgingold closed #1896
  • 05:55

    tgingold on master

    ortho/debug and ortho/oread: al… synth-static_oper: handle or/an… testsuite/synth: add a test for… (compare)

  • 01:00

    github-actions[bot] on nightly

    ci: add UCRT64 jobs and generat… ci: cleanup job names CI: Add UCRT64 jobs and generat… (compare)

  • 00:46
    umarcor labeled #1896
  • 00:46
    umarcor labeled #1896
  • 00:44
    JulianKemmerer opened #1896
  • Oct 17 16:30

    Paebbels on master

    ci: add UCRT64 jobs and generat… ci: cleanup job names CI: Add UCRT64 jobs and generat… (compare)

  • Oct 17 16:30
    Paebbels closed #1895
  • Oct 17 16:30
    Paebbels review_requested #1895
  • Oct 17 16:22
    umarcor synchronize #1895
vblanco20-1
@vblanco20-1
mostly for the hell of it, no real good reason. The language i know best is actually cpp
rust is great for this sort of work,because its string handling is the best of almost any language
the standard library of rust has tons of string related funcionality, and everything generally works through string-views, so it doesnt perform allocations and runs very fast
Unai Martinez-Corral
@umarcor
Note that there are tasks related to Ada, C, C++, Python, TypeScript, Shell, HTML/CSS/JS... in GHDL as a project. Hence, if what you want is to contribute in a language, regardless of the area, let us know. https://github.com/ghdl/ghdl/wiki
OTOH, if you want to implement/enhance a very specific area/feature of the tool/project, then you need to learn/use the language.
However, there is a rust branch in the repo. We already setup CI enhancements, for CI to work on all platforms.
Moreover, I strongly recommend you add @xiretza:xiretza.xyz's fork and look at his rust branch.
vblanco20-1
@vblanco20-1
thats hell of a lot of languages for the project
Unai Martinez-Corral
@umarcor

thats hell of a lot of languages for the project

It's a hell of a project!

vblanco20-1
@vblanco20-1
why the html?
Unai Martinez-Corral
@umarcor
documentation.
vblanco20-1
@vblanco20-1
ah
Unai Martinez-Corral
@umarcor
also, GHDL generates HTML from Ada. See the pretty printing options.
vblanco20-1
@vblanco20-1
what was the original thinking of using something like Ada for a compiler?
generally every use case ive ever seen of Ada was for things microcontroller/robot related
vblanco20-1
@vblanco20-1
on my end GHDL is the absolute first time ive seen Ada used for something like a compiler
Unai Martinez-Corral
@umarcor

what was the original thinking of using something like Ada for a compiler?

Tristan worked with Ada (at AdaCore). He is an expert in the language.
Other than that, VHDL was based on Ada. Therefore syntax and certain semantics are very similar.
The idea is that VHDL designers can read Ada. That is true. However, the actual problem is that hardware designers can hardly contribute to GHDL because it is compiler, not because of the language. We are lacking knowledge about the complexity of the tool (and the LRM). I don't think using Ada is the main stopper.

OTOH, since GHDL was started 20 years ago, the language ecosystem changed a lot.
Ada tooling feels dated compared to Python, Rust, Golang.
Yet, that's not a problem with Ada only, but also with C/C++.
I believe it's arguable whether GHDL would be better written in C. I think that's what it should be compared. Comparing Ada and Rust is unfair because Rust did not exist for 15 of the last 20 years.
Anyway, we have discussed about "rewritting GHDL in Rust" several times in the last 2-3 years. I believe it might happen at some point.
For it to be true, tho, there needs to be more momentum than around Ada.
So, please, see the rust branch, ask about it, try to understand why Tristan did not switch to Rust yet, even though it has been discussed so much.
Unai Martinez-Corral
@umarcor

ive thought of making my own HDL on top of vhdl

Please, don't call that HDL. None of us is more clever than all the people working on standardising HDL languages during the last 40 years. You will likely design a subset of a subset of an HDL which will need between 5-10y to be barely usable for any real-world application, and not just the very limited subset of use cases you need it for.
Chisel, SpinalHDL, migen, nmigen, Clash, BlueSpec, Silice, myhdl, TL-Verilog... all those are domain specific languages, most of them focused on a very specific topic (writting RISCV microarchitectures). Twice as many were created in the last decade and are absolutely dead.
We do have a problem with open source tooling for HDL. However, reinventing languages will only delay improving the tooling a decade, at least.
Writting tooling for VHDL and/or System Verilog is precisely complex and challenging because they cover lots of use cases which other languages decided to ignore for the sake of simplicity.

Kaleb Barrett
@ktbarrett
@umarcor I learned Rust a couple years ago and tried it out on some random toy projects. After fighting the borrow checker a couple times I stopped and never used it again.
2 replies
Unai Martinez-Corral
@umarcor
You want to write a DSP library? A SoC integration tool? An interface/interconnect management solution? All of those are so interesting, and you can use a DSL for that. You can write the DSL in any software language you want. All of that is absolutely perfect and desirable. Just, please, don't say/think that is an HDL.
vblanco20-1
@vblanco20-1
going from ada to rust makes a lot of sense
safety first language into safety first language
plus rust in general has a very nice ecosystem for compiler related things
Unai Martinez-Corral
@umarcor
I believe that's the main reason for Tristan to consider Rust seriously, while C/C++ do not add much value and the effort is probably not worth it. Just for curiosity, Kaleb, Victor, would feel comfortable with C++? I know you both know it, but I don't know if enough for actually writting a compiler with it.
vblanco20-1
@vblanco20-1
ive been coding cpp for near a decade professionally. I wouldnt really use it for a new copiler written today
Unai Martinez-Corral
@umarcor
Note that the ghdl to yosys plugin is currently done in C++. Also, combining GHDL with Verilator or writting a ghdlator/vhdlator might require C++. There is also UHDM, C++ too.
Kaleb Barrett
@ktbarrett
I am comfortable enough with C++ to use it for just about anything.
T. Meissner
@tmeissner
Isn't the SW-design of a project or the knowledge of it the real "blocker"?
vblanco20-1
@vblanco20-1
string handling is still quite a mess. The standard library uses std::string, but that one has some massive issues regarding the api
T. Meissner
@tmeissner
I also don't used Ada that much before and contributed to GHDL
vblanco20-1
@vblanco20-1
in cpp17 they added stringview, but they dropped it and near everything else in std string and similar still just creates more strings
in almost every cpp project the number 1 blocker is std string doing millions of allocations. Would be worse on a compiler unless the developers are incredibly careful
common things in cpp like splitting a string according to a delimiter will allocate 2 (or more) strings, plus the allocation for the std::vector to holds the string segments
in rust that is a lazy iterator that does 0 allocs. Part of the standard. Checked by the borrowcheck at compile stage to see you arent dangling references
Unai Martinez-Corral
@umarcor
There is also ghdl/ghdl-yosys-plugin#122 for verilog to vhdl conversion, also C++.
@tmeissner, as you see, I'm trying to provide alternatives which allow them to get familiar with the internals of GHDL indirectly. That is, exposing the internals through an API rather than actually modifying the core.
I agree that the language is not a problem in fact.
It's the lack of tooling in the language.
T. Meissner
@tmeissner
I'm not sure which tool is needed in addition to gnat?
A package manager?
Unai Martinez-Corral
@umarcor
Rust/Golang, even Python, have built in documentation generation, style checking, graphviz of the hierarchies/calls, etc.
In GHDL/Ada we have https://ghdl.github.io/ghdl/gnatdoc/. That's just useful for saying that "there is something", not more.
Packaging is interesting too, but that's kind of fundamentally broken in Python and golang, and the ecosystems are still alive.
Packaging is not very useful nowadays, since we have git and system packagers.
m-kru
@m-kru
This topic keeps returning like a boomerang.