lib/HDLRuby/hruby_verilog.rb in HDLRuby-2.2.16 vs lib/HDLRuby/hruby_verilog.rb in HDLRuby-2.2.17
- old
+ new
@@ -1628,12 +1628,20 @@
end
# If it is signed, it outputs signed.
# Enhance Type with generation of verilog code.
class Type
- # Converts the system to Verilog code.
+ # Converts the type to Verilog code.
def to_verilog
return self.name == :signed ? "#{self.name.to_s} " : ""
+ end
+end
+
+# Replace type by refered type.
+class TypeDef
+ # Converts the type to verilog code.
+ def to_verilog
+ return self.def.to_verilog
end
end
# Use it when collecting.
class Concat