cross_origen 1.2.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +2 -3
- data/lib/cross_origen/ip_xact.rb +14 -7
- data/lib/cross_origen_dev/dut.rb +4 -0
- data/templates/web/examples/ip_xact_export.md.erb +1 -1
- data/templates/web/examples/ip_xact_export_1685_2009.md.erb +32 -0
- data/templates/web/examples.md.erb +2 -1
- data/templates/web/index.md.erb +4 -2
- metadata +8 -9
- data/bin/fix_my_workspace +0 -100
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35a60a3e6d7c885124b967554e3a15c32a7d8ea620d2aacd34e36b1ce099ef43
|
4
|
+
data.tar.gz: f6741edebdbd6550bab8daeeeefcda732d888ad3375607adb8e39ab0a4d34f2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15a36522acdd01ff0f5511257a086a86bd4c88e34dac9519a07a0e8d60d6eccb2cc9dffe26c95a5c861a0c76f569bb0e7643e6ec4c33c77fc74fb8535156f990
|
7
|
+
data.tar.gz: 1c55b07316700190e8b4cc6dbe03171dbaf94722429c667115cc1ac4d738edba2df75b3c8da465baac0b4fbbc6bb375e4170b9e9078c6ed595c93554ea39bc02
|
data/config/version.rb
CHANGED
data/lib/cross_origen/ip_xact.rb
CHANGED
@@ -137,7 +137,7 @@ module CrossOrigen
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
model.export(filename, include_timestamp: CrossOrigen.include_timestamp?)
|
140
|
-
owner.import(filename)
|
140
|
+
owner.import(filename, options)
|
141
141
|
end
|
142
142
|
|
143
143
|
def doc(path, options = {})
|
@@ -168,6 +168,7 @@ xsi:schemaLocation="$REGMEM_HOME/builder/ipxact/schema/ipxact
|
|
168
168
|
# :bus_interface = only 'AMBA3' supported at this time
|
169
169
|
# :mmap_name = Optionally set the memoryMap name to something other than the module name
|
170
170
|
# :mmap_ref = memoryMapRef name, ex: 'UserMap'
|
171
|
+
# :addr_block_name = addressBlock -> Name, ex: 'ATX'
|
171
172
|
def owner_to_xml(options = {})
|
172
173
|
require 'nokogiri'
|
173
174
|
|
@@ -257,7 +258,11 @@ xsi:schemaLocation="$REGMEM_HOME/builder/ipxact/schema/ipxact
|
|
257
258
|
spirit.addressBlock do
|
258
259
|
# When registers reside at the top level, do not assign an address block name
|
259
260
|
if sub_block == owner
|
260
|
-
|
261
|
+
if options[:addr_block_name].nil?
|
262
|
+
spirit.name nil
|
263
|
+
else
|
264
|
+
spirit.name options[:addr_block_name]
|
265
|
+
end
|
261
266
|
else
|
262
267
|
spirit.name address_block_name(domain_name, sub_block)
|
263
268
|
end
|
@@ -324,9 +329,8 @@ xsi:schemaLocation="$REGMEM_HOME/builder/ipxact/schema/ipxact
|
|
324
329
|
# greatly between devices, allow the user to provide an abs_path value
|
325
330
|
# and define "full_reg_path" to assist.
|
326
331
|
#
|
327
|
-
# When registers reside at the top level
|
328
|
-
|
329
|
-
if reg.owner.top_level? == true
|
332
|
+
# When registers reside at the top level without a specified path, use 'top'.
|
333
|
+
if reg.owner.path.nil? || reg.owner.path.empty?
|
330
334
|
regpath = 'top'
|
331
335
|
else
|
332
336
|
regpath = reg.owner.path
|
@@ -406,7 +410,11 @@ xsi:schemaLocation="$REGMEM_HOME/builder/ipxact/schema/ipxact
|
|
406
410
|
end
|
407
411
|
# Assume byte addressing if not specified
|
408
412
|
if owner.methods.include?(:lau) == false
|
409
|
-
|
413
|
+
if methods.include?(:lau) == true
|
414
|
+
spirit.addressUnitBits lau
|
415
|
+
else
|
416
|
+
spirit.addressUnitBits 8
|
417
|
+
end
|
410
418
|
else
|
411
419
|
spirit.addressUnitBits owner.lau
|
412
420
|
end
|
@@ -423,7 +431,6 @@ xsi:schemaLocation="$REGMEM_HOME/builder/ipxact/schema/ipxact
|
|
423
431
|
#
|
424
432
|
builder.to_xml(save_with: Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS |
|
425
433
|
Nokogiri::XML::Node::SaveOptions::FORMAT)
|
426
|
-
# builder.to_xml
|
427
434
|
end
|
428
435
|
|
429
436
|
private
|
data/lib/cross_origen_dev/dut.rb
CHANGED
@@ -70,6 +70,10 @@ module CrossOrigenDev
|
|
70
70
|
# 0 | Clock is the externally supplied bus clock bus_clk
|
71
71
|
# 1 | Clock is the internal oscillator from the hardblock
|
72
72
|
bit 15, :osch, reset: 1, access: :rw
|
73
|
+
# **Divider Value**
|
74
|
+
#
|
75
|
+
# Used to set clock divider value and test multi-bit import in CrossOrigen
|
76
|
+
bits 3..0, :div
|
73
77
|
end
|
74
78
|
|
75
79
|
# **Access Type Test Register**
|
@@ -0,0 +1,32 @@
|
|
1
|
+
% render "layouts/basic.html", tab: :examples do
|
2
|
+
|
3
|
+
## IP-XACT Export (IEEE 1685-2009)
|
4
|
+
|
5
|
+
This page shows IEEE 1685-2009 IP-XACT formatted XML that has been generated from an Origen
|
6
|
+
representation of a module.
|
7
|
+
|
8
|
+
The exporter has the following options:
|
9
|
+
|
10
|
+
* **:format** - nil by default, can be set to :uvm to include the associated vendor
|
11
|
+
extentions
|
12
|
+
* **:include_bit_field_values** - true by default, when false the bit field values
|
13
|
+
fields will not be output
|
14
|
+
* **:schema** - nil by default, which assumes a Spirit 1.4 format. '1685-2009' is also supported.
|
15
|
+
* **:mmap_name** - nil by default, can be set to any string name for the memory map name.
|
16
|
+
* **:mmap_ref** - nil by default, can be set to any string name for the memory map reference used by a downstream tool.
|
17
|
+
* **:vendor** - nil by default, can be set to any string name for the company name.
|
18
|
+
* **:library** - nil by default, can be set to any string name for the library used by a downstream tool (ex: Magillem XML -> UVM conversion)
|
19
|
+
%#* **:name** - nil by default, can be set to any string name for the an overall device/model name.
|
20
|
+
%#* **:bus_interface** - nil by default, can be set to 'AMBA3' for an AMBA3 bus interface.
|
21
|
+
|
22
|
+
For this example, targeting CrossOrigen's target/debug.rb, the code to generate this page is:
|
23
|
+
|
24
|
+
~~~eruby
|
25
|
+
<%= "<" + "%= $dut.to_ip_xact :format => :uvm, :schema=> '1685-2009', :mmap_name => 'RegisterMap', :vendor => 'origen-sdk.org', :library => 'id', :mmap_ref => 'test' %" + ">" %>
|
26
|
+
~~~
|
27
|
+
|
28
|
+
~~~xml
|
29
|
+
<%= $dut.to_ip_xact :format => :uvm, :schema=> '1685-2009', :mmap_name => 'RegisterMap', :vendor => 'origen-sdk.org', :library => 'id', :mmap_ref => 'test' %>
|
30
|
+
~~~
|
31
|
+
|
32
|
+
% end
|
@@ -6,7 +6,8 @@ The following examples are available which are used for testing but
|
|
6
6
|
also provide some code examples of how to use the plugin for the various
|
7
7
|
supported formats:
|
8
8
|
|
9
|
-
* [IP-XACT Export](<%= path "examples/ip_xact_export" %>)
|
9
|
+
* [Spirit 1.4 IP-XACT Export](<%= path "examples/ip_xact_export" %>)
|
10
|
+
* [IEEE 1685-2009 IP-XACT Export](<%= path "examples/ip_xact_export_1685_2009" %>)
|
10
11
|
* [RALF Export](<%= path "examples/ralf_export" %>)
|
11
12
|
* [Origen Export](<%= path "examples/origen_export" %>)
|
12
13
|
|
data/templates/web/index.md.erb
CHANGED
@@ -35,7 +35,7 @@ Currently the following formats are supported:
|
|
35
35
|
* CMSIS-SVD - Import registers and hierarchy
|
36
36
|
* RALF (Synopsys format) - Export registers
|
37
37
|
|
38
|
-
See the [
|
38
|
+
See the [Examples](<%= path "examples" %>) for format specific documentation, but
|
39
39
|
most formats should follow this basic structure...
|
40
40
|
|
41
41
|
#### Data Import
|
@@ -100,7 +100,9 @@ and then compiled through Origen:
|
|
100
100
|
<%= "<" + "%= $dut.to_ip_xact %" + ">" %>
|
101
101
|
~~~
|
102
102
|
|
103
|
-
|
103
|
+
Please explore the [Examples](<%= path "examples" %>) page to see the differences between Spirit 1.4 and IEEE 1685-2009 IP-XACT export settings.
|
104
|
+
|
105
|
+
In the future, support may be added to export directly to a 3rd party tool if
|
104
106
|
it provides such an API.
|
105
107
|
|
106
108
|
### How To Setup a Development Environment
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cross_origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.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:
|
11
|
+
date: 2022-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -16,26 +16,26 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.59.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.59.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sanitize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '4.0'
|
41
41
|
description:
|
@@ -45,7 +45,6 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- bin/fix_my_workspace
|
49
48
|
- config/application.rb
|
50
49
|
- config/boot.rb
|
51
50
|
- config/commands.rb
|
@@ -72,6 +71,7 @@ files:
|
|
72
71
|
- templates/web/example.md.erb
|
73
72
|
- templates/web/examples.md.erb
|
74
73
|
- templates/web/examples/ip_xact_export.md.erb
|
74
|
+
- templates/web/examples/ip_xact_export_1685_2009.md.erb
|
75
75
|
- templates/web/examples/origen_export.md.erb
|
76
76
|
- templates/web/examples/ralf_export.md.erb
|
77
77
|
- templates/web/index.md.erb
|
@@ -96,8 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: 1.8.11
|
98
98
|
requirements: []
|
99
|
-
|
100
|
-
rubygems_version: 2.7.7
|
99
|
+
rubygems_version: 3.1.4
|
101
100
|
signing_key:
|
102
101
|
specification_version: 4
|
103
102
|
summary: Translators for importing and exporting Origen data to/from 3rd party formats
|
data/bin/fix_my_workspace
DELETED
@@ -1,100 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
$VERBOSE = nil # Don't care about world writable dir warnings and the like
|
3
|
-
|
4
|
-
if $_fix_my_workspace_version_check
|
5
|
-
$_fix_my_workspace_version = '0.7.0'
|
6
|
-
else
|
7
|
-
if File.exist?(File.expand_path('../../lib/origen.rb', __FILE__))
|
8
|
-
# If this script is being run from within an origen-core workspace, use that Origen-core,
|
9
|
-
# not the system-installed origen-core version.
|
10
|
-
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
|
11
|
-
require 'origen'
|
12
|
-
else
|
13
|
-
# Use system-installed Origen (the gem in system Ruby)
|
14
|
-
require 'origen'
|
15
|
-
end
|
16
|
-
|
17
|
-
if !Origen.site_config.gem_manage_bundler
|
18
|
-
puts 'Sorry but you have opted to manage Bundler yourself via your Origen site config, and this means'
|
19
|
-
puts 'that I cannot make certain assumptions about how your workspace is configured.'
|
20
|
-
puts 'You will need to either resolve this problem yourself, or else change the value of'
|
21
|
-
puts 'gem_mange_bundler to true.'
|
22
|
-
puts 'See here for more details on how to do that: http://origen-sdk.org/origen/guides/starting/company/'
|
23
|
-
|
24
|
-
else
|
25
|
-
ENV['BUNDLE_GEMFILE'] = File.join(Origen.root, 'Gemfile')
|
26
|
-
ENV['BUNDLE_PATH'] = File.expand_path(Origen.site_config.gem_install_dir)
|
27
|
-
ENV['BUNDLE_BIN'] = File.join(Origen.root, 'lbin')
|
28
|
-
|
29
|
-
# Force copy system gems to local gems
|
30
|
-
if Origen.site_config.gem_use_from_system
|
31
|
-
local_gem_dir = "#{ENV['BUNDLE_PATH']}/ruby/#{Pathname.new(Gem.dir).basename}"
|
32
|
-
gem_dir = Pathname.new(Gem.dir)
|
33
|
-
|
34
|
-
Origen.site_config.gem_use_from_system.each do |gem, version|
|
35
|
-
begin
|
36
|
-
# This will raise an error if the system doesn't have this gem installed, that
|
37
|
-
# will be rescued below
|
38
|
-
spec = Gem::Specification.find_by_name(gem, version)
|
39
|
-
|
40
|
-
local_dir = File.join(local_gem_dir, Pathname.new(spec.gem_dir).relative_path_from(gem_dir))
|
41
|
-
FileUtils.mkdir_p local_dir
|
42
|
-
FileUtils.cp_r("#{spec.gem_dir}/.", local_dir)
|
43
|
-
|
44
|
-
local_file = Pathname.new(File.join(local_gem_dir, Pathname.new(spec.cache_file).relative_path_from(gem_dir)))
|
45
|
-
FileUtils.mkdir_p local_file.dirname
|
46
|
-
FileUtils.cp(spec.cache_file, local_file)
|
47
|
-
|
48
|
-
if spec.extension_dir && File.exist?(spec.extension_dir)
|
49
|
-
local_dir = File.join(local_gem_dir, Pathname.new(spec.extension_dir).relative_path_from(gem_dir))
|
50
|
-
FileUtils.mkdir_p local_dir
|
51
|
-
FileUtils.cp_r("#{spec.extension_dir}/.", local_dir)
|
52
|
-
end
|
53
|
-
|
54
|
-
local_file = Pathname.new(File.join(local_gem_dir, Pathname.new(spec.spec_file).relative_path_from(gem_dir)))
|
55
|
-
FileUtils.mkdir_p local_file.dirname
|
56
|
-
FileUtils.cp(spec.spec_file, local_file)
|
57
|
-
|
58
|
-
rescue Gem::LoadError
|
59
|
-
# This just means that one of the gems that should be copied from the system
|
60
|
-
# was not actually installed in the system, so nothing we can do about that here
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# Delete lbin
|
66
|
-
FileUtils.rm_rf(ENV['BUNDLE_BIN']) if File.exist?(ENV['BUNDLE_BIN'])
|
67
|
-
|
68
|
-
# Run bundler with correct switches
|
69
|
-
cmd = "bundle install --gemfile #{ENV['BUNDLE_GEMFILE']} --binstubs #{ENV['BUNDLE_BIN']} --path #{ENV['BUNDLE_PATH']}"
|
70
|
-
`chmod o-w #{Origen.root}` # Stops some annoying world writable warnings during install
|
71
|
-
`chmod o-w #{Origen.root}/bin` if File.exist?("#{Origen.root}/bin")
|
72
|
-
`chmod o-w #{Origen.root}/.bin` if File.exist?("#{Origen.root}/.bin")
|
73
|
-
|
74
|
-
# Try again, this time updating the bundle
|
75
|
-
if system(cmd)
|
76
|
-
fixed = true
|
77
|
-
elsif system 'bundle update'
|
78
|
-
fixed = true
|
79
|
-
end
|
80
|
-
|
81
|
-
if File.exist?(ENV['BUNDLE_BIN'])
|
82
|
-
`chmod o-w #{ENV['BUNDLE_BIN']}`
|
83
|
-
|
84
|
-
# Make .bat versions of all executables, Bundler should really be doing this when running
|
85
|
-
# on windows
|
86
|
-
if Origen.os.windows?
|
87
|
-
Dir.glob("#{ENV['BUNDLE_BIN']}/*").each do |bin|
|
88
|
-
unless bin =~ /.bat$/
|
89
|
-
bat = "#{bin}.bat"
|
90
|
-
unless File.exist?(bat)
|
91
|
-
File.open(bat, 'w') { |f| f.write('@"ruby.exe" "%~dpn0" %*') }
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
system 'origen -v' if fixed
|
99
|
-
end
|
100
|
-
end
|