Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions grammars/verilog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7375,9 +7375,9 @@ def _nt_time_declaration
module NetType0
def to_ast
if text_value == "wire real" || text_value == 'wreal'
"real"
n(:real)
else
text_value
n(text_value.to_sym)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions grammars/verilog.treetop
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,9 @@ module OrigenVerilog
"uwire" / "wire" / "wand" / "wor") {
def to_ast
if text_value == "wire real" || text_value == 'wreal'
"real"
n(:real)
else
text_value
n(text_value.to_sym)
end
end
}
Expand Down
5 changes: 2 additions & 3 deletions lib/origen_verilog/verilog/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ def pins(options = {})
wreals = self.wreals.map { |n| n.to_a.last }
subset = []
pins.each do |pin|
attrs = pin.to_a
if attrs.include?('real') || wreals.include?(attrs.last)
if pin.find(:real) || wreals.include?(pin.to_a.last)
subset << pin if options[:analog]
else
subset << pin if options[:digital]
Expand All @@ -82,7 +81,7 @@ def pins(options = {})
def wreals
find_all(:non_port_module_item)
.map { |item| item.find(:net_declaration) }
.select { |net| net.to_a.include?('real') }
.select { |net| net.find(:real) }
end

# Evaluates all functions and turns numbers into Ruby literals
Expand Down
1 change: 1 addition & 0 deletions spec/dut_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@
dut.pin(:vdd).type.should == :analog
dut.pin(:vddc).type.should == :analog
dut.pin(:vddf).type.should == :analog
dut.has_pin?(:real).should == false
end
end