rvvm 1.1.0 → 1.2.0
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 +4 -4
- data/CHANGELOG.md +23 -1
- data/lib/rvvm/crayons.rb +7 -2
- data/lib/rvvm/templates.rb +1 -0
- data/lib/rvvm/version.rb +1 -1
- data/lib/rvvm.rb +32 -26
- 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: bdb2b96ce09d030dc59c5bc426673d5208aaba4ce8aa4b097179d62cdaa2dc17
|
4
|
+
data.tar.gz: 37576dcfb35c64353383518a8c8ef496e4930a76acd2f3ba3bcfb3dcb45e4a1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af7c4f03fd70b8eca2f5da78d0e02d67d777aa04d95b166c07f7fe625ba46ae053141e4e7664d352fc2e02c95c11a30ba3501a87cfcbaa00f8ba7bd51dcee1aa
|
7
|
+
data.tar.gz: b0c520fae9157b3d6a20593b0d3ed44baff1c967d734ebe6e1012c58fca1d71c63a218550f64a88aed8232d75bb49cb41b70c58b1967b30fc38a1a73fa5799c7
|
data/CHANGELOG.md
CHANGED
@@ -156,7 +156,6 @@
|
|
156
156
|
## TBI:
|
157
157
|
|
158
158
|
1. Elaboration and simulation custom waveform trace dump file
|
159
|
-
2. Project template files regeneration/restoration to default
|
160
159
|
3. Crayon module tests
|
161
160
|
4. RBS definitions
|
162
161
|
|
@@ -171,3 +170,26 @@
|
|
171
170
|
### Fixed:
|
172
171
|
|
173
172
|
1. More Crayons rendering bugs
|
173
|
+
|
174
|
+
## [1.2.0] - 2024-09-19
|
175
|
+
|
176
|
+
### Added:
|
177
|
+
|
178
|
+
1. Cyayons.command exception handling
|
179
|
+
2. Flags for itf, pkg and svfile template generation
|
180
|
+
3. Custom DPI-C library for elaboration
|
181
|
+
|
182
|
+
### Fixed
|
183
|
+
|
184
|
+
1. More rendering bugs
|
185
|
+
2. Package template not being generated under <prj root>/design/pkg by default
|
186
|
+
3. DPI-C compilation using invalid command
|
187
|
+
4. Script crash on trying to execute a missing shell command
|
188
|
+
5. Script crashing on trying to open non existent coverage report
|
189
|
+
|
190
|
+
### TBI
|
191
|
+
|
192
|
+
1. Custom waveform dump file name for elaboration and simulation
|
193
|
+
2. RVvM config file versions and regeneration
|
194
|
+
3. Exit on failing compilation/elaboration/simulation
|
195
|
+
|
data/lib/rvvm/crayons.rb
CHANGED
@@ -85,7 +85,6 @@ module Crayons
|
|
85
85
|
|
86
86
|
print "\r\e[K"
|
87
87
|
@thread_paused = true
|
88
|
-
sleep(0.1)
|
89
88
|
print "\r\e[K"
|
90
89
|
end
|
91
90
|
|
@@ -109,11 +108,11 @@ module Crayons
|
|
109
108
|
def self.spinner_stop(message = nil, exit)
|
110
109
|
return unless @spinner_running
|
111
110
|
|
111
|
+
sleep(0.1)
|
112
112
|
spinner_message = message || (exit ? "Done!" : "Failed!")
|
113
113
|
exit ? @spinner.success(spinner_message.green) : @spinner.error(spinner_message.red)
|
114
114
|
@thread.join
|
115
115
|
@spinner_running = false
|
116
|
-
print "\r\e[K"
|
117
116
|
end
|
118
117
|
|
119
118
|
# Logs a message during spinner execution removing the need
|
@@ -146,6 +145,12 @@ module Crayons
|
|
146
145
|
spinner_log("#{out.out}\n")
|
147
146
|
spinner_stop(nil, out.success?)
|
148
147
|
puts ""
|
148
|
+
rescue Errno::ENOENT
|
149
|
+
spinner_stop(nil, false)
|
150
|
+
log_error("\nError: #{cmd.split.first} not found!\n")
|
151
|
+
rescue StandardError => e
|
152
|
+
spinner_stop(nil, false)
|
153
|
+
log_error("\nAn unexpected error ocurred:\n\n#{e.message}\n")
|
149
154
|
end
|
150
155
|
|
151
156
|
# Logs a green text message to stdout.
|
data/lib/rvvm/templates.rb
CHANGED
data/lib/rvvm/version.rb
CHANGED
data/lib/rvvm.rb
CHANGED
@@ -75,38 +75,39 @@ module Rvvm
|
|
75
75
|
exit(0)
|
76
76
|
end
|
77
77
|
|
78
|
-
args.on("-n", "--new NAME", "Creates a new project wit the prowided name under pwd")
|
79
|
-
args.on("-m", "--module NAME", "Creates a SystemVerilog module template (default path: <prj
|
80
|
-
args.on("--pkg NAME", "Creates a SystemVerilog package template (default path: <prj
|
81
|
-
args.on("--itf NAME", "Creates a SystemVerilog interface template (default path: <prj
|
82
|
-
args.on("--svfile NAME", "Creates a generic SystemVerilog file template (default path: <prj
|
83
|
-
args.on("--path PATH", "Specifies a path relative to <prj dir> when creating a file template")
|
78
|
+
args.on("-n", "--new <NAME>", "Creates a new project wit the prowided name under pwd")
|
79
|
+
args.on("-m", "--module <NAME>", "Creates a SystemVerilog module template (default path: <prj root>/design/src)")
|
80
|
+
args.on("-p", "--pkg <NAME>", "Creates a SystemVerilog package template (default path: <prj root>/design/pkg)")
|
81
|
+
args.on("-i", "--itf <NAME>", "Creates a SystemVerilog interface template (default path: <prj root>/design/itf)")
|
82
|
+
args.on("-s", "--svfile <NAME>", "Creates a generic SystemVerilog file template (default path: <prj root>/design/src)")
|
83
|
+
args.on("--path <PATH>", "Specifies a path relative to <prj dir> when creating a file template")
|
84
84
|
args.on("--here", "Specifies pwd as the path for template file creation.")
|
85
85
|
args.on("-c", "--comp", "Compile SystemVerilog sources")
|
86
86
|
args.on("-e", "--elab", "Elaborates project")
|
87
87
|
args.on("-r", "--run", "Runs UVM simulation")
|
88
|
-
args.on("-a", "--all", "Runs --comp, --dpi if
|
88
|
+
args.on("-a", "--all", "Runs --comp, --dpi if dpi dpilib configured in rvvmconf, --elab, --run")
|
89
89
|
args.on("--runsv", "Runs pure SystemVerilog/Verilog simulation (Ignores UVM related arguments and config options)")
|
90
90
|
args.on("-d", "--dpi", "Compiles C/C++ sources to a shared lib to link into an elaborated snaphost using DPI-C")
|
91
91
|
args.on("-u", "--gui", "Opens a dumped waveform in Xilinx Vivado GUI")
|
92
92
|
args.on("-g", "--gencov", "Generates a functional coverage report")
|
93
|
-
args.on("
|
94
|
-
args.on("--complog LOGNAME", "Specifies compilation log filename (overrides config)")
|
95
|
-
args.on("--complist LISTFILE", "Specifies compile list for compilation (overrides config)")
|
96
|
-
args.on("--elablog LOGNAME", "Specifies elaboration log filename (overrides config)")
|
97
|
-
args.on("--timescale TIMESCALE", "Specifies timescale for testbench snapshot to be elaborated (overrides config)")
|
98
|
-
args.on("--tbtop TOPMODULE", "Specifie testbench top module (overwrites config)")
|
99
|
-
args.on("--tb TBNAME", "Specifies tesbench snapshot to be elaborated (overwrites config)")
|
100
|
-
args.on("--
|
101
|
-
args.on("--
|
93
|
+
args.on("--covreport", "Opens the latest generated functional coverage report in Xilinx coverage dashboard")
|
94
|
+
args.on("--complog <LOGNAME>", "Specifies compilation log filename (overrides config)")
|
95
|
+
args.on("--complist <LISTFILE>", "Specifies compile list for compilation (overrides config)")
|
96
|
+
args.on("--elablog <LOGNAME>", "Specifies elaboration log filename (overrides config)")
|
97
|
+
args.on("--timescale <TIMESCALE>", "Specifies timescale for testbench snapshot to be elaborated (overrides config)")
|
98
|
+
args.on("--tbtop <TOPMODULE>", "Specifie testbench top module (overwrites config)")
|
99
|
+
args.on("--tb <TBNAME>", "Specifies tesbench snapshot to be elaborated (overwrites config)")
|
100
|
+
args.on("--customdpilib <PATH>", "Specifies a custom DPI-C library to link into a snapshot to be elaborated (overwrites config)")
|
101
|
+
args.on("--simlog <LOGNAME>", "Specifies simulation log name (overwrites config)")
|
102
|
+
args.on("--test <TESTNAME>", "Specifies UVM test to be run by --run (overwrites config)")
|
102
103
|
args.on("-b", "--batch", "Run a batch of UVM tests from a test list (overwrites config)")
|
103
|
-
args.on("--testlist TESTLIST", Array, "Specifies test list as a comma separated string for a batch of test run (overwrites config)")
|
104
|
-
args.on("--verb VERBOSITY", "Specifies UVM verbosity <LOW, MEDIUM, HIGH, FULL, DEBUG> (overwrites config)")
|
105
|
-
args.on("--simtb TBNAME", "Specifies testbench snapshot for simulation (overwrites config)")
|
106
|
-
args.on("--dpilist LISTFILE", "Specifies source file list for DPI-C compilation (overwrites config)")
|
104
|
+
args.on("--testlist \"<TESTLIST>\"", Array, "Specifies test list as a comma separated string for a batch of test run (overwrites config)")
|
105
|
+
args.on("--verb <VERBOSITY>", "Specifies UVM verbosity <LOW, MEDIUM, HIGH, FULL, DEBUG> (overwrites config)")
|
106
|
+
args.on("--simtb <TBNAME>", "Specifies testbench snapshot for simulation (overwrites config)")
|
107
|
+
args.on("--dpilist <LISTFILE>", "Specifies source file list for DPI-C compilation (overwrites config)")
|
107
108
|
args.on("-w", "--wave", "Activates waveform trace dump for elaboration and simulation (overwrites config)")
|
108
|
-
args.on("--wavefile WAVEFILE", "Specifies waveform dump file to be openned in Vivado GUI")
|
109
|
-
args.on("--prjconf CONFIG", "Specifies RVvM project config file if not using the one provided in the project")
|
109
|
+
args.on("--wavefile <WAVEFILE>", "Specifies waveform dump file to be openned in Vivado GUI")
|
110
|
+
args.on("--prjconf <CONFIG>", "Specifies RVvM project config file if not using the one provided in the project")
|
110
111
|
args.on("-l", "--dpilib", "Specifies a DPI-C shared library to be linked with a snapshot during elaboration")
|
111
112
|
args.on("--debug", "Script debug")
|
112
113
|
end.parse!(into: @args)
|
@@ -150,6 +151,8 @@ module Rvvm
|
|
150
151
|
puts "UVM test list provided without running in batch mode - option will be ignored..."
|
151
152
|
@args[:testlist] = nil
|
152
153
|
end
|
154
|
+
|
155
|
+
@config[:elaboration][:customdpilib] = @args[:customdpilib] if @args[:customdpilib]
|
153
156
|
end
|
154
157
|
|
155
158
|
# Shell command with debug printout.
|
@@ -164,9 +167,9 @@ module Rvvm
|
|
164
167
|
# @since 0.8.0
|
165
168
|
def self.execute(tag, command)
|
166
169
|
if @args[:debug]
|
167
|
-
puts command
|
168
170
|
Crayons.spinner_start(tag)
|
169
171
|
sleep(1)
|
172
|
+
Crayons.spinner_log(command)
|
170
173
|
Crayons.spinner_stop(nil, true)
|
171
174
|
else
|
172
175
|
Crayons.command(tag, command)
|
@@ -329,7 +332,7 @@ module Rvvm
|
|
329
332
|
cmd_args = @config[:dpi][:args].strip
|
330
333
|
dpilist = @args[:dpilist] || @config[:dpi][:list]
|
331
334
|
|
332
|
-
cmd = "
|
335
|
+
cmd = "xsc -f #{dpilist} #{cmd_args}"
|
333
336
|
execute("Building DPI-C library...", cmd)
|
334
337
|
end
|
335
338
|
|
@@ -340,7 +343,10 @@ module Rvvm
|
|
340
343
|
# @since 0.8.0
|
341
344
|
def self.elaborate
|
342
345
|
cmd_args = @config[:elaboration][:args]
|
343
|
-
cmd_args << " -sv_lib
|
346
|
+
cmd_args << " -sv_lib #{@config[:elaboration][:customdpilib]}" if @config[:elaboration][:customdpilib] != ""
|
347
|
+
unless @config[:elaboration][:customdpilib] != ""
|
348
|
+
cmd_args << " -sv_lib dpi" if @args[:dpi] || @args[:dpilib] || @config[:dpi][:dpilib] == 1
|
349
|
+
end
|
344
350
|
cmd_args << " -debug wave" if @args[:wave]
|
345
351
|
cmd_args.strip!
|
346
352
|
logname = @args[:elablog] || File.join([@config[:project][:logDir], @config[:elaboration][:logDir], @config[:elaboration][:log]])
|
@@ -494,7 +500,7 @@ module Rvvm
|
|
494
500
|
if @args[:here]
|
495
501
|
path = "."
|
496
502
|
else
|
497
|
-
path = File.join([@config[:project][:path], @args[:path] || @templates[:
|
503
|
+
path = File.join([@config[:project][:path], @args[:path] || @templates[:package][:file][:path]])
|
498
504
|
end
|
499
505
|
|
500
506
|
Crayons.spinner_start("Generating SV pkg template...")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mrbya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|