Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firrtl.Driver is deprecated - but what should we use instead?

Tags:

I've updated rocket-chip today and noticed that FIRRTL now says this:

------------------------------------------------------------------------------
Warning: firrtl.Driver is deprecated since 1.2!
Please switch to firrtl.stage.FirrtlStage
------------------------------------------------------------------------------

Okay, fair enough, I presume we have to update what we pass to the invocation of FIRRTL:

FIRRTL ?= java -Xmx3G -Xss8M -XX:MaxPermSize=256M $(FIRRTL_PROFILE_SWITCH)  -cp $(FIRRTL_JAR) firrtl.Driver

However naively switching firrtl.Driver to firrtl.stage.FirrtlStage didn't work:

Error: Main method not found in class firrtl.stage.FirrtlStage, please define the main method as:
   public static void main(String[] args)

What should we do to avoid this deprecation warning?

like image 709
jbaxter Avatar asked Jun 06 '19 01:06

jbaxter


1 Answers

This is my bad, the deprecation warning needs to be updated. You may (optionally) switch to firrtl.stage.FirrtlMain if you so choose. See freechipsproject/rocket-chip#1984 for how to update Rocket Chip. I'll get a PR in to fix this on the FIRRTL side.

There was some flux between FirrtlStage and FirrtlMain. The reasoning was that not every stage had to have a main function.

If you want more info on the whole Stage/Phase refactor that's percolating through Chisel, FIRRTL, and related projects see freechipsproject/FIRRTL#1005 and (not merged yet) freechipsproject/FIRRTL#1079.

like image 137
seldridge Avatar answered Nov 15 '22 06:11

seldridge