o

top.scaleda.kernel.utils

KernelFileUtils

object KernelFileUtils

Kernel file utilities

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KernelFileUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. def confirmFileParentPath(file: File): Boolean

    Create parent directory for file creation

    Create parent directory for file creation

    file

    target file

    returns

    is parent dir created

  7. def createIpFileCache(ipFile: File, hash: Option[String] = None)(implicit project: ScaledaProject): Unit

    Update ip cache, extract .xcix file to (cacheDir)/(file hash).

    Update ip cache, extract .xcix file to (cacheDir)/(file hash). If targetDirectory exists and not empty, do nothing

    ipFile

    ip file, simple target ip

    hash

    optional hash, if not provided, will calculate hash from file

  8. def deleteDirectory(path: Path): Unit

    Remove a directory in recursive mode

    Remove a directory in recursive mode

    path

    must be a directory

  9. def doUpdateIpFilesCache(ipFiles: Set[String])(implicit project: ScaledaProject): Unit

    Operations to update ipFiles cache.
    1.

    Operations to update ipFiles cache.
    1. calculate ip file hash 2. remove unused cache by hash 3. update cache directory

    ipFiles

    ip files field in top.scaleda.kernel.project.config.ConfigNode (from getIpFiles)

  10. def doUpdateIpStubsCache(ips: Map[String, ProjectConfig], instances: Seq[IPInstance], stubsCacheDir: File): Unit

    Manage IP Stubs cache

    Manage IP Stubs cache

    ips

    collected ip info

    instances

    collected ip instances (context info)

    stubsCacheDir

    target dir (projectBase/.cache)

  11. def doUpdateStubCacheFromProject(implicit project: ScaledaProject): Unit

    Update stubs in ProjectConfig

  12. def doUpdateStubCacheFromRuntime(rt: ScaledaRuntime)(implicit project: ScaledaProject): Seq[File]

    Update stubs cache from runtime

    Update stubs cache from runtime

    rt

    runtime

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def getAllCachedIpHash(implicit project: ScaledaProject): Set[String]
  16. def getAllSourceFiles(sources: Set[String], suffix: Set[String] = Set("v"))(implicit project: ScaledaProject): Seq[File]

    Get all source files from a source set.

    Get all source files from a source set.

    sources

    list of paths, each item can be file or dir, empty string will be dropped

    suffix

    filter by file type

    returns

    list of files

  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  18. def getModuleFileFromSet(sources: Set[String], module: String)(implicit project: ScaledaProject): Option[File]

    Get the verilog file containing specific module from one file set

    Get the verilog file containing specific module from one file set

    sources

    file set

    module

    module name

    returns

    optional file

  19. def getModuleTitle(verilogFile: File): Seq[String]

    Get module titles inside a file.

    Get module titles inside a file.

    verilogFile

    the file

    returns

    Seq[String]: All module titles in that file

  20. def handleIpInstances(task: TaskConfig, targetDirectory: File, targetAction: Set[String])(implicit manifest: ScaledaProject): Seq[File]

    Handle IP instances, filter, do renders

    Handle IP instances, filter, do renders

    returns

    generated sources

  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  22. def insertAfterModuleHead(original: File, output: File, moduleName: String, insert: String): Int

    Insert content after module head

    Insert content after module head

    original

    file from

    output

    file to

    moduleName

    target module name

    insert

    content to insert

    returns

    line where content inserts

  23. def ipCacheDirectory(implicit project: ScaledaProject): File
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def isLegalName(s: String): Boolean

    Check whether a file name is legal.

    Check whether a file name is legal. This is also applied to project, target & task names, for they will be used to create files / directories.

    s

    the string

  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  29. def parseAsAbsolutePath(path: String)(implicit project: ScaledaProject): String

    Get absolute paths for a string based on projectBase, fallback to path itself

    Get absolute paths for a string based on projectBase, fallback to path itself

    path

    path

  30. def parseIpInDirectory(path: File): Option[ProjectConfig]

    Get ProjectConfig from IP directory

    Get ProjectConfig from IP directory

    path

    ip path

    returns

    optional ProjectConfig

  31. def parseIpParentDirectory(path: File): Map[String, ProjectConfig]
  32. def removeIpFileCache(hash: String)(implicit project: ScaledaProject): Unit

    Remove an ip cache by hash

    Remove an ip cache by hash

    hash

    ip file hash

  33. def scanDirectory(suffixing: Set[String], directory: File, level: Int = 0, maxLevel: Int = 128): Seq[File]

    Recursively scan a directory for given type of file

    Recursively scan a directory for given type of file

    suffixing

    Set of extensions

    directory

    the directory

  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def toCanonicalPath(path: String)(implicit project: ScaledaProject): Option[String]

    Convert any path into an canonical path.

    Convert any path into an canonical path. For relative path, it is calculated base on project base.
    ⚠️ Only work on same OS. Cannot process Window paths on Linux now.

    path

    the original path string

    returns

    None iff no project base AND relative path; Otherwise an canonical path will be returned

  36. def toProjectRelativePath(path: String)(implicit project: ScaledaProject): Option[String]

    Convert any path into an project relative path.
    ⚠️ Only work on same OS.

    Convert any path into an project relative path.
    ⚠️ Only work on same OS. Cannot process Window paths on Linux now.

    path

    the original path string

    returns

    None iff no project base OR path can not be relativised; Otherwise a relative path will be returned

  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped