diff --git a/core/src/main/scala/chisel3/internal/firrtl/Serializer.scala b/core/src/main/scala/chisel3/internal/firrtl/Serializer.scala index 224e8f85996..e88a8ffe525 100644 --- a/core/src/main/scala/chisel3/internal/firrtl/Serializer.scala +++ b/core/src/main/scala/chisel3/internal/firrtl/Serializer.scala @@ -607,7 +607,8 @@ private[chisel3] object Serializer { outputDir match { case Some(d) => b ++= ", " - quote(d) + // When serializing a windows path we need to escape the backslashes + quote(d.replace("\\", "\\\\")) case None => () } case LayerConfig.Inline => diff --git a/svsim/src/main/scala/Workspace.scala b/svsim/src/main/scala/Workspace.scala index f83da470659..b1f61835495 100644 --- a/svsim/src/main/scala/Workspace.scala +++ b/svsim/src/main/scala/Workspace.scala @@ -52,15 +52,15 @@ final class Workspace( /** A directory where the user can store additional artifacts which are relevant to the primary sources (for instance, artifacts related to the generation of primary sources). These artifacts have no impact on the simulation, but it may be useful to group them with the other files generated by svsim for debugging purposes. */ - val supportArtifactsPath = s"$absolutePath/support-artifacts" + val supportArtifactsPath = Paths.get(absolutePath, "support-artifacts").toString() /** The directory containing user-provided source files used to compile the simulation when `compile` is called. */ - val primarySourcesPath = s"$absolutePath/primary-sources" + val primarySourcesPath = Paths.get(absolutePath, "primary-sources").toString() /** The directory containing code generated when calling `generateAdditionalSources` */ - val generatedSourcesPath = s"$absolutePath/generated-sources" + val generatedSourcesPath = Paths.get(absolutePath, "generated-sources").toString() private var _moduleInfo: Option[ModuleInfo] = None