Created by PIC18F on 09.02.2015.
Abstract base class of all Spinal types
Base type factory
BitVector is a family of types for storing multiple bits of information in a single value.
BitVector is a family of types for storing multiple bits of information in a single value. This type has three subtypes that can be used to model different behaviours:
The Bits type corresponds to a vector of bits that does not convey any arithmetic meaning.
The Bits type corresponds to a vector of bits that does not convey any arithmetic meaning.
val myBits1 = Bits(32 bits) val myBits2 = B(25, 8 bits) val myBits3 = B"8'xFF" val myBits4 = B"1001_0011
Bits factory used for instance by the IODirection to create a in/out Bits
Bitwise Operation
Bitwise Operation
the type which is associated with the bitwise operation
A blackbox allows the user to integrate an existing VHDL/Verilog component into the design by just specifying the interfaces.
A blackbox allows the user to integrate an existing VHDL/Verilog component into the design by just specifying the interfaces.
class Ram_1w_1r(wordWidth: Int, wordCount: Int) extends BlackBox { val generic = new Generic { val wordCount = Ram_1w_1r.this.wordCount val wordWidth = Ram_1w_1r.this.wordWidth } val io = new Bundle { val clk = in Bool val wr = new Bundle { val en = in Bool val addr = in UInt (log2Up(wordCount) bit) val data = in Bits (wordWidth bit) } val rd = new Bundle { val en = in Bool val addr = in UInt (log2Up(wordCount) bit) val data = out Bits (wordWidth bit) } } mapClockDomain(clock=io.clk) }
Create a blackBox with std_ulogic instead of std_logic
The Bool type corresponds to a boolean value (True or False)
The Bool type corresponds to a boolean value (True or False)
val myBool = Bool() myBool := False myBool := Bool(false)
Bool factory used for instance by the IODirection to create a in/out Bool
Abstract class used to create a new Component
Abstract class used to create a new Component
class MyAndGate extends Component { val io = new Bundle{ val a,b = in Bool val res = out Bool } io.res := io.a & io.b }
Created by PIC18F on 11.01.2015.
Created by PIC18F on 21.08.2014.
Node representation which contains the value of an SpinalEnumElement
Create a generic for a BlackBox
Create a generic for a BlackBox
class myMemory(sizeMem: Int) extends BlackBox{ val generic = new Generic{ val size = sizeMem } val io = new Bundle { ... } }
Base operations for numbers
Base operations for numbers
the type which is associated with the base operation
Created by PIC32F_USER on 05/06/2016.
Created by PIC32F_USER on 05/06/2016.
Created by PIC32F_USER on 05/06/2016.
Created by PIC18F on 02.02.2015.
Created by PIC on 19.05.2015.
The SInt type corresponds to a vector of bits that can be used for signed integer arithmetic.
The SInt type corresponds to a vector of bits that can be used for signed integer arithmetic.
val mySInt = SInt(8 bits) mySInt := S(4, 8 bits) + S"0000_1111" mySInt := S(4) - S"h1A"
SInt factory used for instance by the IODirection to create a in/out SInt
Base class for creating enumeration
Base class for creating enumeration
class MyEnum extends SpinalEnum(binarySequancial){ val s1, s2, s3, s4 = newElement() }
SpinalEnum contains a list of SpinalEnumElement that is the definition of an element. SpinalEnumCraft is the hardware representation of the the element.
Hardware representation of an enumeration
Definition of an element of the enumeration
Trait to define an encoding
Created by PIC18F on 21.08.2014.
The UInt type corresponds to a vector of bits that can be used for unsigned integer arithmetic.
The UInt type corresponds to a vector of bits that can be used for unsigned integer arithmetic.
val myUInt = UInt(8 bits) myUInt := U(2,8 bits) myUInt := U(2) myUInt := U"0000_0101" myUInt := U"h1A"
Define an UInt 2D point
Define an UInt 2D point
width of the x point
width of the y point
val positionOnScreen = Reg(UInt2D(log2Up(p.screenResX) bits, log2Up(p.screenResY) bits))
UInt factory used for instance by the IODirection to create a in/out UInt
Created by PIC18F on 07.01.2015.
Created by PIC18F on 07.01.2015.
Create a new Bits of a given width
Create a new Bits of a given width
Create a new Bits
Create a new Bits
Create a new Bool initialized with a boolean value
Create a new Bool initialized with a boolean value
Create a new Bool
Create a new Bool
Created by PIC18F on 08.01.2015.
Component companion
Created by PIC18F on 21.08.2014.
Created by PIC18F on 07.01.2015.
Created by PIC32F_USER on 05/01/2016.
Create a new SInt of a given width
Create a new SInt of a given width
Create a new SInt
Create a new SInt
Used to create a custom encoding
Used to create a custom encoding
object BR extends SpinalEnum{ val NE, EQ, J, JR = newElement() defaultEncoding = SpinalEnumEncoding("opt")( EQ -> 0, NE -> 1, J -> 2, JR -> 3 ) }
Create a new UInt of a given width
Create a new UInt of a given width
Create a new UInt
Create a new UInt
Binary One hot encoding
Binary One hot encoding
000, 010, 100
Binary Sequential
Binary Sequential
000, 001, 010, 011, 100, 101, ....
Inferred encoding
Native encoding
Create a Ulogic tag used by Blackbox in order to transform std_logic into std_ulogic
Use cloneable instead