rvvm 0.8.0 → 0.9.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 +4 -4
- data/CHANGELOG.md +29 -0
- data/README.md +46 -3
- data/bin/rvvm +6 -0
- data/lib/rvvm/utils.rb +1 -1
- data/lib/rvvm/version.rb +1 -1
- data/lib/rvvm.rb +106 -8
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1adb1e3128aba4ae80aafe456e74fd01e9f081ed8eb7e6d674a8ad3fdab4bc77
|
4
|
+
data.tar.gz: d9fba544ec9f442500f5093965385f3dfd79b5ca467fae96747ef32bdbe7bb70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae09b52956eb59cc1b8032e4cc03a432606a3699d8644398dd902198d0c8be018cfed40dd6612883be746ae95d712a91cefe563f1bcc35360e1a30471df7070e
|
7
|
+
data.tar.gz: b4bf62217031b5f27e45a48c4f4fa7eab737f4a9ae8abde5677c6c066245c094bfe33957358ed80765962c7a5bd0dce9b274ac8b427d96539c1b35574a7dacb9
|
data/CHANGELOG.md
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
7. UVM test simulation
|
18
18
|
|
19
19
|
### TBI:
|
20
|
+
|
20
21
|
1. Test list parsing and batch simulation
|
21
22
|
2. Module/itf/pkg/generic sv template generation
|
22
23
|
3. Pure SV/Vlog simulation
|
@@ -25,3 +26,31 @@
|
|
25
26
|
6. Unit tests
|
26
27
|
7. CLI log graphic
|
27
28
|
|
29
|
+
## [0.9.0] - 2024-09-16
|
30
|
+
|
31
|
+
### Added:
|
32
|
+
|
33
|
+
1. Pure SV/Vlog simulation
|
34
|
+
2. Waveform inspection in Vivado GUI
|
35
|
+
3. SV module/itf/pkg and generic SV file template generation
|
36
|
+
4. Functional covevrage report generation
|
37
|
+
5. Coverage report inspection in Xilinx coverage dashboard
|
38
|
+
6. List of required arguments in --help
|
39
|
+
|
40
|
+
### Fixes:
|
41
|
+
|
42
|
+
1. Compilation, elaboration and simulation log path
|
43
|
+
2. Crash on project config load failure
|
44
|
+
3. Updated help and README
|
45
|
+
|
46
|
+
### TBI:
|
47
|
+
|
48
|
+
1. Test list parsing and batch simulation
|
49
|
+
2. Unit tests
|
50
|
+
3. CLI log graphics
|
51
|
+
|
52
|
+
## [0.9.1] - 2024-09-16
|
53
|
+
|
54
|
+
## Fixes
|
55
|
+
|
56
|
+
1. Fixed rvvm exacutable being excluded by gemspec
|
data/README.md
CHANGED
@@ -18,7 +18,50 @@ gem install rvvm
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
### Project management
|
22
|
+
|
23
|
+
Create a new RVvM project using `-n` or `--new`.
|
24
|
+
|
25
|
+
eg.:
|
26
|
+
```
|
27
|
+
rvvm -n best_rtl_project
|
28
|
+
```
|
29
|
+
|
30
|
+
Whitespaces in project name and or generated templates are not allowed.
|
31
|
+
|
32
|
+
To manage an RVvM project use the `rvvm` script from inside an RVvM project root or its config directory.
|
33
|
+
|
34
|
+
#### Project structure
|
35
|
+
|
36
|
+
```
|
37
|
+
RvvM_project
|
38
|
+
├── design # SV design sources
|
39
|
+
│ ├── itf
|
40
|
+
│ ├── pkg
|
41
|
+
│ └── src
|
42
|
+
├── rvvm # RVvM project config and output directory
|
43
|
+
│ ├── rvvm_project_compile_list.f
|
44
|
+
│ ├── dpi_compile_list.f
|
45
|
+
│ ├── logs # comp, dpi, elab, sim log dir
|
46
|
+
│ │ ├── comp
|
47
|
+
│ │ ├── dpi
|
48
|
+
│ │ ├── elab
|
49
|
+
│ │ └── sim
|
50
|
+
│ ├── rvvmconf.json # RVvM project config file
|
51
|
+
│ └── wfcfg.tcl
|
52
|
+
└── verif # SV verification sources
|
53
|
+
├── env
|
54
|
+
│ ├── agents
|
55
|
+
│ └── top
|
56
|
+
├── tb
|
57
|
+
│ └── src # default UVM testbench top module
|
58
|
+
│ └── rvvm_project_tb_top.sv
|
59
|
+
└── test
|
60
|
+
├── seq
|
61
|
+
└── src
|
62
|
+
```
|
63
|
+
|
64
|
+
To get full `rvvm` usage docs use `-h` or `--help` option.
|
22
65
|
|
23
66
|
## Development
|
24
67
|
|
@@ -28,7 +71,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
28
71
|
|
29
72
|
## Contributing
|
30
73
|
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/such-hdl-much-wow/rvvm. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://gitlab.com/such-hdl-much-wow/
|
74
|
+
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/such-hdl-much-wow/rvvm. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://gitlab.com/such-hdl-much-wow/rvvm/-/blob/master/CODE_OF_CONDUCT.md?ref_type=heads).
|
32
75
|
|
33
76
|
## License
|
34
77
|
|
@@ -36,5 +79,5 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
36
79
|
|
37
80
|
## Code of Conduct
|
38
81
|
|
39
|
-
Everyone interacting in the
|
82
|
+
Everyone interacting in the RVvM project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/such-hdl-much-wow/rvvm/-/blob/master/CODE_OF_CONDUCT.md?ref_type=heads).
|
40
83
|
|
data/bin/rvvm
ADDED
data/lib/rvvm/utils.rb
CHANGED
data/lib/rvvm/version.rb
CHANGED
data/lib/rvvm.rb
CHANGED
@@ -17,6 +17,7 @@ module Rvvm
|
|
17
17
|
|
18
18
|
@args = {}
|
19
19
|
@required_args = %i[
|
20
|
+
version
|
20
21
|
new
|
21
22
|
module
|
22
23
|
pkg
|
@@ -39,14 +40,25 @@ module Rvvm
|
|
39
40
|
puts "\tRVvM is a Ruby based tool to manage, compile, elaborate and simulate SystemVerilog and UVM based projects"
|
40
41
|
puts "\tusing Xilinx Vivado xvlog, xelab, xrun and xsc.\n\n"
|
41
42
|
puts args
|
43
|
+
|
44
|
+
@current_time = Time.now
|
45
|
+
@formatted_time = @current_time.strftime("%Y-%m-%d %H:%M:%S")
|
46
|
+
|
47
|
+
|
48
|
+
req_args = String.new
|
49
|
+
@required_args.each do |arg|
|
50
|
+
req_args << "--#{arg} "
|
51
|
+
end
|
52
|
+
puts "\nRequired args (at least one): #{req_args}\n\n"
|
42
53
|
# puts "\nRequired args (at least one):"
|
43
54
|
# @required_args.each do |arg|
|
44
55
|
# puts "\t--#{arg}"
|
45
56
|
# end
|
46
|
-
exit
|
57
|
+
exit(0)
|
47
58
|
end
|
48
59
|
args.on("-v", "--version", "Displays RVvM gem version") do
|
49
|
-
puts "
|
60
|
+
puts "\nRVvM version: #{VERSION}\n\n"
|
61
|
+
exit(0)
|
50
62
|
end
|
51
63
|
|
52
64
|
args.on("-n", "--new NAME", "Creates a new project wit the prowided name under pwd")
|
@@ -54,12 +66,12 @@ module Rvvm
|
|
54
66
|
args.on("--pkg NAME", "Creates a SystemVerilog package template (default path: <prj dir>/design/pkg)")
|
55
67
|
args.on("--itf NAME", "Creates a SystemVerilog interface template (default path: <prj dir>/design/itf)")
|
56
68
|
args.on("--svfile NAME", "Creates a generic SystemVerilog file template (default path: <prj dir>/design/src)")
|
57
|
-
args.on("--here", "Speciies pwd as a path when creating a file template")
|
69
|
+
# args.on("--here", "Speciies pwd as a path when creating a file template")
|
58
70
|
args.on("--path PATH", "Specifies a path relative to <prj dir> when creating a file template")
|
59
71
|
args.on("-c", "--comp", "Compile SystemVerilog sources")
|
60
72
|
args.on("-e", "--elab", "Elaborates project")
|
61
73
|
args.on("-r", "--run", "Runs UVM simulation")
|
62
|
-
args.on("-a", "--all", "Runs --comp,
|
74
|
+
args.on("-a", "--all", "Runs --comp, --dpi if --dpilib or configured in rvvmconf, --elab, --run")
|
63
75
|
args.on("--runsv", "Runs pure SystemVerilog/Verilog simulation (Ignores UVM related arguments and config options)")
|
64
76
|
args.on("-d", "--dpi", "Compiles C/C++ sources to a shared lib to link into an elaborated snaphost using DPI-C")
|
65
77
|
args.on("-u", "--gui", "Opens a dumped waveform in Xilinx Vivado GUI")
|
@@ -208,7 +220,7 @@ module Rvvm
|
|
208
220
|
|
209
221
|
def self.compile
|
210
222
|
cmd_args = @config[:compilation][:args]
|
211
|
-
logname = File.join(@config[:
|
223
|
+
logname = @args[:complog] || File.join([@config[:project][:logDir], @config[:compilation][:logDir], @config[:compilation][:log]])
|
212
224
|
complist = @args[:compilelist] || @config[:compilation][:list]
|
213
225
|
|
214
226
|
puts "\nRVvM: Compiling HDL sources..\n"
|
@@ -231,7 +243,7 @@ module Rvvm
|
|
231
243
|
cmd_args = @config[:elaboration][:args]
|
232
244
|
cmd_args << " -sv_lib dpi" if @args[:dpi] || @args[:dpilib] || @config[:dpi][:dpilib] == 1
|
233
245
|
cmd_args << " -debug wave" if @args[:wave]
|
234
|
-
logname = File.join(@config[:
|
246
|
+
logname = @args[:elablog] || File.join([@config[:project][:logDir], @config[:elaboration][:logDir], @config[:elaboration][:log]])
|
235
247
|
tb_top = @args[:tbtop] || @config[:elaboration][:tbTop]
|
236
248
|
tb = @args[:tb] || @config[:elaboration][:tb]
|
237
249
|
timescale = @args[:timescale] || @config[:elaboration][:timescale]
|
@@ -263,7 +275,7 @@ module Rvvm
|
|
263
275
|
testlist.each_with_index do |simtest, i|
|
264
276
|
puts "RVvM: Running test #{i + 1}/#{testlist.size}: #{simtest}"
|
265
277
|
|
266
|
-
logname = File.join(@config[:simulation][:logDir], @config[:simulation][:log])
|
278
|
+
logname = File.join([@config[:project][:logDir], @config[:simulation][:logDir], @config[:simulation][:log]])
|
267
279
|
logname = Utils.interpret(logname, { testname: simtest })
|
268
280
|
|
269
281
|
verb = "UVM_#{@args[:verb] || @config[:simulation][:verbosity]}"
|
@@ -273,6 +285,82 @@ module Rvvm
|
|
273
285
|
end
|
274
286
|
end
|
275
287
|
|
288
|
+
def self.run_sv
|
289
|
+
cmd_args = @config[:simulation][:args]
|
290
|
+
tb = @args[:simtb] || @args[:tb] || @config[:elaboration][:tb]
|
291
|
+
|
292
|
+
puts "\nRVvM: Running pure SV/V simulation..."
|
293
|
+
logname = @args[:simlog] || File.join([@config[:project][:logDir], @config[:simulation][:logDir], "svsim.log"])
|
294
|
+
|
295
|
+
cmd = "xsim #{tb} -log #{logname} #{cmd_args}"
|
296
|
+
execute(cmd)
|
297
|
+
end
|
298
|
+
|
299
|
+
def self.gui
|
300
|
+
dump = @args[:wavefile] || "#{@config[:elaboration][:tb]}.wdb"
|
301
|
+
|
302
|
+
cmd = "xsim --gui #{dump}"
|
303
|
+
execute(cmd)
|
304
|
+
end
|
305
|
+
|
306
|
+
def self.coverage
|
307
|
+
cmd = "xcrg -report_format html -dir xsim.covdb"
|
308
|
+
execute(cmd)
|
309
|
+
end
|
310
|
+
|
311
|
+
def self.cov_report
|
312
|
+
Dir.chdir("xcrg_func_cov_report")
|
313
|
+
execute("./dashboard.html")
|
314
|
+
end
|
315
|
+
|
316
|
+
def self.create_module(type, name)
|
317
|
+
conf = @templates[:module][:conf]
|
318
|
+
conf[:module] = name
|
319
|
+
conf[:date] = @formatted_time
|
320
|
+
conf[:prjname] = @config[:project][:name]
|
321
|
+
conf[:company] = @config[:project][:company]
|
322
|
+
|
323
|
+
conf[:type] = type
|
324
|
+
@templates[:module][:file][:path] = "design/itf" if type == "itf"
|
325
|
+
path = File.join([@config[:project][:path], @args[:path] || @templates[:module][:file][:path]])
|
326
|
+
conf[:username] = Utils.git_userame || " "
|
327
|
+
|
328
|
+
Utils.gen_template(@templates[:module], "#{name}.sv", conf, path)
|
329
|
+
|
330
|
+
exit(0)
|
331
|
+
end
|
332
|
+
|
333
|
+
def self.create_pkg(name)
|
334
|
+
conf = @templates[:package][:conf]
|
335
|
+
conf[:package] = name
|
336
|
+
conf[:PACKAGE] = name.upcase
|
337
|
+
conf[:date] = @formatted_time
|
338
|
+
conf[:prjname] = @config[:project][:name]
|
339
|
+
conf[:company] = @config[:project][:company]
|
340
|
+
conf[:username] = Utils.git_userame || " "
|
341
|
+
|
342
|
+
path = File.join([@config[:project][:path], @args[:path] || @templates[:package][:file][:path]])
|
343
|
+
|
344
|
+
Utils.gen_template(@templates[:package], "#{name}.sv", conf, path)
|
345
|
+
|
346
|
+
exit(0)
|
347
|
+
end
|
348
|
+
|
349
|
+
def self.create_svfile(name)
|
350
|
+
conf = @templates[:svfile][:conf]
|
351
|
+
conf[:NAME] = name.upcase
|
352
|
+
conf[:date] = @formatted_time
|
353
|
+
conf[:prjname] = @config[:project][:name]
|
354
|
+
conf[:company] = @config[:project][:company]
|
355
|
+
conf[:username] = Utils.git_userame || ""
|
356
|
+
|
357
|
+
path = File.join([@config[:project][:path], @args[:path] || @templates[:package][:file][:path]])
|
358
|
+
|
359
|
+
Utils.gen_template(@templates[:svfile], "#{name}.sv", conf, path)
|
360
|
+
|
361
|
+
exit(0)
|
362
|
+
end
|
363
|
+
|
276
364
|
def self.run
|
277
365
|
create_new_project(@args[:new]) if @args[:new]
|
278
366
|
|
@@ -280,12 +368,22 @@ module Rvvm
|
|
280
368
|
load_config
|
281
369
|
handle_args
|
282
370
|
|
371
|
+
create_module(@args[:module], nil) if @args[:module]
|
372
|
+
create_module(@args[:itf, "itf"]) if @args[:itf]
|
373
|
+
create_pkg(@args[:pkg]) if @args[:pkg]
|
374
|
+
create_svfile(@args[:svfile]) if @args[:svfile]
|
375
|
+
|
283
376
|
prj_top
|
284
377
|
|
285
378
|
compile if @args[:comp]
|
286
379
|
dpi_c if @args[:dpi]
|
287
380
|
elaborate if @args[:elab]
|
288
381
|
run_sim if @args[:run]
|
382
|
+
run_sv if @args[:runsv]
|
383
|
+
gui if @args[:gui]
|
384
|
+
coverage if @args[:gencov]
|
385
|
+
cov_report if @args[:covreport]
|
386
|
+
|
387
|
+
exit(0)
|
289
388
|
end
|
290
389
|
end
|
291
|
-
|
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: 0.
|
4
|
+
version: 0.9.1
|
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-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RVvM is a Ruby based meta tool to manage/compile/elaborate and run simulations
|
14
14
|
on SystemVerilog and UVM based projects using Xilinx Vivado xvlog, xelab, xrun,
|
@@ -25,6 +25,7 @@ files:
|
|
25
25
|
- LICENSE.txt
|
26
26
|
- README.md
|
27
27
|
- Rakefile
|
28
|
+
- bin/rvvm
|
28
29
|
- lib/rvvm.rb
|
29
30
|
- lib/rvvm/templates.rb
|
30
31
|
- lib/rvvm/utils.rb
|