Constant - Easy way to instantiate constants
netOne <= One ( 2 ) net8 <= "8"
These functions simplify the way to instanciate constants.
One
andZero
permits to initialise all the bits of a net to 'one' or 'zero'.
One
and Zero
:
n
: the arity of the net
class essai ( Model ) : def Interface ( self ) : self.Ones = SignalOut ( "ones", 2 ) self.Zeros = SignalOut ( "zeros", 4 ) self.Eight = SignalOut ( "eight", 4 ) self.Twentu = SignalOut ( "twenty", 5 ) self.Two = SignalOut ( "two", 5 ) self.Vdd = VddIn ( "vdd" ) self.Vss = VssIn ( "vss" ) def Netlist ( self ) : self.Ones <= One ( 2 ) self.Zero <= Zero ( 4 ) self.Eight <= "8" self.Twenty <= "0x14" self.Two <= "0b10"
Some errors may occur :
[Stratus ERROR] Const :
the argument must be a string representing a number in decimal,
binary (0b) or hexa (0x).
Introduction Netlist Instanciation of a multiplexor Instanciation of a shifter Instanciation of a register Boolean operations Arithmetical operations Comparison operations
Sophie BELLOEIL