Facebook/LinkedIn login is now deprecated, please disconnect our access to your social profile.
User dashboard under chipverify.com/connect will be deprecated from Oct 1, 2020, Read More.
Let us contribute to a cleaner Earth, Go Green Updated: May 31, 2020
  1. ian kim
  2. SystemVerilog
  3. Tuesday, 18 August 2020
I am working on example project (edaplayground)

https://www.edaplayground.com/x/2gC5

It is divided into two different files (DUT & testbench)

testbench has several classes in one file

When I compile two files, no problem exist

However, when I divided testbench into several files (based on class name), then I compile with "filelist.f" such as
############################
## filelist.f ##
############################
reg_ctrl.sv #<-- DUT
reg_item.sv
driver.sv
monitor.sv
scoreboard.sv
environment.sv
interface.sv
test.sv
tb_top.sv
############################

However, I got compile error as below

#################################################################################################################
# QuestaSim-64 vlog 10.5b Compiler 2016.05 May 21 2016
# Start time: 12:52:10 on Aug 18,2020
# vlog -reportprogress 300 -incr "+cover=bcestf" -f filelist.f
# -- Skipping module reg_ctrl
# -- Compiling package reg_item_sv_unit
# ** Error: (vlog-13069) driver.h(6): near "driver": syntax error, unexpected IDENTIFIER.
# ** Error: driver.h(6): (vlog-13205) Syntax error found in the scope following 'class'. Is there a missing '::'?
# ** Error: (vlog-13069) monitor.h(6): near "monitor": syntax error, unexpected IDENTIFIER.
# ** Error: monitor.h(6): (vlog-13205) Syntax error found in the scope following 'class'. Is there a missing '::'?
# ** Error: (vlog-13069) scoreboard.h(6): near "scoreboard": syntax error, unexpected IDENTIFIER.
# ** Error: scoreboard.h(6): (vlog-13205) Syntax error found in the scope following 'class'. Is there a missing '::'?
# ** Error: (vlog-13069) environment.h(17): near "env": syntax error, unexpected IDENTIFIER.
# ** Error: environment.h(17): (vlog-13205) Syntax error found in the scope following 'class'. Is there a missing '::'?
# ** Warning: environment.h(17): (vlog-2283) Extra semicolon in $unit (global) scope.
# ** Warning: scoreboard.h(6): (vlog-2283) Extra semicolon in $unit (global) scope.
# ** Warning: monitor.h(6): (vlog-2283) Extra semicolon in $unit (global) scope.
# ** Warning: driver.h(6): (vlog-2283) Extra semicolon in $unit (global) scope.
# ** Error: (vlog-13069) test.h(3): near "test": syntax error, unexpected IDENTIFIER.
# ** Error: test.h(3): (vlog-13205) Syntax error found in the scope following 'class'. Is there a missing '::'?
# ** Error: (vlog-13069) tb_top.sv(21): near ";": syntax error, unexpected ';', expecting '('.
# ** Error: tb_top.sv(28): (vlog-2730) Undefined variable: 't0'.
# ** Warning: test.h(3): (vlog-2283) Extra semicolon in $unit (global) scope.
# End time: 12:52:10 on Aug 18,2020, Elapsed time: 0:00:00
# Errors: 12, Warnings: 5
# ** Error: C:/questasim64_10.5b/win64/vlog failed.
# Error in macro ./Compile.do line 1
# C:/questasim64_10.5b/win64/vlog failed.
# while executing
# "vlog -incr +cover=bcestf -f filelist.f"
#################################################################################################################

Did I miss something?

Can you tell me how to divide classes into different files?

Thank you
Responses (1)
Accepted Answer Pending Moderation
From vlog help options, it looks like you need -f <filename> for all files in your filelist.f. Also you would need to provide -f filelist.f as a command line option under Tools and Simulators > Compile and Runtime Options on the left pane in edaplayground like:

-timescale 1ns/1ns -sysv -f filelist.f

// filelist.f
-f reg_if.sv
-f monitor.sv
...


(-F | -file | -f) <filename>
(optional) -f, -file and -F: each specifies an argument file with more command-line
arguments, allowing complex argument strings to be reused without retyping. Nesting of -F,
-f and -file commands is allowed. Allows gzipped input files.

With -F only: relative file names and paths within the arguments file <filename> are
prefixed with the path of the arguments file when lookup with relative path fails. Refer to
the section "Argument Files" for more information.
  1. more than a month ago
  2. SystemVerilog
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

You consent to our cookies if you continue to use our website. To know more about cookies, see our privacy policy. I accept cookies from this site.

Agree