Actions
Bug #9142
closedCase expression type mismatch in opencores/mips16/instruction_mem.v
Start date:
07/19/2018
Due date:
% Done:
100%
Estimated time:
Detected in build:
master
Platform:
Published in build:
1.1.1-beta-190722
Description
The model checker fails to process the generated smv model with the following error:
TYPE ERROR file instruction_mem.smv: line 317 : illegal operand types of "=" : unsigned word[8] and unsigned word[4]
It is caused by:
rom_addr : word[8]
...
rom_addr = 0d4_12
In Verilog source:
wire [7 : 0] rom_addr;
...
case (rom_addr)
4'b0000: ...
...
Case value size doesn't match the variable size. This value is transferred to the smv model without any transformation.
Updated by Sergey Smolov over 5 years ago
- Status changed from New to Open
The problem comes from the source Verilog code:
`define INSTR_MEM_ADDR_WIDTH 8
...
wire [`INSTR_MEM_ADDR_WIDTH-1 : 0] rom_addr = pc[`INSTR_MEM_ADDR_WIDTH-1 : 0];
...
always @(*)
case (rom_addr)
4'b0000: instruction = 16'b1001001000001000;
4'b0001: instruction = 16'b1001010001001000;
4'b0010: instruction = 16'b1001011010001000;
4'b0011: instruction = 16'b0001100010011000;
4'b0100: instruction = 16'b1011100001000010;
4'b0101: instruction = 16'b1010101001000010;
4'b0110: instruction = 16'b0010110100101000;
4'b0111: instruction = 16'b1100000110111000;
4'b1000: instruction = 16'b1001111111000001;
4'b1001: instruction = 16'b0000000000000000;
4'b1010: instruction = 16'b0000000000000000;
4'b1011: instruction = 16'b0000000000000000;
4'b1100: instruction = 16'b0000000000000000;
4'b1101: instruction = 16'b0000000000000000;
4'b1110: instruction = 16'b0000000000000000;
4'b1111: instruction = 16'b0000000000000000;
default: instruction = 16'b0000000000000000;
endcase
Probably, it should be transformed at some stage.
Updated by Sergey Smolov almost 5 years ago
- Status changed from Open to Resolved
Fixes are made in Verilog Translator.
Updated by Mikhail Lebedev almost 5 years ago
- Status changed from Resolved to Verified
Updated by Sergey Smolov over 4 years ago
- Status changed from Verified to Closed
- Published in build set to 1.1.1-beta-190722
Actions