ecic 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1529013358fa74fc927995546738340500b80fcc80aaf96155a761a6696dbf4
4
- data.tar.gz: 75a1426a8775b5d267ea9df4f3d32af6ab7f7f87dbbc37ae062f47d8a048ef4c
3
+ metadata.gz: 2227c73d15fbf63a514a2cc236f1162e90215ebc30a703b9f36dc99b1289a57e
4
+ data.tar.gz: 60e8e2010800a08549c8a96b1d173d491352e7dce15fa54d1cac00ee32393924
5
5
  SHA512:
6
- metadata.gz: 9723f99531c5ef0d17d79360f647ca2f8c24329041c44adf7e769f8b0e09f9b3315694421eb736ba9355f7a2af530c9b23f445ce97e9dc9149eef5ab52597e4b
7
- data.tar.gz: 5afaeb4239982741957301afcc184386d1db04701c6fce5f026b8389bc332b8b18c12a760c1364811ad9d38d7c88ee7cf8488be389756ecb3e7032186d540749
6
+ metadata.gz: 3614ce591502c236baff92a49a616dc2112690ab8b26e93cd8220e216a159642fd830f38415f41240c6cf2b27882044c9896c442da8402c3bbc0397ed56cb4b8
7
+ data.tar.gz: 44854b5887f98249e5454adc925ca964f93f09912fd22fa6c8785b6e7c4f513c1e01b133adb7d041c5ed6517be844bef89028a99179d86fadaf3bd39148e4dc1
@@ -22,7 +22,6 @@ module Ecic
22
22
 
23
23
  def copy_rtl_templates
24
24
  base_name = "#{@library.path}/#{@design_name}"
25
- @include_types_pkg ||= false
26
25
  if @include_types_pkg
27
26
  template("src/design/lib/pkg_types.vhd.tt", "#{base_name}-pkg_types.vhd")
28
27
  end
@@ -32,16 +31,14 @@ module Ecic
32
31
  end
33
32
 
34
33
  def update_src_list
35
- src_file = "#{@library.path}/sources.rb"
34
+ src_file = File.join(destination_root,"#{@library.path}/sources.rb")
36
35
  create_file src_file unless File.exists?(src_file)
37
- @include_types_pkg ||= false
38
- #TBA: update these cals to 'Pathname'
39
36
  if @include_types_pkg
40
- append_to_file(src_file, "source_file('#{@design_name}-pkg_types.vhd')\n"
37
+ append_to_file(src_file, "source_file('#{@design_name}-pkg_types.vhd')\n")
41
38
  end
42
- append_to_file(src_file, "source_file('#{@design_name}-pkg_comp.vhd')\n"
43
- append_to_file(src_file, "source_file('#{@design_name}-ent.vhd')\n"
44
- append_to_file(src_file, "source_file('#{@design_name}-arc_rtl.vhd')\n"
39
+ append_to_file(src_file, "source_file('#{@design_name}-pkg_comp.vhd')\n")
40
+ append_to_file(src_file, "source_file('#{@design_name}-ent.vhd')\n")
41
+ append_to_file(src_file, "source_file('#{@design_name}-arc_rtl.vhd')\n")
45
42
  end
46
43
 
47
44
  end
@@ -83,7 +83,7 @@ module Ecic
83
83
  names.each { |design_name|
84
84
  incl_types_pkg = options[:types_package]
85
85
  if type == 'vhdl'
86
- incl_types_pkg = yes?("Would you like to include a package for type and constant definitions for '#{design_name}'? [y/n]: ") if incl_types_pkg.nil?
86
+ incl_types_pkg = yes?("Would you like to include a package for type and constant definitions for '#{design_name}'? [y/N]: ") if incl_types_pkg.nil?
87
87
  else
88
88
  incl_types_pkg ||= false
89
89
  if incl_types_pkg
@@ -91,7 +91,6 @@ module Ecic
91
91
  exit(3)
92
92
  end
93
93
  end
94
- #Tba
95
94
  if type == 'vhdl'
96
95
  generator = DesignGenerator.new
97
96
  generator.include_types_pkg = incl_types_pkg
@@ -22,7 +22,7 @@ module Ecic::LibraryCreationHelper
22
22
  generator.destination_root = library.project.root
23
23
  generator.library = library
24
24
  generator.invoke_all
25
- library.save
25
+ library.create
26
26
  else
27
27
  return false
28
28
  end
@@ -32,7 +32,7 @@ module Ecic::LibraryCreationHelper
32
32
 
33
33
  def must_create_new_library?(library)
34
34
  return true if @always_create_library
35
- options = "[Ynaq]"
35
+ options = "[Ynaqh]"
36
36
  loop do
37
37
  answer = ask(
38
38
  %[#{library.type.to_s.capitalize} library '#{library.name}' does not exist. Create it? (enter "h" for help) #{options}],
@@ -58,11 +58,11 @@ module Ecic::LibraryCreationHelper
58
58
  end
59
59
 
60
60
  def library_creation_help
61
- puts "Options:"
62
- puts " Yes : Create the library (default)"
63
- puts " No : Continue without creating the library"
64
- puts " All : Create the library (and any additional libraries)"
65
- puts " Quit : Abort operation"
61
+ puts " Y - yes, create the library (default)"
62
+ puts " n - no, continue without creating the library"
63
+ puts " a - all, create this library (and any other)"
64
+ puts " q - quit, abort"
65
+ puts " h - help, show this help"
66
66
  end
67
67
 
68
68
  def is?(value) #:nodoc:
@@ -30,7 +30,7 @@ module Ecic
30
30
  end
31
31
  end
32
32
 
33
- def save
33
+ def create
34
34
  validate_name
35
35
  @project.add_library self
36
36
  end
@@ -31,7 +31,7 @@ module Ecic
31
31
  cmd = "design_library('#{@library.name}', :path => '#{@library.path}')"
32
32
  end
33
33
  end
34
- append_to_file 'src/config/libraries.rb', "#{cmd}\n"
34
+ append_to_file 'src/config/libraries.rb', "#{cmd}.create\n"
35
35
  end
36
36
 
37
37
  end
@@ -65,16 +65,12 @@ module Ecic
65
65
 
66
66
  #Function used in src/confic/libraries.rb
67
67
  def design_library(name, options={})
68
- lib = Library.new(self, name, :design, options)
69
- lib.save
70
- lib
68
+ Library.new(self, name, :design, options)
71
69
  end
72
70
 
73
71
  #Function used in src/confic/libraries.rb
74
72
  def testbench_library(name, options={})
75
- lib = Library.new(self, name, :testbench, options)
76
- lib.save
77
- lib
73
+ Library.new(self, name, :testbench, options)
78
74
  end
79
75
 
80
76
  def load_sources
@@ -16,7 +16,7 @@ module Ecic
16
16
  end
17
17
 
18
18
  def update_src_list
19
- src_file = "#{@library.path}/sources.rb"
19
+ src_file = File.join(destination_root,"#{@library.path}/sources.rb")
20
20
  create_file src_file unless File.exists?(src_file)
21
21
  append_to_file src_file, "source_file('#{@design_name}.sv')\n"
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module Ecic
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Torben Fox Jacobsen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-28 00:00:00.000000000 Z
11
+ date: 2018-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor