[memutil] Allow compilation with memories > Width
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
If memories are larger than Width bit Verilator fails to compile the design
with (example error message for Width == 128):
`%Error: prim_util_memload.sv:44:23: Extracting 256 bits from only
128 bit number`.
The expected behavior is to return `0` (false) in the DPI call for memories larger than Width, but still allow compilation.
We probably need a localparam "WidthMax" which is used in the part-select `mem[index] = val[WidthMax-1:0];`.
Contributor guide
Research direction
Start in prim_util_memload.sv at the reported part-select around line 44 and inspect the DPI memory-load path. Confirm that memories wider than Width compile successfully and that the DPI call returns false for them; use the issue's example error and expected behavior to verify completion.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100