Class: RTL::BinaryGate

Inherits:
Circuit show all
Defined in:
lib/rtl/library.rb

Direct Known Subclasses

Add, And, Div, Mul, Nand, Nor, Or, Rem, Sub, Xor

Instance Attribute Summary

Attributes inherited from Circuit

#color, #components, #father, #iname, #name, #ports, #properties, #signals

Instance Method Summary collapse

Methods inherited from Circuit

#add, #component_named, #inputs, #make_lib, #new_instance, #outputs, #port, #port_named, #to_dot, #wires

Constructor Details

#initializeBinaryGate

Returns a new instance of BinaryGate.



15
16
17
18
19
20
21
# File 'lib/rtl/library.rb', line 15

def initialize
  name=self.class.to_s.split("::").last
  super(name)
  add Port.new(:in,"i1")
  add Port.new(:in,"i2")
  add Port.new(:out,"f")
end