Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 25 07:46
    umarcor commented #1875
  • Sep 25 07:45
    umarcor commented #1875
  • Sep 24 22:31
    avelure commented #1875
  • Sep 24 20:49

    github-actions[bot] on nightly

    grt-change_generics: handle arr… testsuite/gna: add a test for #… (compare)

  • Sep 24 19:45
    umarcor milestoned #1876
  • Sep 24 19:45
    umarcor closed #1877
  • Sep 24 19:45
    umarcor commented #1877
  • Sep 24 19:25
    umarcor commented #1875
  • Sep 24 18:56
    umarcor commented #1875
  • Sep 24 18:49
    avelure commented #1875
  • Sep 24 18:10
    tgingold closed #1876
  • Sep 24 18:10

    tgingold on master

    grt-change_generics: handle arr… testsuite/gna: add a test for #… (compare)

  • Sep 24 16:36
    JimLewis commented #1875
  • Sep 24 12:11

    github-actions[bot] on nightly

    Add parsing of case? statement … (compare)

  • Sep 24 11:32
    umarcor milestoned #1879
  • Sep 24 05:29
    tgingold commented #1879
  • Sep 24 05:29

    tgingold on master

    Add parsing of case? statement … (compare)

  • Sep 24 05:29
    tgingold closed #1879
  • Sep 24 01:57
    umarcor edited #1291
  • Sep 24 01:53
    umarcor commented #1291
vblanco20-1
@vblanco20-1
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.
Chips4Makers
@fatsiefs:matrix.org
[m]
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).