fhlow 1.91.0 → 1.91.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.
- data/bin/fhlow +58 -10
- data/lib/module_config/complexitem.rb +57 -0
- data/lib/module_config/config.rb +5 -3
- data/lib/module_config/item.rb +0 -4
- data/lib/module_config/items/complex.rb +44 -0
- data/lib/module_config/items/complexfreqencies.rb +59 -0
- data/lib/module_config/items/complexlibrary.rb +46 -0
- data/lib/module_config/items/complexpackage.rb +47 -0
- data/lib/module_config/items/complexpins.rb +59 -0
- data/lib/module_config/items/complexunit.rb +53 -0
- data/lib/module_config/items/simple.rb +29 -0
- data/lib/module_config/items/simplearchitecture.rb +34 -0
- data/lib/module_config/items/simplebindir.rb +31 -0
- data/lib/module_config/items/simplebool.rb +24 -0
- data/lib/module_config/items/simplepostlayoutsdf.rb +24 -0
- data/lib/module_config/items/simplesimulaterun.rb +25 -0
- data/lib/module_config/items/simpleverbose.rb +33 -0
- data/lib/module_config/section.rb +16 -4
- data/lib/module_config/simpleitem.rb +37 -0
- data/lib/module_config/test.flw +33 -12
- data/lib/module_config/test.rb +54 -4
- data/lib/module_config/unittests/config_test.rb +15 -12
- data/lib/module_fhlow/leaf.rb +28 -24
- data/lib/module_fhlow/leafs/Library.rb +60 -0
- data/lib/module_fhlow/leafs/Package.rb +4 -1
- data/lib/module_fhlow/leafs/Unit.rb +9 -1
- data/lib/module_fhlow/node.rb +4 -5
- data/lib/module_fhlow/plugin.rb +11 -0
- data/lib/module_fhlow/pluginpool.rb +17 -5
- data/lib/module_fhlow/rootnode.rb +4 -3
- data/lib/plugins/Modelsim.flw +18 -0
- data/lib/plugins/Modelsim.rb +331 -0
- data/lib/plugins/Quartus.flw +5 -0
- data/lib/plugins/Quartus.rb +237 -0
- data/tests/testsuite.rb +0 -0
- metadata +84 -79
- data/lib/module_config/configitems/complex.rb +0 -71
- data/lib/module_config/configitems/complexpackage.rb +0 -67
- data/lib/module_config/configitems/complexunit.rb +0 -76
- data/lib/module_config/configitems/simple.rb +0 -56
- data/lib/module_config/configitems/simplearchitecture.rb +0 -52
- data/lib/module_config/configitems/simplepackage.rb +0 -47
- data/lib/module_config/configitems/simpleunit.rb +0 -53
- data/lib/module_config/configs.test +0 -24
- data/lib/module_config/tmp +0 -3
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configexception_rb.html +0 -647
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-complex_rb.html +0 -700
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-complexpackage_rb.html +0 -694
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-complexunit_rb.html +0 -704
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-simple_rb.html +0 -685
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-simplepackage_rb.html +0 -676
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-simpleunit_rb.html +0 -682
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-item_rb.html +0 -663
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-itemfactory_rb.html +0 -687
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-myconfig_rb.html +0 -687
- data/lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-section_rb.html +0 -692
- data/lib/module_config/unittests/coverage/index.html +0 -689
- data/lib/module_fhlow/leaf.rb~ +0 -202
- data/lib/module_fhlow/test.rb +0 -15
@@ -0,0 +1,237 @@
|
|
1
|
+
#----------------------------------------------------------------------------
|
2
|
+
#
|
3
|
+
# Copyright (C) 2007 Simon Lasselsberger
|
4
|
+
# simon.lasselsberger@fh-hagenberg.at
|
5
|
+
#
|
6
|
+
# This file is part of the _fhlow_ scripting environment.
|
7
|
+
#
|
8
|
+
# The _fhlow_ scripting environment is free software; you can redistribute
|
9
|
+
# it and/or modify it under the terms of the GNU General Public License
|
10
|
+
# as published by the Free Software Foundation; either version 2 of the
|
11
|
+
# License, or (at your option) any later version.
|
12
|
+
#
|
13
|
+
# _fhlow_ is distributed in the hope that it will be useful,
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
# GNU General Public License for more details.
|
17
|
+
#
|
18
|
+
# You should have received a copy of the GNU General Public License
|
19
|
+
# along with _fhlow_; if not, write to the Free Software
|
20
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
21
|
+
#
|
22
|
+
#----------------------------------------------------------------------------
|
23
|
+
|
24
|
+
require 'plugin'
|
25
|
+
require 'fileutils'
|
26
|
+
require 'fhlowexception'
|
27
|
+
require 'fileutils'
|
28
|
+
|
29
|
+
class Quartus < Fhlow::Plugin
|
30
|
+
|
31
|
+
def initialize(_actualLeaf, _pen, _log)
|
32
|
+
super(_actualLeaf, _pen, _log)
|
33
|
+
|
34
|
+
# default configuration values here
|
35
|
+
@verbose = @actualLeaf.conf["Quartus"]["Verbose"]
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
# this functioncall is optional
|
40
|
+
describeCmd("Plugin vor Altera Quartus.",
|
41
|
+
"Supported versions: Quartus 6.1")
|
42
|
+
|
43
|
+
|
44
|
+
# --- synthesise ---
|
45
|
+
# create an options object
|
46
|
+
synoptions = CmdParse::OptionParserWrapper.new do |opt|
|
47
|
+
opt.separator "<synthesize-options>:"
|
48
|
+
opt.on("-v", "--verbose VAL", "More output. possible values of VAL: 0, 1, 2") {|val| @verbose = val.to_i }
|
49
|
+
end
|
50
|
+
|
51
|
+
# register the subcommand
|
52
|
+
registerSubCmd(
|
53
|
+
"synthesize", # name of the subcmd
|
54
|
+
"Synthesizes the configured sources.", # short description (optional)
|
55
|
+
"Synthesizes the configured sources.", # description (optional)
|
56
|
+
synoptions # the option object (optional)
|
57
|
+
) { synthesize() } # the action which should be run when this subcmd is invoked
|
58
|
+
|
59
|
+
# --- place and route ---
|
60
|
+
# create an options object
|
61
|
+
pnroptions = CmdParse::OptionParserWrapper.new do |opt|
|
62
|
+
opt.separator "<placeandroute-options>:"
|
63
|
+
opt.on("-v", "--verbose VAL", "More output. possible values of VAL: 0, 1, 2") {|val| @verbose = val.to_i }
|
64
|
+
end
|
65
|
+
|
66
|
+
# register the subcommand
|
67
|
+
registerSubCmd(
|
68
|
+
"placeandroute", # name of the subcmd
|
69
|
+
"Runs placement and routing of configured sources.", # short description (optional)
|
70
|
+
"Runs placement and routing of configured sources.", # description (optional)
|
71
|
+
pnroptions # the option object (optional)
|
72
|
+
) { synthesize(); placeandroute(false, true)} # the action which should be run when this subcmd is invoked
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
def synthesize(_printActualLeaf=true)
|
77
|
+
initWork()
|
78
|
+
|
79
|
+
sources = @actualLeaf.getFiles("Packages") | @actualLeaf.getFiles("Units")
|
80
|
+
|
81
|
+
@pen.puts
|
82
|
+
@actualLeaf.printMe if _printActualLeaf
|
83
|
+
width = 87
|
84
|
+
|
85
|
+
@pen.seperator
|
86
|
+
|
87
|
+
begin
|
88
|
+
@pen.print ",", "-"*width,"+\n"
|
89
|
+
@pen.print "|", " Synthesis".ljust(width), "|\n"
|
90
|
+
@pen.print "+", "-"*width,"+\n"
|
91
|
+
|
92
|
+
callTool("quartus_sh") { prepareSettingsFile() }
|
93
|
+
callTool("quartus_map") { callQuartusMap(sources) }
|
94
|
+
ensure
|
95
|
+
@pen.print "`", "-"*width,"+\n"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
def placeandroute(_printActualLeaf=true, _noInitWork=false)
|
101
|
+
initWork() unless _noInitWork
|
102
|
+
|
103
|
+
sources = @actualLeaf.getFiles("Packages") | @actualLeaf.getFiles("Units")
|
104
|
+
|
105
|
+
@pen.puts if _printActualLeaf
|
106
|
+
@actualLeaf.printMe if _printActualLeaf
|
107
|
+
width = 87
|
108
|
+
|
109
|
+
@pen.seperator
|
110
|
+
|
111
|
+
begin
|
112
|
+
@pen.print ",", "-"*width,"+\n"
|
113
|
+
@pen.print "|", " Place and Route".ljust(width), "|\n"
|
114
|
+
@pen.print "+", "-"*width,"+\n"
|
115
|
+
|
116
|
+
callTool("quartus_fit") { callQuartusFit }
|
117
|
+
@pen.print "+", "-"*width,"+\n"
|
118
|
+
callTool("quartus_asm") { callQuartusAsm }
|
119
|
+
@pen.print "+", "-"*width,"+\n"
|
120
|
+
callTool("quartus_tan") { callQuartusTan }
|
121
|
+
@pen.print "+", "-"*width,"+\n"
|
122
|
+
callTool("quartus_eda") { callQuartusEda }
|
123
|
+
|
124
|
+
ensure
|
125
|
+
@pen.print "`", "-"*width,"+\n"
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# --- some private helper functions ---
|
130
|
+
private
|
131
|
+
def initWork(_vardir=@varDir, _sharedir=@shareDir)
|
132
|
+
ENV["LM_LICENSE_FILE"] = @actualLeaf.conf["Quartus"]["LicenseFile"]
|
133
|
+
|
134
|
+
FileUtils.rm_r(_vardir) if File.directory?(_vardir)
|
135
|
+
FileUtils.makedirs(_vardir)
|
136
|
+
FileUtils.makedirs(_sharedir)
|
137
|
+
end
|
138
|
+
|
139
|
+
def callTool(_toolname, &_block)
|
140
|
+
msg = _block.call
|
141
|
+
raise Fhlow::FhlowPluginException.new("Quartus"), "There were some errors while running #{_toolname}!\n Message:\n-----\n#{msg}\n-----" if $? != 0
|
142
|
+
if @verbose >= 2
|
143
|
+
|
144
|
+
msg.gsub!(/(.*successful.*)/, @pen.lightgreen+'\1'+@pen.clear)
|
145
|
+
msg.gsub!(/(.*Warning.*)/, @pen.lightyellow+'\1'+@pen.clear)
|
146
|
+
msg.gsub!(/(.*Error.*)/, @pen.lightred+'\1'+@pen.clear)
|
147
|
+
puts msg
|
148
|
+
|
149
|
+
else
|
150
|
+
msg.find_all { |line| line =~ /.*successful|Warning.*/ }.each do |str|
|
151
|
+
if str =~ /.*successful.*/
|
152
|
+
@pen.puts "| "+@pen.lightgreen+$&+@pen.clear
|
153
|
+
elsif str =~ /.*Warning.*/ and @verbose >= 1
|
154
|
+
@pen.puts "| "+@pen.lightyellow+$&+@pen.clear
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
def prepareSettingsFile()
|
161
|
+
file = File.open(@actualLeaf.getPath+"var/#{self.class.to_s}/pins.tcl", "w")
|
162
|
+
|
163
|
+
file.puts "project_new #{@actualLeaf.name} -overwrite"
|
164
|
+
@actualLeaf.conf[@target].item_each("Pins") do |signalname, pinname, pullup|
|
165
|
+
signalname.sub!(/\((\w)\)/, '[\1]')
|
166
|
+
file.puts "set_location_assignment -to #{signalname} #{pinname}"
|
167
|
+
file.puts "set_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to #{signalname}" if pullup == "true"
|
168
|
+
end
|
169
|
+
|
170
|
+
# by now only base clocks can be created
|
171
|
+
@actualLeaf.conf[@target].item_each("Frequencies") do |signalname, freqency, clockname|
|
172
|
+
signalname.sub!(/\((\w)\)/, '[\1]')
|
173
|
+
file.puts "create_base_clock -fmax #{freqency}MHz -target #{signalname} #{clockname}"
|
174
|
+
end
|
175
|
+
|
176
|
+
file.puts "set_global_assignment -name EDA_VHDL_ARCH_NAME #{@actualLeaf.getArchitectures(@actualLeaf)["Units"][0]} -section_id eda_simulation"
|
177
|
+
file.puts "set_global_assignment -name RESERVE_ALL_UNUSED_PINS \"AS INPUT TRI-STATED\""
|
178
|
+
# file.puts "set_global_assignment -name EDA_WRITER_DONT_WRITE_TOP_ENTITY ON -section_id eda_simulation"
|
179
|
+
file.puts "set_global_assignment -name EDA_MAINTAIN_DESIGN_HIERARCHY ON -section_id eda_simulation"
|
180
|
+
|
181
|
+
file.puts "project_close"
|
182
|
+
file.close
|
183
|
+
instruction = "#{@actualLeaf.conf["Quartus"]["BinDir"]}quartus_sh -t #{file.path}"
|
184
|
+
@log.debug("Quartus", "Running quartus_sh: #{instruction}")
|
185
|
+
msg = ""; runInVarDir { msg = `#{instruction} 2>&1` }
|
186
|
+
msg
|
187
|
+
end
|
188
|
+
|
189
|
+
def callQuartusMap(_src)
|
190
|
+
instruction = "#{@actualLeaf.conf["Quartus"]["BinDir"]}quartus_map #{@actualLeaf.name} "
|
191
|
+
instruction += "--source=#{_src.join(" --source=")} "
|
192
|
+
instruction += "--family=#{@actualLeaf.conf[@target]["Family"]} "
|
193
|
+
instruction += "--part=#{@actualLeaf.conf[@target]["Part"]}#{@actualLeaf.conf[@target]["Package"]}#{@actualLeaf.conf[@target]["SpeedGrade"]} "
|
194
|
+
instruction += "--set=DEVICE_FILTER_SPEED_GRADE=#{@actualLeaf.conf[@target]["SpeedGrade"]} "
|
195
|
+
@log.debug("Quartus", "Running quartus_map: #{instruction}")
|
196
|
+
msg = ""; runInVarDir { msg = `#{instruction} 2>&1` }
|
197
|
+
msg
|
198
|
+
end
|
199
|
+
|
200
|
+
def callQuartusFit()
|
201
|
+
instruction = "#{@actualLeaf.conf["Quartus"]["BinDir"]}quartus_fit #{@actualLeaf.name} "
|
202
|
+
instruction += "--part=#{@actualLeaf.conf[@target]["Part"]}#{@actualLeaf.conf[@target]["Package"]}#{@actualLeaf.conf[@target]["SpeedGrade"]} "
|
203
|
+
#instruction += "--fmax=#{@actualLeaf.conf[@target]["Frequency"]}MHz "
|
204
|
+
#instruction += "--set=RESERVE_ALL_UNUSED_PINS=\"AS INPUT TRI-STATED\" "
|
205
|
+
@log.debug("Quartus", "Running quartus_fit: #{instruction}")
|
206
|
+
msg = ""; runInVarDir { msg = `#{instruction} 2>&1` }
|
207
|
+
msg
|
208
|
+
end
|
209
|
+
|
210
|
+
def callQuartusAsm()
|
211
|
+
instruction = "#{@actualLeaf.conf["Quartus"]["BinDir"]}quartus_asm #{@actualLeaf.name}"
|
212
|
+
@log.debug("Quartus", "Running quartus_asm: #{instruction}")
|
213
|
+
msg = ""; runInVarDir { msg = `#{instruction} 2>&1` }
|
214
|
+
msg
|
215
|
+
end
|
216
|
+
|
217
|
+
def callQuartusTan()
|
218
|
+
instruction = "#{@actualLeaf.conf["Quartus"]["BinDir"]}quartus_tan #{@actualLeaf.name}"
|
219
|
+
@log.debug("Quartus", "Running quartus_tan: #{instruction}")
|
220
|
+
msg = ""; runInVarDir { msg = `#{instruction} 2>&1` }
|
221
|
+
msg
|
222
|
+
end
|
223
|
+
|
224
|
+
def callQuartusEda()
|
225
|
+
instruction = "#{@actualLeaf.conf["Quartus"]["BinDir"]}quartus_eda #{@actualLeaf.name} "
|
226
|
+
instruction += "--simulation "
|
227
|
+
instruction += "--tool=modelsim "
|
228
|
+
instruction += "--format=vhdl "
|
229
|
+
@log.debug("Quartus", "Running quartus_eda: #{instruction}")
|
230
|
+
msg = ""; runInVarDir { msg = `#{instruction} 2>&1` }
|
231
|
+
|
232
|
+
FileUtils.copy("#{@varDir}/simulation/modelsim/#{@actualLeaf.name}_vhd.sdo", "#{@shareDir}/#{@actualLeaf.name}.sdf")
|
233
|
+
FileUtils.copy("#{@varDir}/simulation/modelsim/#{@actualLeaf.name}.vho", "#{@shareDir}/net#{@actualLeaf.name}-#{@actualLeaf.getArchitectures(@actualLeaf)["Units"][0]}-ea.vhd")
|
234
|
+
msg
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
data/tests/testsuite.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,106 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.11
|
3
|
-
specification_version: 1
|
4
2
|
name: fhlow
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.91.
|
7
|
-
date: 2007-04-02 00:00:00 +02:00
|
8
|
-
summary: A working environment that speeds up and structures the design process of technology independent digital chips.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: simon.lasselsberger@fh-hagenberg.at
|
12
|
-
homepage: http://fhlow.lisuna.org
|
13
|
-
rubyforge_project: fhlow
|
14
|
-
description:
|
15
|
-
autorequire:
|
16
|
-
default_executable: fhlow
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: false
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 1.91.1
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
6
|
authors:
|
29
7
|
- Simon Lasselsberger
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-10-29 00:00:00 +01:00
|
13
|
+
default_executable: fhlow
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: simon.lasselsberger@fh-hagenberg.at
|
18
|
+
executables:
|
19
|
+
- fhlow
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files: []
|
23
|
+
|
30
24
|
files:
|
31
25
|
- bin/fhlow
|
32
|
-
- lib/module_cmdparse
|
33
|
-
- lib/module_fhlow
|
34
|
-
- lib/module_config
|
35
26
|
- lib/module_term
|
27
|
+
- lib/module_term/ansicolor.rb
|
28
|
+
- lib/module_cmdparse
|
36
29
|
- lib/module_cmdparse/cmdparse
|
37
|
-
- lib/module_cmdparse/cmdparse.rb
|
38
30
|
- lib/module_cmdparse/cmdparse/wrappers
|
39
31
|
- lib/module_cmdparse/cmdparse/wrappers/optparse.rb
|
40
|
-
- lib/
|
41
|
-
- lib/module_fhlow
|
42
|
-
- lib/module_fhlow/leaf.rb~
|
43
|
-
- lib/module_fhlow/leaf.rb
|
44
|
-
- lib/module_fhlow/test.rb
|
45
|
-
- lib/module_fhlow/pen.rb
|
46
|
-
- lib/module_fhlow/pluginpool.rb
|
47
|
-
- lib/module_fhlow/node.rb
|
32
|
+
- lib/module_cmdparse/cmdparse.rb
|
33
|
+
- lib/module_fhlow
|
48
34
|
- lib/module_fhlow/plugin.rb
|
49
35
|
- lib/module_fhlow/leaffactory.rb
|
50
|
-
- lib/module_fhlow/log.rb
|
51
36
|
- lib/module_fhlow/rootnode.rb
|
52
|
-
- lib/module_fhlow/
|
37
|
+
- lib/module_fhlow/log.rb
|
38
|
+
- lib/module_fhlow/leaf.rb
|
39
|
+
- lib/module_fhlow/leafs
|
40
|
+
- lib/module_fhlow/leafs/Library.rb
|
53
41
|
- lib/module_fhlow/leafs/Unit.rb
|
54
|
-
- lib/
|
55
|
-
- lib/
|
56
|
-
- lib/
|
57
|
-
- lib/
|
42
|
+
- lib/module_fhlow/leafs/Package.rb
|
43
|
+
- lib/module_fhlow/pen.rb
|
44
|
+
- lib/module_fhlow/fhlowexception.rb
|
45
|
+
- lib/module_fhlow/pluginpool.rb
|
46
|
+
- lib/module_fhlow/node.rb
|
47
|
+
- lib/module_config
|
58
48
|
- lib/module_config/config.rb
|
59
|
-
- lib/module_config/
|
49
|
+
- lib/module_config/simpleitem.rb
|
50
|
+
- lib/module_config/items
|
51
|
+
- lib/module_config/items/complex.rb
|
52
|
+
- lib/module_config/items/simple.rb
|
53
|
+
- lib/module_config/items/complexpins.rb
|
54
|
+
- lib/module_config/items/simpleverbose.rb
|
55
|
+
- lib/module_config/items/complexfreqencies.rb
|
56
|
+
- lib/module_config/items/complexunit.rb
|
57
|
+
- lib/module_config/items/complexpackage.rb
|
58
|
+
- lib/module_config/items/simplesimulaterun.rb
|
59
|
+
- lib/module_config/items/simplebindir.rb
|
60
|
+
- lib/module_config/items/simplearchitecture.rb
|
61
|
+
- lib/module_config/items/simplepostlayoutsdf.rb
|
62
|
+
- lib/module_config/items/complexlibrary.rb
|
63
|
+
- lib/module_config/items/simplebool.rb
|
64
|
+
- lib/module_config/test.rb
|
60
65
|
- lib/module_config/unittests
|
66
|
+
- lib/module_config/unittests/config_1_fixed.flw
|
67
|
+
- lib/module_config/unittests/config_3b.flw
|
68
|
+
- lib/module_config/unittests/config_3a.flw
|
69
|
+
- lib/module_config/unittests/config_1.flw
|
70
|
+
- lib/module_config/unittests/config_2.flw
|
71
|
+
- lib/module_config/unittests/config_test.rb
|
72
|
+
- lib/module_config/complexitem.rb
|
61
73
|
- lib/module_config/section.rb
|
62
74
|
- lib/module_config/itemfactory.rb
|
75
|
+
- lib/module_config/test.flw
|
76
|
+
- lib/module_config/configexception.rb
|
63
77
|
- lib/module_config/item.rb
|
64
|
-
- lib/
|
65
|
-
- lib/
|
66
|
-
- lib/
|
67
|
-
- lib/
|
68
|
-
- lib/
|
69
|
-
- lib/module_config/configitems/complexunit.rb
|
70
|
-
- lib/module_config/configitems/complexpackage.rb
|
71
|
-
- lib/module_config/configitems/simplearchitecture.rb
|
72
|
-
- lib/module_config/unittests/config_2.flw
|
73
|
-
- lib/module_config/unittests/config_1.flw
|
74
|
-
- lib/module_config/unittests/config_1_fixed.flw
|
75
|
-
- lib/module_config/unittests/config_test.rb
|
76
|
-
- lib/module_config/unittests/config_3a.flw
|
77
|
-
- lib/module_config/unittests/config_3b.flw
|
78
|
-
- lib/module_config/unittests/coverage
|
79
|
-
- lib/module_config/unittests/coverage/index.html
|
80
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configexception_rb.html
|
81
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-simple_rb.html
|
82
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-item_rb.html
|
83
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-itemfactory_rb.html
|
84
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-myconfig_rb.html
|
85
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-section_rb.html
|
86
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-simpleunit_rb.html
|
87
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-complex_rb.html
|
88
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-simplepackage_rb.html
|
89
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-complexpackage_rb.html
|
90
|
-
- lib/module_config/unittests/coverage/-home-simon-tmp-fhlow_v2-flw-core-lib-module_config-configitems-complexunit_rb.html
|
91
|
-
- lib/module_term/ansicolor.rb
|
78
|
+
- lib/plugins
|
79
|
+
- lib/plugins/Quartus.rb
|
80
|
+
- lib/plugins/Quartus.flw
|
81
|
+
- lib/plugins/Modelsim.rb
|
82
|
+
- lib/plugins/Modelsim.flw
|
92
83
|
- tests/testsuite.rb
|
93
|
-
|
94
|
-
|
84
|
+
has_rdoc: false
|
85
|
+
homepage: http://fhlow.lisuna.org
|
86
|
+
post_install_message:
|
95
87
|
rdoc_options: []
|
96
88
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
89
|
+
require_paths:
|
90
|
+
- lib
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: "0"
|
96
|
+
version:
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: "0"
|
102
|
+
version:
|
103
103
|
requirements: []
|
104
104
|
|
105
|
-
|
105
|
+
rubyforge_project: fhlow
|
106
|
+
rubygems_version: 1.2.0
|
107
|
+
signing_key:
|
108
|
+
specification_version: 2
|
109
|
+
summary: A working environment that speeds up and structures the design process of technology independent digital chips.
|
110
|
+
test_files: []
|
106
111
|
|
@@ -1,71 +0,0 @@
|
|
1
|
-
require 'item'
|
2
|
-
require 'itemfactory'
|
3
|
-
require 'configexception'
|
4
|
-
|
5
|
-
module Config
|
6
|
-
|
7
|
-
class ComplexFactory < ItemFactory
|
8
|
-
|
9
|
-
|
10
|
-
def ComplexFactory.match(_str)
|
11
|
-
_str.sub!(Complex.getRegex, '')
|
12
|
-
return $&
|
13
|
-
end
|
14
|
-
|
15
|
-
def ComplexFactory.create(*_args)
|
16
|
-
Complex.new(*_args)
|
17
|
-
end
|
18
|
-
|
19
|
-
def ComplexFactory.priority
|
20
|
-
11
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
class Complex < Item
|
26
|
-
@@regex = /(\w+)\s*=(\s*|[\n]*)\{((\s*.+[;][\s\n]*)*(\s*.+[;]*[\s\n]*))\}/
|
27
|
-
@@subitemregex = /\A.+\Z/
|
28
|
-
|
29
|
-
attr_reader :name
|
30
|
-
attr_reader :value
|
31
|
-
|
32
|
-
def initialize(_str)
|
33
|
-
|
34
|
-
|
35
|
-
if _str =~ @@regex
|
36
|
-
@name = $1
|
37
|
-
@value = $3.strip.split(';').each do |item|
|
38
|
-
item.strip!
|
39
|
-
raise ConfigWrongFormatException.new(self.class), "Configuration subitem <#{item}> of item <#{name}> has wrong format." unless item =~ @@subitemregex
|
40
|
-
end
|
41
|
-
else
|
42
|
-
raise ConfigWrongFormatException.new(self.class), "Configuration item <#{_str}> has wrong format."
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def merge(_complexitem)
|
47
|
-
raise ConfigMergeException.new(self.class), "Merge: Configuration items do not fit! <#{_complexitem}> is not of type #{self.class.to_s}." unless _complexitem.instance_of?(self.class)
|
48
|
-
raise ConfigMergeException.new(self.class), "Merge: Configuration items do not have the same name! <#{_complexitem.name}> vs. <#{@name}>" unless _complexitem.name == @name
|
49
|
-
|
50
|
-
@value = _complexitem.value | @value
|
51
|
-
end
|
52
|
-
|
53
|
-
def each(&block)
|
54
|
-
@value.each(&block)
|
55
|
-
end
|
56
|
-
|
57
|
-
def print
|
58
|
-
puts "<Complex>"
|
59
|
-
puts " #{@name} = {"
|
60
|
-
@value.each { |v| puts " #{v};" }
|
61
|
-
puts " }"
|
62
|
-
end
|
63
|
-
|
64
|
-
def Complex.getRegex()
|
65
|
-
@@regex
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|