origen_verilog 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b7dad778fe01bd22327effb341d610473fa6055
4
- data.tar.gz: fb333cbca3fe65cd169c8f09649249dd513082f6
3
+ metadata.gz: 04b3e2c736fb06dd06fe0bbe6a4a4a163f2575a1
4
+ data.tar.gz: 0c8bedd2f0affdcbfda380df15c908526bdea19e
5
5
  SHA512:
6
- metadata.gz: 407c5b505e66c4f1b351862e200ee6c328882a98f87948431d3564031f5bbd2b0d57d6c3b962870ba1f59f591ae218339cc872eeabe02e3544cc51ebaf133e7a
7
- data.tar.gz: da51975ae2e00244dd8f2b930a85c1ae9cd301057c8b419af007d03754f9c7717484f8f0ad2ab5d94a130ba709d89a9ab898ed5c86017054308bd72030a6276a
6
+ metadata.gz: e1db9eb4f61f6a0da81ebc37413dfa29d7e65832ba7d238b3d7289e7d4a4075b3b9760fb803861f90ade87acb6fb84b87d497f23e82517a46d92209edf271401
7
+ data.tar.gz: 5e796d72ba3897164b6f3c8f8dbff605217444b9fbf8754c47e951f17514fed8127acdaea3ea180d1630e196eb82cb06d554266133a064e3583f93b494682323
@@ -1,6 +1,6 @@
1
1
  module OrigenVerilog
2
2
  MAJOR = 0
3
- MINOR = 4
3
+ MINOR = 5
4
4
  BUGFIX = 0
5
5
  DEV = nil
6
6
 
@@ -3,6 +3,15 @@ require 'origen_verilog/node'
3
3
  module OrigenVerilog
4
4
  class Parser
5
5
  def self.parse_file(path, options = {})
6
+ if !File.exist?(path) && options[:source_dirs]
7
+ dir = Array(options[:source_dirs]).find do |dir|
8
+ File.exist?(File.join(dir, path))
9
+ end
10
+ path = File.join(dir, path) if dir
11
+ end
12
+ unless File.exist?(path)
13
+ fail "File could not be found in the current dir, or any of the source dirs: #{path}"
14
+ end
6
15
  parse(File.read(path), options.merge(file: path))
7
16
  end
8
17
 
@@ -8,6 +8,7 @@ module OrigenVerilog
8
8
  @name = options[:ast].to_a[0]
9
9
 
10
10
  options[:ast].pins.each do |node|
11
+ node = node.evaluate # Resolve any functions in the ranges
11
12
  if node.type == :input_declaration
12
13
  direction = :input
13
14
  elsif node.type == :ouput_declaration
@@ -68,7 +68,7 @@ module OrigenVerilog
68
68
  unless type == :module_declaration
69
69
  fail 'Currently only modules support the to_model method'
70
70
  end
71
- Origen.target.temporary = -> { TopLevel.new(ast: evaluate) }
71
+ Origen.target.temporary = -> { TopLevel.new(ast: self) }
72
72
  Origen.load_target
73
73
  end
74
74
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_verilog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-18 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast