!FQBlZBRjRMgQBRocZx:matrix.org

FIRRTL

124 Members
Discussion about the FIRRTL hardware IR and compiler2 Servers

Load older messages


SenderMessageTime
8 Feb 2023
@burnleydev1-616083aa6da0373984877911:gitter.imBurnleydev1 (Abongwa Bonalais) joined the room.07:58:16
@mhirech-615c9d916da0373984874378:gitter.immhirech (mhirech) joined the room.07:58:17
@aoguzatli-6192f8386da03739848a9e6d:gitter.imaoguzatli (aoguzatli) joined the room.07:58:17
@jinrudals-62afd29a6da037398498b7b3:gitter.imjinrudals (BENJAMIN JIN) joined the room.07:58:18
@bujiatong-615d2f4d6da03739848748af:gitter.imBujiatong (Bujiatong) joined the room.07:58:19
@brent48_gitlab-6345cdbe6da03739849db779:gitter.imbrent48_gitlab (Brent Bell) joined the room.07:58:19
@ataraxiaz-6385b7456da0373984a0012c:gitter.imAtaraxiaZ (Zhe) joined the room.07:58:20
13 Feb 2023
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain) is there a way to print/view MutableDiGraph[LogicNode] type (whole graph or nodes/vertices) for debug purposes? I am seeing some issues with DeadCodeElimination in my project; and want to debug it further.. 15:17:22
@lsteveol-60dba4176da03739847ff872:gitter.imlsteveol (lsteveol) I'm not sure if there is a way to do what you want, but when compiling with the SFC you could use --no-dce to remove the elimination. I've done this in the past when I've had some dead code I wasn't expecting. It was usually fairly straightforward to see what I had messed up in my design 16:27:23
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain) that is something i have tried; and it seems to work. but that would also leave all the other unused logic which i would ideally like to not have in the design. 18:15:52
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain) though synthesis would optimize them away; so they would not really lead to problems downstream. 18:16:16
@jackkoenig-57e1805540f3a6eec0665030:gitter.imjackkoenig (Jack Koenig) You can print the DiGraph with manual modifications to the firrtl codebase, but that's quite a bit of work. What sorts of problems are you seeing? Is it logic being removed that you don't expect to be removed? 18:47:41
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain)

yes; so I have a new transform added (which basically adds parity generation and checkers for all registers in design), after this the DCE is run; and it removes one of the nodes that is generated from a register portion (whos output cone is optimized by DCE), and it does not remove the use of that signal from its output cone.

example:

input data[15:0]
output out
output out1 --> not used optimized
output error_or

out = xor data[7:0]
out1 = xor data[15:8] --> dce
check_1 = and data[15:8] --> dce
check_0 = and data[7:0]

error_or = check_0 or check_1

so; the final output after DCE looks like this:

input data[15:0]
output out
output error_or

out = xor data[7:0]
check_0 = and data[7:0]

error_or = check_0 or check_1

