!FQBlZBRjRMgQBRocZx:matrix.org

FIRRTL

124 Members
Discussion about the FIRRTL hardware IR and compiler2 Servers

Load older messages


SenderMessageTime
1 May 2023
@eigenform:matrix.orgeigenformGot it, thanks again!01:50:47
11 Jul 2023
@tianruiwei:matrix.orgTianrui Wei set a profile picture.20:15:42
20 Aug 2023
@sahand_kashani:matrix.org@sahand_kashani:matrix.org joined the room.17:27:29
@sahand_kashani:matrix.org@sahand_kashani:matrix.org left the room.17:27:30
16 Oct 2023
@vgxbj-5ac34582d73408ce4f9429dd:gitter.im@vgxbj-5ac34582d73408ce4f9429dd:gitter.im changed their display name from vgxbj (Xing GUO) to Xing GUO.13:22:18
@vgxbj-5ac34582d73408ce4f9429dd:gitter.im@vgxbj-5ac34582d73408ce4f9429dd:gitter.im removed their profile picture.13:22:48
@vgxbj-5ac34582d73408ce4f9429dd:gitter.im@vgxbj-5ac34582d73408ce4f9429dd:gitter.im removed their display name Xing GUO.13:22:49
@vgxbj-5ac34582d73408ce4f9429dd:gitter.im@vgxbj-5ac34582d73408ce4f9429dd:gitter.im left the room.13:22:50
12 Dec 2023
@jurevreca12-6012b66fd73408ce4ff9fd3c:gitter.imjurevreca12 (jurevreca12)Is it possible to use firtool with a .lo.fir file generated by chisel 3.5.6?13:11:43
@seldridge:matrix.orgSchuyler Eldridge Yes, it should work. Firtool is mostly backwards compatible with old FIRRTL versions. Are you seeing an error? 21:17:27
13 Dec 2023
@jurevreca12-6012b66fd73408ce4ff9fd3c:gitter.imjurevreca12 (jurevreca12)No. I just felt like this should be able to work, but I wasn't sure, since I saw that now there are some .fir.mlir files and https://www.chisel-lang.org/docs/appendix/versioning this table doesn't specify this as ok, so I wasnt sure.07:52:50
@jurevreca12-6012b66fd73408ce4ff9fd3c:gitter.imjurevreca12 (jurevreca12) * No. I just felt like this should be able to work, but I wasn't sure, since I saw that now there are some .fir.mlir files and https://www.chisel-lang.org/docs/appendix/versioning this table doesn't specify this as ok.07:52:59
15 Dec 2023
@seldridge:matrix.orgSchuyler Eldridge
In reply to @jurevreca12-6012b66fd73408ce4ff9fd3c:gitter.im
No. I just felt like this should be able to work, but I wasn't sure, since I saw that now there are some .fir.mlir files and https://www.chisel-lang.org/docs/appendix/versioning this table doesn't specify this as ok.

That table should be updated or include something about firtool versions. That table is really talking about what version of different Scala projects works together. We've tried pretty hard to make firtool parse almost anything it's given FIRRTL-wise. Also, .lo.fir if a very restricted subset of FIRRTL produces by the Scala-based FIRRTL Compiler (SFC), so I would not expect there to be a problem with that.

The only known problem is that firtool never supported fixed point or interval types. These were exceedingly rarely used, so, again, I wouldn't expect you to run into this. I also think .lo.fir removed these in the SFC.

18:51:03
18 Dec 2023
@rameloni:gitter.imRaffaele Meloni joined the room.13:23:42
19 Dec 2023
@rameloni:gitter.imRaffaele MeloniDownload test2.scala09:06:44
@rameloni:gitter.imRaffaele Meloni

Hey I was trying to write a simple FIRRTL annotation with the CustomFileEmission trait. However, I don't fully understand how it works, sometimes it prints out the file other times no.

Is there anyone that knows a good reference to write a custom annotation?

