Skip to content

Commit f9666e7

Browse files
committed
Reformat with scalafmt 3.8.6
Executed command: scalafmt --non-interactive
1 parent 7c76585 commit f9666e7

File tree

6 files changed

+12
-18
lines changed

6 files changed

+12
-18
lines changed

firrtl/benchmark/src/main/scala/firrtl/benchmark/hot/SerializationBenchmark.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ object SerializationBenchmark extends App {
88
val inputFile = args(0)
99
val warmup = args(1).toInt
1010
val runs = args(2).toInt
11-
val select = if(args.length > 3) args(3) else "o"
11+
val select = if (args.length > 3) args(3) else "o"
1212

1313
val input = filenameToCircuit(inputFile)
1414

15-
if(select == "n") {
15+
if (select == "n") {
1616
println("Benchmarking new Serializer.serialize")
1717
firrtl.benchmark.hot.util.benchmark(warmup, runs)(Serializer.serialize(input))
18-
} else if(select == "o") {
18+
} else if (select == "o") {
1919
println("Benchmarking legacy serialization")
2020
firrtl.benchmark.hot.util.benchmark(warmup, runs)(input.serialize)
21-
} else if(select.startsWith("test")) {
21+
} else if (select.startsWith("test")) {
2222
println("Testing the new serialization against the old one")
2323
val o = input.serialize.split('\n').filterNot(_.trim.isEmpty)
2424
val n = Serializer.serialize(input).split('\n').filterNot(_.trim.isEmpty)
@@ -27,11 +27,11 @@ object SerializationBenchmark extends App {
2727
println(s"Old lines: ${o.length}")
2828
println(s"New lines: ${n.length}")
2929
o.zip(n).zipWithIndex.foreach { case ((ol, nl), ii) =>
30-
if(ol != nl) {
30+
if (ol != nl) {
3131
println(s"❌@$ii OLD: |$ol|")
3232
println(s"❌@$ii NEW: |$nl|")
3333
throw new RuntimeException()
34-
} else if(!silent) {
34+
} else if (!silent) {
3535
println(s"✅ |$ol")
3636
}
3737
}

firrtl/benchmark/src/main/scala/firrtl/benchmark/hot/TransformBenchmark.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ abstract class TransformBenchmark(factory: () => Transform) extends App {
2525

2626
object LowerTypesBenchmark extends TransformBenchmark(() => LowerTypes)
2727

28-
object DedupBenchmark extends TransformBenchmark(() => new DedupModules())
28+
object DedupBenchmark extends TransformBenchmark(() => new DedupModules())

firrtl/benchmark/src/main/scala/firrtl/benchmark/hot/util/package.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
package firrtl.benchmark.hot
32

43
import firrtl.Utils.time

lit/tests/Converter/Circuit.sc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
import chisel3._
55
import chisel3.util.circt.IsX
66

7-
87
// FIRRTL-LABEL: circuit FooModule :
98
// FIRRTL-NEXT: extmodule FooBlackbox :
109
// FIRRTL-NEXT: output o : UInt<1>
1110
// FIRRTL-NEXT: defname = FooBlackbox
1211
class FooBlackbox extends BlackBox {
13-
val io = IO(new Bundle{
12+
val io = IO(new Bundle {
1413
val o = Output(Bool())
1514
})
1615
}

lit/tests/Converter/Module.sc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import chisel3._
5-
import chisel3.experimental.{Analog, attach}
5+
import chisel3.experimental.{attach, Analog}
66
import chisel3.util.SRAM
77

88
// FIRRTL-LABEL: public module Attach :
@@ -76,7 +76,7 @@ class Mem extends Module {
7676
// FIRRTL: invalidate r.data
7777
r.data := DontCare
7878
// FIRRTL: when r.enable :
79-
when (r.enable) {
79+
when(r.enable) {
8080
// FIRRTL-NEXT: infer mport wrPort = mem[r.address], clock
8181
val wrPort = mem(r.address)
8282
// FIRRTL-NEXT: connect r.data, wrPort
@@ -86,7 +86,7 @@ class Mem extends Module {
8686
}
8787

8888
// FIRRTL: when w.enable :
89-
when (w.enable) {
89+
when(w.enable) {
9090
// FIRRTL-NEXT: infer mport wrPort_1 = mem[w.address], clock
9191
val wrPort = mem(w.address)
9292
// FIRRTL-NEXT: connect wrPort_1, w.data

lit/tests/Property/DocExample.sc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ class CSRDescription extends Class {
3232
}
3333

3434
// A hardware module representing a CSR and its description.
35-
class CSRModule(
36-
csrDescDef: Definition[CSRDescription],
37-
width: Int,
38-
identifierStr: String,
39-
descriptionStr: String)
35+
class CSRModule(csrDescDef: Definition[CSRDescription], width: Int, identifierStr: String, descriptionStr: String)
4036
extends Module {
4137
override def desiredName = identifierStr
4238

0 commit comments

Comments
 (0)