19:35:36
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain) which is a lint issue. 19:35:50
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain) i do have an issue also created in firrtl for this: chipsalliance/firrtl#2562 19:36:36
14 Feb 2023
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain)is there a way to diable deadcode elimination after some custom transform? like dont run it after this transform is run.14:35:12
15 Feb 2023
@seldridge:matrix.orgSchuyler EldridgeYou can block optimizations on specific nodes with a DontTouchAnnotation. The parity generation pass could add this to things I doesn’t want to have deleted.00:26:41
@seldridge:matrix.orgSchuyler Eldridge * You can block optimizations on specific nodes with a DontTouchAnnotation. The parity generation pass could add this to things it doesn’t want to have deleted. 03:59:39
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain)but, then that would mean i have to add this to all logic added by parity generator; because right now I am not sure what all its going to remove. I could do that and see if it helps.. might be better solution.13:58:55
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain)how do i insert dontTouch annotation at firrtl transform level?14:30:41
16 Feb 2023
@poddar92-6321eb716da03739849ca85d:gitter.impoddar92 (Radhika Jain)if I don't want the module to be renamed, duplicated due to some changes; what annotation do i use? noDedup is for not optimizing it with other modules right? if they have same functionality?21:06:18
17 Feb 2023
@abejgonzalez-63404e4b6da03739849d8cf7:gitter.imabejgonzalez (Abraham Gonzalez)Hi All! Quick reminder that the 1st FireSim/Chipyard User/Developer Workshop talk submissions are due soon (Monday Feb. 20th). Looking forward to meet you all at the workshop!: https://twitter.com/firesimproject/status/162664824896108134418:43:05
18 Feb 2023
@seldridge:matrix.orgSchuyler EldridgeIn your transform, when it returns the CircuitState, you can add any annotations to that that you want. You can add a DontTouchAnnotation into the AnnotationSeq that the state holds targeting the logic you add. That should do the trick.21:27:58
30 Apr 2023
@eigenform:matrix.orgeigenform joined the room.01:11:51
@eigenform:matrix.orgeigenform Hi folks! I noticed that I can't get Chisel to emit newer FIRRTL (ie. .fir) along with the corresponding MLIR FIRRTL (.fir.mlir). Just wondering if this is something that eventually belongs in firtool? Or somewhere else? 01:38:07
@seldridge:matrix.orgSchuyler Eldridge

Chisel (the actual Scala program) can only emit .fir. We've intentionally avoided trying to have Chisel emit .fir.mlir because that is pretty unstable and would cause Chisel to need to be closely coupled to both MLIR (which could change something about the .mlir serialization) or CIRCT (which could change how it chooses to represent things).

You can do this with firtool directly via firtool -parse-only to get the .fir.mlir right after firtool reads it (convert .fir to ..mlir), firtool -ir-fir to get .mlir after the FIRRTL portion of the firtool pipeline, firtool -ir-hw to get .mlir after the HW portion of the firtool pipeline, firtool -ir-sv to get .mlir after HW constructs have been converted to SV, and firtool -ir-verilog to get the .mlir that is used for Verilog emission (after names are cleaned up, wires are spilled, etc.). Without specifying any of these options you get .sv.

circt.stage.ChiselStage has aliases for most of these with the --target option. --target chirrtl is .fir, --target firrtl is firtool -ir-fir, --target hw is firtool -ir-hw, and --target verilog or --target systemverilog are .v/.sv.

There's currently no option to dump at multiple points unless you use some of the lower level MLIR options like--mlir-print-ir-after=<pass>.

02:43:03
@eigenform:matrix.orgeigenform

I think I worded my question wrong, sorry 😅

  • Chisel emits FIRRTL spec 1.2.0
  • firtool converts to the MLIR representation
  • Is there any way convert MLIR to FIRRTL spec 2.1.0+?
19:04:08
@eigenform:matrix.orgeigenform *

I think I worded my question wrong, sorry 😅

  • Chisel emits FIRRTL spec 1.2.0
  • firtool converts to the MLIR representation
  • Is there any way convert MLIR to the corresponding FIRRTL spec 2.1.0+? (I didn't see an option in firtool to do this)
19:05:51
@eigenform:matrix.orgeigenform *

I think I worded my question wrong, sorry 😅

  • Chisel emits FIRRTL spec 1.2.0
  • firtool converts to the MLIR representation
  • Is there any way convert MLIR to the newer FIRRTL 2.1.0 spec form? (I didn't see an option in firtool to do this)

Thanks!

19:06:38
@seldridge:matrix.orgSchuyler Eldridge The circt-translate tool has an --export-firrtl option that will output something (though it is missing features for emitting certain things). E.g., you can currently do firtool -parse-only | circt-translate -export-firrtl to round trip .fir to .fir. However, there are not options for selecting a specific FIRRTL version to output. It'll just output something right now. (This was primarily used with the circt-reduce tool to help find minimal circuits that deviated between SFC and MFC.) --export-firrtl could be extended to output a specific spec version. 21:04:39

Show newer messages


Back to Room ListRoom Version: 5