Module: ClassHDL::RandomNum

Included in:
Logic, Numeric, Parameter
Defined in:
lib/tdl/class_hdl/hdl_random.rb

Instance Method Summary collapse

Instance Method Details

#precent_falseObject



8
9
10
# File 'lib/tdl/class_hdl/hdl_random.rb', line 8

def precent_false
    return "($urandom_range(1,100) > #{self.to_s})".to_nq
end

#precent_trueObject



4
5
6
# File 'lib/tdl/class_hdl/hdl_random.rb', line 4

def precent_true
    return "($urandom_range(0,99) <= #{self.to_s})".to_nq
end