All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spinal.lib.Misc.scala Maven / Gradle / Ivy

package spinal.lib

import spinal.core._

class BoolPimped(pimped : Bool){

  //Warning, there is no overflow protection
  def genEvent : Event = {
    val e = Event
    val reg = RegInit(False)

    reg := (reg | pimped) & !e.ready
    e.valid := pimped | reg

    e
  }
}

/**
 * Endianness enumeration
 */
sealed trait Endianness
/** Little-Endian */
object LITTLE extends Endianness
/** Big-Endian */
object BIG    extends Endianness




© 2015 - 2025 Weber Informatics LLC | Privacy Policy