Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: [VRFC 10-1775] range must be bounded by constant expressions #40

Open
YiSyuanChen opened this issue Feb 14, 2019 · 3 comments
Open

Comments

@YiSyuanChen
Copy link

YiSyuanChen commented Feb 14, 2019

Hi all, I'm trying to simulate the project for VC707 (VC707_gen1x8lf64) using Vivado 2015.4. The Vivado runs on Ubuntu 14.04. However, the simulation has errors as following:

ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../../../../../riffa_hdl/functions.vh:45]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../../../../../riffa_hdl/functions.vh:61]
...
ERROR: [VRFC 10-1775] range must be bounded by constant expressions [/home/jeff/riffa_ori/fpga/riffa_hdl/scsdpram.v:59]
ERROR: [VRFC 10-1775] range must be bounded by constant expressions [/home/jeff/riffa_ori/fpga/riffa_hdl/scsdpram.v:63]

For the first error, it seems that the functions in verilog header must be wrapped in a module. There are two more files have similar problem.

For the second error, the simulator reports error for syntax like: input [clog2s(C_DEPTH)-1:0]

I''m using the original Vivado simulator, and I'm not sure if this would be a problem.

I have tried to replace all clog2 and clog2s with $clog2, and wrap the functions into module, but the simulation result was very wierd. Does anyone can provide possible solution for these errors or any idea about simulation for project? Any comment would be very appreciated!

@sjkklein
Copy link

sjkklein commented Jul 2, 2020

I am running into this same problem. Did you ever find a solution? I am going to keep poking at it...

@dxloc
Copy link

dxloc commented Dec 1, 2021

1st question: Change all .v file type to SystemVerilog.

2nd question: Seem like if you add a parameter that is the clog2s, you can solve this error.

scsdpram.v:

module scsdpram
#(
parameter C_WIDTH = 32,
parameter C_DEPTH = 1024,
// Add C_ADDR_WIDTH parameter
parameter C_ADDR_WIDTH = clog2s(C_DEPTH)
)
(
input CLK,
input RD1_EN,
// input [clog2s(C_DEPTH)-1:0] RD1_ADDR,
input [C_ADDR_WIDTH-1:0] RD1_ADDR,
output [C_WIDTH-1:0] RD1_DATA,
input WR1_EN,
// input [clog2s(C_DEPTH)-1:0] WR1_ADDR,
input [C_ADDR_WIDTH-1:0] WR1_ADDR,
input [C_WIDTH-1:0] WR1_DATA
);

@showmeee
Copy link

showmeee commented Jan 3, 2024

I think run the script would solve the 2nd question

@bartokon bartokon mentioned this issue Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants