From a18515b79bd90e7296451c7cc0bb08834c1b7aca Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Mon, 30 Mar 2020 18:03:14 -0400 Subject: Java API Documents Linking (#1367) * Show linking against Javadoc Signed-off-by: Schuyler Eldridge * Add sbt-api-mappings plugin This adds the sbt-api-mappings plugin which enables auto-linking (properly setting the apiMappings for the sbt project) so that Scaldoc/unidoc generation will now automatically link against Java and Scala API docs (and use the right version). Signed-off-by: Schuyler Eldridge * Show linking against Scala APIs Signed-off-by: Schuyler Eldridge --- core/src/main/scala/chisel3/package.scala | 2 +- project/plugins.sbt | 1 + src/main/scala/chisel3/util/Bitwise.scala | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/chisel3/package.scala b/core/src/main/scala/chisel3/package.scala index 65bfdeb7..cf0afb10 100644 --- a/core/src/main/scala/chisel3/package.scala +++ b/core/src/main/scala/chisel3/package.scala @@ -11,7 +11,7 @@ package object chisel3 { // scalastyle:ignore package.object.name import scala.language.implicitConversions /** - * These implicit classes allow one to convert scala.Int|scala.BigInt to + * These implicit classes allow one to convert [[scala.Int]] or [[scala.BigInt]] to * Chisel.UInt|Chisel.SInt by calling .asUInt|.asSInt on them, respectively. * The versions .asUInt(width)|.asSInt(width) are also available to explicitly * mark a width for the new literal. diff --git a/project/plugins.sbt b/project/plugins.sbt index 6326ba99..aec0ec01 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -14,3 +14,4 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") +addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") diff --git a/src/main/scala/chisel3/util/Bitwise.scala b/src/main/scala/chisel3/util/Bitwise.scala index bbed5f07..4681b34a 100644 --- a/src/main/scala/chisel3/util/Bitwise.scala +++ b/src/main/scala/chisel3/util/Bitwise.scala @@ -61,6 +61,7 @@ object Fill { /** Create n repetitions of x using a tree fanout topology. * * Output data-equivalent to x ## x ## ... ## x (n repetitions). + * @throws java.lang.IllegalArgumentException if `n` is less than zero */ def apply(n: Int, x: UInt): UInt = { n match { -- cgit v1.2.3