Eq/Ne : Easy way to test the value of the nets
netOut <= net.Eq ( "n" )
Comparaison functions are listed below :
Eq
: returns true
if the value of the net is equal to n
.
Ne
: returns true
if the value of the net is different from n
.
SetComp
method.
The constant given as argument must be a string representing :
class essai ( Model ) : def Interface ( self ) : self.A = SignalIn ( "a", 4 ) self.S = SignalOut ( "s", 1 ) self.T = SignalOut ( "t", 1 ) self.vdd = VddIn ( "vdd" ) self.vss = VssIn ( "vss" ) def Netlist ( self ) : self.S <= self.A.Eq ( "4" ) self.T <= self.A.Ne ( "1" )
Some errors may occur :
[Stratus ERROR] Eq :
the number does not match with the net's lenght.
[Stratus ERROR] Eq :
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 Instanciation of constants Boolean operations Arithmetical operations
Sophie BELLOEIL