Sender | Message | Time |
---|---|---|
26 Feb 2024 | ||
Raffaele Meloni | I have also found the FIRRTL language specification doc (https://github.com/chipsalliance/firrtl-spec/releases/latest/download/spec.pdf). I think it is really useful for my purpose since it also explains how FIRRTL high-level types are lowered before the compilation to verilog. I also thought that But, during chisel elaboration, the chisel IR is lowered to the FIRRTL. Is there any documentation for Chisel IR? For now, I retrieved the types supported in Chisel IR from the code only. The good thing about chisel IR is that it preserves the | 11:47:37 |
Schuyler Eldridge | It's semi-integrated in that if you pass the
Those | 16:05:09 |
Raffaele Meloni | Schuyler Eldridge: thanks! But does it just propagate high level fir information, right? No information about the original chisel source code is provided | 19:36:33 |
29 Feb 2024 | ||
Schuyler Eldridge | So, it's intended to be enough information to link back to the Chisel source code. Chisel already is providing information about line/column number. Coupled with the debug info that can track the original structure (e.g., of Bundles or Modules), you can then build some powerful tooling on top of this. One such example is what Synopsys is building to enable debugging of Chisel (or languages like it) in Verdi. They gave a presentation of this today during the CIRCT dev meetings. Link to video: https://sifive.zoom.us/rec/share/HJDsUM5Rns71oehdjpLgxMZCAT6u9oBp7QfVA897se0YP07uLSZHkZ6OwBqLGK73.TanC9AeTavrHnybK | 01:57:37 |
Schuyler Eldridge | The rough idea is that the frontend language needs to put enough information into the debug dialect. Once that information is there, then the compiler will keep it around and the debug information can be used later to provide links from the Verilog back to the source language. You can play around with this with an example like the following:
| 02:05:58 |
Schuyler Eldridge | The original FIRRTL example doesn't really show this because it is not incorporating Chisel source locator information. | 02:06:32 |
4 Mar 2024 | ||
Raffaele Meloni | In reply to @seldridge:matrix.orgWhat version of firtool supports this option? | 17:31:46 |
Raffaele Meloni | I got it running, I will play with it now thank you! I have only a question, I installed the latest firtool now, from what version is this debug option supported? | 18:10:43 |
Schuyler Eldridge | I believe it is available since firtool-1.59.0 . | 20:12:28 |
7 Mar 2024 | ||
Raffaele Meloni | In reply to @seldridge:matrix.org Can I get that information in a separate file?
I also tried to use | 10:53:37 |
Raffaele Meloni | I just found this way to achieve that:
| 11:01:08 |
11 Mar 2024 | ||
Raffaele Meloni | Schuyler Eldridge: is the hgldd format somehow standardized? Are its fields going to be fixed over time or can they change? | 17:38:56 |
Schuyler Eldridge | HGLDD is very Synopsys-specific right now and basically governed by what their needs are. So, it will likely change. I brought this up with Fabian and it seems reasonable to have a more generic format that is not driven by the needs of Synopsys. There are some hints of this with the -dump-di option to circt-translate that can be used to dump the debug info in a more human readable format (though this is intended for humans to read and not machines to consume). | 21:18:26 |
Raffaele Meloni | In reply to @seldridge:matrix.orgSchuyler Eldridge: ah alright, I'm also working on a waveform viewer for chisel open source, and I was thinking to use hgldd to map verilog to Firrtl IR. The alternative I thought was to parse directly the debug dialect from mlir but I do think it's gonna be more complex | 21:24:53 |
Schuyler Eldridge | Don't parse MLIR directly. It's not a stable format and it may change at any time. You can have an alternative emission of the debug info, though. That's more getting at this alternative interchange format which has the same data, but isn't being tuned to work with Verdi. | 21:26:02 |
Raffaele Meloni | In reply to @seldridge:matrix.orgHow can I get it | 21:26:53 |
Raffaele Meloni | * How can I get it? | 21:27:01 |
Raffaele Meloni | In reply to @rameloni:gitter.imAbout this, I'm working on a little demo right now, and I'm going to publish it to ask for feedback and opinions about the project | 21:29:08 |
Raffaele Meloni | * About this, I'm working on a little demo right now, and I'm going to publish it in 1/2 weeks to ask for feedback and opinions about the project | 21:29:25 |
Schuyler Eldridge | It's probably fine to continue what you're doing and then take the feedback later. What I'm proposing is a "translation" (what MLIR calls something goes from X -> MLIR or MLIR -> X, with the HGLDD exporter being one of the latter) that is able to read the debug info and generate an alternative format. | 21:50:58 |
Raffaele Meloni | In reply to @seldridge:matrix.orgWhat I've done so far is to set the project such that it is able to parse what is inside the HGLDD format and make it available to my program | 21:54:37 |
Raffaele Meloni | Is it what you meant? | 22:04:28 |
Schuyler Eldridge | Yeah, that's what I mean! | 22:05:01 |
Raffaele Meloni | Perfect! Thank you! | 22:06:31 |
12 Mar 2024 | ||
Raffaele Meloni | Hi Schuyler Eldridge sorry to bother you again, is there any brief documentation that explains what values are dumped in the HGLDD JSON? | 17:58:18 |
Raffaele Meloni | So far I've based the parsing on what I understood from the values I got from some examples | 18:00:09 |
Schuyler Eldridge | In reply to @rameloni:gitter.imAnnoyingly no other than whatever comments may be in the pass generating them. You may try pinging Fabian Schuiki on the LLVM discourse #circt channel, though. | 22:24:10 |
20 Mar 2024 | ||
chandanassmee19b093 joined the room. | 04:29:15 | |
chandanassmee19b093 | Hello everyone, I want to study how a verilog blackbox is handled in firrtl flow, and I want to know if firrtl transforms can be written to get the $fwrite and $stop functions in the verilog code to convert to printf and stop functions in firrtl so that I can move them along the golden gate( midas II) flow to get the assertions and printf statements synthesized in firesim simulation | 04:51:04 |
13 Apr 2024 | ||
Arjun joined the room. | 18:25:05 |