8000 Verilated function return type · Issue #5913 · verilator/verilator · GitHub
[go: up one dir, main page]

Skip to content

Verilated function return type #5913

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

Closed
jordankrim opened this issue Apr 3, 2025 · 3 comments
Closed

Verilated function return type #5913

jordankrim opened this issue Apr 3, 2025 · 3 comments
Labels
resolution: abandoned Closed; not enough information or otherwise never finished

Comments

@jordankrim
Copy link

The original SystemVerilog code where we are reading form a memory a single byte (thus the logic[7:0] return arg) is:

function logic[7:0] read_mem(logic [VALID_ADDR_WIDTH-1:0] i,int j);

It appears that the Verilated code is this:

uint32_t Vdp_ram1024_dp_ram1024::read_mem(uint32_t i, uint32_t j) {

The return on this (C++) function is a uint32_t which is not 8 bits. Why is it not uint8_t or such?

@jordankrim jordankrim added the new New issue not seen by maintainers label Apr 3, 2025
@wsnyder
Copy link
Member
wsnyder commented Apr 3, 2025

Internal Verilator-generated function declarations don't look like that. Are you talking about a DPI function? What verilator version? Send a complete example please.

@jordankrim
Copy link
Author

Verilator 4.034.

@wsnyder
Copy link
Member
wsnyder commented Apr 4, 2025

Please answer all the questions ;)

@wsnyder wsnyder added status: asked reporter Bug is waiting for reporter to answer a question and removed new New issue not seen by maintainers labels Apr 4, 2025
@wsnyder wsnyder added resolution: abandoned Closed; not enough information or otherwise never finished and removed status: asked reporter Bug is waiting for reporter to answer a question labels May 18, 2025
@wsnyder wsnyder closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: abandoned Closed; not enough information or otherwise never finished
Projects
None yet
Development

No branches or pull requests

2 participants
0