vertigo_vhdl 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vertigo/tb_generator.rb +10 -6
- data/lib/vertigo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb22a79a9fe6c4cfeeb9293cea9e7c08d0b70c6a220261f00476fa79200cd930
|
4
|
+
data.tar.gz: a6e30af8d8f623f1fe4f411b845f31429637a377879443be9f9231620315ece1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de3f891d744486704a4b253a00e9a19da00e1ba8a0d1716729a97ed21f010f3f41dfc1cb92824d6112c4c3256d5b61bd4478d31bec693d89c4df749c74b2715d
|
7
|
+
data.tar.gz: bf8e2e13ddfbc9f02d1037cd9bf50450643a0e17a88f9f451c09656fb294ce5508e5abaa5c4b48212b79b9c480621989f9db797c23a373c80acc52ea363c448c
|
data/lib/vertigo/tb_generator.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
module Vertigo
|
2
2
|
|
3
3
|
class TestBenchGenerator
|
4
|
+
|
4
5
|
attr_accessor :ast
|
5
6
|
attr_accessor :entity,:arch
|
6
7
|
attr_accessor :clk,:rst
|
8
|
+
attr_accessor :options
|
9
|
+
|
7
10
|
def initialize options={}
|
8
11
|
@options=options
|
9
12
|
@supplemental_libs_h=options[:supplemental_libs_h]||{}
|
@@ -17,7 +20,8 @@ module Vertigo
|
|
17
20
|
@tb_name=@entity_name+"_tb"
|
18
21
|
tb_filename=@tb_name+".vhd"
|
19
22
|
File.open(tb_filename,'w'){|f| f.puts vhdl_tb}
|
20
|
-
puts "=> generated testbench : #{tb_filename}"
|
23
|
+
puts "=> generated testbench : #{tb_filename}" unless options[:mute]
|
24
|
+
return tb_filename
|
21
25
|
end
|
22
26
|
|
23
27
|
def line n=80
|
@@ -157,27 +161,27 @@ module Vertigo
|
|
157
161
|
puts msg="ERROR : no entity found"
|
158
162
|
raise msg
|
159
163
|
end
|
160
|
-
puts "=> found entity '#{entity.name.str}'"
|
164
|
+
puts "=> found entity '#{entity.name.str}'" unless options[:mute]
|
161
165
|
@arch=ast.design_units.find{|du| du.is_a? Architecture}
|
162
166
|
if @arch.nil?
|
163
167
|
puts msg="ERROR : no architecture found"
|
164
168
|
raise msg
|
165
169
|
end
|
166
170
|
|
167
|
-
puts "=> found architecture '#{arch.name.str}'"
|
171
|
+
puts "=> found architecture '#{arch.name.str}'" unless options[:mute]
|
168
172
|
@entity_name=@entity.name.str
|
169
173
|
@arch_name=@arch.name.str
|
170
174
|
[@entity,@arch]
|
171
175
|
end
|
172
176
|
|
173
177
|
def detecting_clk_and_reset entity_arch
|
174
|
-
puts "=> detecting clock and reset"
|
178
|
+
puts "=> detecting clock and reset" unless options[:mute]
|
175
179
|
entity,arch=entity_arch
|
176
180
|
inputs=entity.ports.select{|port| port.is_a?(Input)}
|
177
181
|
@clk = inputs.sort_by{|input| levenshtein_distance(input.name.str,"clk")}.first
|
178
182
|
@rst = inputs.sort_by{|input| levenshtein_distance(input.name.str,"reset_n")}.first
|
179
|
-
puts "\t-most probable clk : #{@clk.name.str}"
|
180
|
-
puts "\t-most probable reset : #{@rst.name.str}"
|
183
|
+
puts "\t-most probable clk : #{@clk.name.str}" unless options[:mute]
|
184
|
+
puts "\t-most probable reset : #{@rst.name.str}" unless options[:mute]
|
181
185
|
@max_length_str=entity.ports.map{|port| port.name.str.size}.max
|
182
186
|
@excluded=[@clk,@rst]
|
183
187
|
@reset_name=@rst.name.str
|
data/lib/vertigo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vertigo_vhdl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Christophe Le Lann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby handwritten VHDL parser and utilities
|
14
14
|
email: jean-christophe.le_lann@ensta-bretagne.fr
|