diff options
| author | Aditya Naik | 2024-05-03 10:59:45 -0700 |
|---|---|---|
| committer | Aditya Naik | 2024-05-03 10:59:45 -0700 |
| commit | 878d488a7c8e0d6973de58b3164022c6a102e449 (patch) | |
| tree | cd081bbcbe3f797f80b10c2d8153da0069750e51 /src/main/scala/chisel3/util/ExtModuleUtils.scala | |
| parent | 8200c0cdf1d471453946d5ae24bc99757b2ef02d (diff) | |
Get cleanup to compile
Diffstat (limited to 'src/main/scala/chisel3/util/ExtModuleUtils.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/ExtModuleUtils.scala | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/main/scala/chisel3/util/ExtModuleUtils.scala b/src/main/scala/chisel3/util/ExtModuleUtils.scala deleted file mode 100644 index 8a687d36..00000000 --- a/src/main/scala/chisel3/util/ExtModuleUtils.scala +++ /dev/null @@ -1,63 +0,0 @@ -// See LICENSE for license details. - -package chisel3.util - -import chisel3.experimental.{ChiselAnnotation, ExtModule, RunFirrtlTransform} -import firrtl.transforms.{BlackBoxInlineAnno, BlackBoxNotFoundException, BlackBoxPathAnno, BlackBoxSourceHelper} - -import BlackBoxHelpers._ - -trait HasExtModuleResource extends ExtModule { - self: ExtModule => - - /** Copies a resource file to the target directory - * - * Resource files are located in project_root/src/main/resources/. - * Example of adding the resource file project_root/src/main/resources/blackbox.v: - * {{{ - * addResource("/blackbox.v") - * }}} - */ - def addResource(blackBoxResource: String): Unit = { - val anno = new ChiselAnnotation with RunFirrtlTransform { - def toFirrtl = BlackBoxInlineAnno.fromResource(blackBoxResource, self.toNamed) - def transformClass = classOf[BlackBoxSourceHelper] - } - chisel3.experimental.annotate(anno) - } -} - -trait HasExtModuleInline extends ExtModule { - self: ExtModule => - - /** Creates a black box verilog file, from the contents of a local string - * - * @param blackBoxName The black box module name, to create filename - * @param blackBoxInline The black box contents - */ - def setInline(blackBoxName: String, blackBoxInline: String): Unit = { - val anno = new ChiselAnnotation with RunFirrtlTransform { - def toFirrtl = BlackBoxInlineAnno(self.toNamed, blackBoxName, blackBoxInline) - def transformClass = classOf[BlackBoxSourceHelper] - } - chisel3.experimental.annotate(anno) - } -} - -trait HasExtModulePath extends ExtModule { - self: ExtModule => - - /** Copies a file to the target directory - * - * This works with absolute and relative paths. Relative paths are relative - * to the current working directory, which is generally not the same as the - * target directory. - */ - def addPath(blackBoxPath: String): Unit = { - val anno = new ChiselAnnotation with RunFirrtlTransform { - def toFirrtl = BlackBoxPathAnno(self.toNamed, blackBoxPath) - def transformClass = classOf[BlackBoxSourceHelper] - } - chisel3.experimental.annotate(anno) - } -} |