Moreover, I also tried to use existing annotations from here: https://circt.llvm.org/docs/Dialects/FIRRTL/FIRRTLAnnotations/ but it seems that those annotations are available for firrtl2 while the ChiselAnnotation class works with firrtl library.

09:09:33
@seldridge:matrix.orgSchuyler Eldridge

CustomFileEmission is not supported with firtool/CIRCT (because trait inheritance is not represented when annotations are written to disk---this requires having a JVM to reflectively build the annotation and then query it's run time type information, i.e., this was always a bad idea). There is now support for custom annotations and passes in CIRCT with some additional setup.

Roughly, you can register your annotations using this function: https://github.com/llvm/circt/blob/2caafc76bb1f35a92868c2c77fed114f40b9ffd7/include/circt/Dialect/FIRRTL/FIRRTLAnnotationHelper.h#L450

You can then inject passes using MLIR's pass plugin feature to consume the annotation during the FIRRTL pipeline.

A sparse example of setting up a project to do this is here: https://github.com/uenoku/firtool-standalone-plugin

17:34:29
@seldridge:matrix.orgSchuyler EldridgeSome more info about this is on the PR that added it: https://github.com/llvm/circt/pull/625417:38:24
20 Dec 2023
@rameloni:gitter.imRaffaele MeloniRedacted or Malformed Event07:59:48
@rameloni:gitter.imRaffaele Meloni * Therefore, I can't create an annotation and transform that from chisel (scala code directly), right? 20:53:56
@rameloni:gitter.imRaffaele Meloni
In reply to @seldridge:matrix.org

CustomFileEmission is not supported with firtool/CIRCT (because trait inheritance is not represented when annotations are written to disk---this requires having a JVM to reflectively build the annotation and then query it's run time type information, i.e., this was always a bad idea). There is now support for custom annotations and passes in CIRCT with some additional setup.

Roughly, you can register your annotations using this function: https://github.com/llvm/circt/blob/2caafc76bb1f35a92868c2c77fed114f40b9ffd7/include/circt/Dialect/FIRRTL/FIRRTLAnnotationHelper.h#L450

You can then inject passes using MLIR's pass plugin feature to consume the annotation during the FIRRTL pipeline.

A sparse example of setting up a project to do this is here: https://github.com/uenoku/firtool-standalone-plugin

Therefore, I can't create an annotation and transform that from chisel (scala code directly), right?
21:16:34
24 Feb 2024
@rameloni:gitter.imRaffaele Meloni

Hello everyone, I want to study how the Chisel code is elaborated to verilog, I have seen that it is first elaborated into a chisel IR, then, through transforms and annotations, it is translated to firrtl IR (high and lowfirrtl) and finally compiled to verilog.

Is there any official documentation that explains some details about that?

09:02:46
@rameloni:gitter.imRaffaele Meloni* Hello everyone, I want to study how the Chisel code is elaborated to verilog, I have seen that it is first elaborated into a chisel IR, then, through transforms and annotations, it is translated to firrtl IR (high and lowfirrtl) and finally compiled to verilog. Is there any official documentation that explains some details about that? Here is my reason for studying that: I am currently working on a project that requires systematically to map chisel circuit elements to firrtl and verilog signals. 09:06:37
@rameloni:gitter.imRaffaele Meloni* Hello everyone, I want to study how the Chisel code is elaborated to verilog, I have seen that it is first elaborated into a chisel IR, then, through transforms and annotations, it is translated to firrtl IR (high and lowfirrtl) and finally compiled to verilog. Is there any official documentation that explains some details about that? Here is my reason for studying that: I am currently working on a project that requires systematically to map chisel circuit elements to firrtl and verilog signals. I have already seen that there are two annotations that store a chisel and firrtl circuit respectively, however they are not directly linked. I only saw that the `Converter` object provides functions to convert chisel IR to Firrtl IR but it is private.09:09:36
@rameloni:gitter.imRaffaele Meloni* Hello everyone, I want to study how the Chisel code is elaborated to verilog, I have seen that it is first elaborated into a chisel IR, then, through transforms and annotations, it is translated to firrtl IR (high and lowfirrtl) and finally compiled to verilog. Is there any official documentation that explains some details about that? Here is my reason for studying that: I am currently working on a project that requires systematically to map chisel circuit elements to firrtl and verilog signals. I have already seen that there are two annotations that store a chisel and firrtl circuit respectively, however they are not directly linked. I only saw that the Converter object provides functions to convert chisel IR to Firrtl IR but it is private. 09:09:48
@rameloni:gitter.imRaffaele Meloni* Hello everyone, I want to study how the Chisel code is elaborated to verilog, I have seen that it is first elaborated into a chisel IR, then, through transforms and annotations, it is translated to firrtl IR (high and lowfirrtl) and finally compiled to verilog. Is there any official documentation that explains some details about that? Here is my reason for studying that: I am currently working on a project that requires systematically to map chisel circuit elements to firrtl and verilog signals. I have already seen that there are two annotations that store a chisel and firrtl circuit respectively, however they are not directly linked. I only saw that the Converter object provides functions to convert chisel IR to Firrtl IR but it is private.09:10:00
@rameloni:gitter.imRaffaele Meloni* Hello everyone, I want to study how the Chisel code is elaborated to verilog, I have seen that it is first elaborated into a chisel IR, then, through transforms and annotations, it is translated to firrtl IR (high and lowfirrtl) and finally compiled to verilog. Is there any official documentation that explains some details about that? Here is my reason for studying that: I am currently working on a project that requires systematically to map chisel circuit elements to firrtl and verilog signals. I have already seen that there are two annotations that store a chisel and firrtl circuit respectively, however they are not directly linked. I only saw that the Converter object provides functions to convert chisel IR to Firrtl IR but it is private. 09:10:12
@rameloni:gitter.imRaffaele Meloni* Hello everyone, I want to study how the Chisel code is elaborated to verilog, I have seen that it is first elaborated into a chisel IR, then, through transforms and annotations, it is translated to firrtl IR (high and lowfirrtl) and finally compiled to verilog. Is there any official documentation that explains some details about that? Here is my reason for studying that: I am currently working on a project that requires systematically to map chisel circuit elements to firrtl and verilog signals. I have already seen that there are two annotations that store a chisel and firrtl circuit respectively, however they are not directly linked. I only saw that the Converter object provides functions to convert chisel IR to Firrtl IR but it is private.09:10:24
26 Feb 2024
@seldridge:matrix.orgSchuyler Eldridge
In reply to @rameloni:gitter.im

Hello everyone, I want to study how the Chisel code is elaborated to verilog, I have seen that it is first elaborated into a chisel IR, then, through transforms and annotations, it is translated to firrtl IR (high and lowfirrtl) and finally compiled to verilog.

Is there any official documentation that explains some details about that?

Here is my reason for studying that: I am currently working on a project that requires systematically to map chisel circuit elements to firrtl and verilog signals. I have already seen that there are two annotations that store a chisel and firrtl circuit respectively, however they are not directly linked. I only saw that the Converter object provides functions to convert chisel IR to Firrtl IR but it is private.

You may want to look at `llvm/circt` and specifically the debug dialect. That is infrastructure for tracking mappings of the high level language to Verilog. There’s more information here: https://circt.llvm.org/docs/Dialects/Debug/
03:11:15
@rameloni:gitter.imRaffaele Meloni
In reply to @seldridge:matrix.org
You may want to look at `llvm/circt` and specifically the debug dialect. That is infrastructure for tracking mappings of the high level language to Verilog. There’s more information here: https://circt.llvm.org/docs/Dialects/Debug/
Thanks for your reply. Is this dialect somehow integrated with chisel?
10:50:27

Show newer messages


Back to Room ListRoom Version: 5