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

Support runtime-variable indexing into arrayed submodules #2116

Open
agrobman opened this issue Jan 17, 2020 · 3 comments
Open

Support runtime-variable indexing into arrayed submodules #2116

agrobman opened this issue Jan 17, 2020 · 3 comments
Labels
type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@agrobman
Copy link

Hi,

Can you check please why do we need this `ifdef statements in
design/pic_ctrl.sv file of the swerv DB?

Now I'm getting similar (?) error for our new cores
in memories preloading code :
"
%Error: /wdc/proj/riscv/mustang/users/alexander.grobman/ehx2/testbench/tb_top.sv:694: Can't find definition of 'dccm' in dotted signal: 'rvtop.mem.Gen_dccm_enable.dccm.mem_bank__BRA__0__KET__.dccm.dccm_bank.ram_core'
: ... In instance tb_top
rvtop.mem.Gen_dccm_enable.dccm.mem_bank[0].dccm.dccm_bank.ram_core[indx] = data;
^~~~~~~~
... Known scopes under 'ram_core':
... Known scopes under 'ram_core':

"
2nd dccm is named block of implicit "generate" construct

like
(if PARM == 5) begin : dccm
ram_5 dccm_bank ( ...);
end
ram_core is verilog memory, modelling the RAM block.

Of course, this design runs with irun and vcs.

BTW, speaking of verilator TB, do we still need to sample finished output of verilog TB to stop simulation, or $finish will also work?

@agrobman agrobman added the new New issue not seen by maintainers label Jan 17, 2020
@wsnyder wsnyder added status: discussion Issue is waiting for discussions to resolve and removed new New issue not seen by maintainers labels Jan 18, 2020
@wsnyder
Copy link
Member

wsnyder commented Jan 18, 2020

Verilator doesn't support at present runtime-variable indexing into arrayed submodules.

The newer example you attach might be a different issue as it has a constant into ram_bank, and I presume ram_core is a variable. Perhaps Verilator names the generates incorrectly, this area of the spec isn't well specified. Compare the Known Scopes versus what you expect.

$finish has been supported for a long time.

@agrobman
Copy link
Author

agrobman commented Jan 18, 2020 via email

@wsnyder
Copy link
Member

wsnyder commented Jan 18, 2020

By "known scopes" I mean the error message tells you where it wasn't able to find something and what the next scopes it knows about are, generally this suggests what is not being found or is named strangely.

@wsnyder wsnyder changed the title Why do we need `ifdef VERILATOR in swerv EH1 RTL? Support runtime-variable indexing into arrayed submodules Jan 29, 2020
@wsnyder wsnyder added type: feature-IEEE Request to add new feature, described in IEEE 1800 and removed status: discussion Issue is waiting for discussions to resolve labels Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

2 participants