mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Merge pull request #2615 from zachjs/genrtlil-conflict
genrtlil: improve name conflict error messaging
This commit is contained in:
commit
ca5f5ffcd6
7 changed files with 93 additions and 12 deletions
8
tests/verilog/conflict_assert.ys
Normal file
8
tests/verilog/conflict_assert.ys
Normal file
|
@ -0,0 +1,8 @@
|
|||
logger -expect error "Cannot add procedural assertion `\\x' because a signal with the same name was already created" 1
|
||||
read_verilog -sv <<EOT
|
||||
module top;
|
||||
wire x, y;
|
||||
always @*
|
||||
x: assert(y == 1);
|
||||
endmodule
|
||||
EOT
|
9
tests/verilog/conflict_cell_memory.ys
Normal file
9
tests/verilog/conflict_cell_memory.ys
Normal file
|
@ -0,0 +1,9 @@
|
|||
logger -expect error "Cannot add cell `\\x' because a memory with the same name was already created" 1
|
||||
read_verilog <<EOT
|
||||
module mod;
|
||||
endmodule
|
||||
module top;
|
||||
reg [2:0] x [0:0];
|
||||
mod x();
|
||||
endmodule
|
||||
EOT
|
17
tests/verilog/conflict_interface_port.ys
Normal file
17
tests/verilog/conflict_interface_port.ys
Normal file
|
@ -0,0 +1,17 @@
|
|||
logger -expect error "Cannot add interface port `\\i' because a signal with the same name was already created" 1
|
||||
read_verilog -sv <<EOT
|
||||
interface intf;
|
||||
logic x;
|
||||
assign x = 1;
|
||||
modport m(input x);
|
||||
endinterface
|
||||
module mod(intf.m i);
|
||||
wire x;
|
||||
assign x = i.x;
|
||||
wire i;
|
||||
endmodule
|
||||
module top;
|
||||
intf i();
|
||||
mod m(i);
|
||||
endmodule
|
||||
EOT
|
7
tests/verilog/conflict_memory_wire.ys
Normal file
7
tests/verilog/conflict_memory_wire.ys
Normal file
|
@ -0,0 +1,7 @@
|
|||
logger -expect error "Cannot add memory `\\x' because a signal with the same name was already created" 1
|
||||
read_verilog <<EOT
|
||||
module top;
|
||||
reg [2:0] x;
|
||||
reg [2:0] x [0:0];
|
||||
endmodule
|
||||
EOT
|
8
tests/verilog/conflict_pwire.ys
Normal file
8
tests/verilog/conflict_pwire.ys
Normal file
|
@ -0,0 +1,8 @@
|
|||
logger -expect error "Cannot add pwire `\\x' because a signal with the same name was already created" 1
|
||||
read_verilog -pwires <<EOT
|
||||
module top;
|
||||
wire x;
|
||||
assign x = 1;
|
||||
localparam x = 2;
|
||||
endmodule
|
||||
EOT
|
7
tests/verilog/conflict_wire_memory.ys
Normal file
7
tests/verilog/conflict_wire_memory.ys
Normal file
|
@ -0,0 +1,7 @@
|
|||
logger -expect error "Cannot add signal `\\x' because a memory with the same name was already created" 1
|
||||
read_verilog <<EOT
|
||||
module top;
|
||||
reg [2:0] x [0:0];
|
||||
reg [2:0] x;
|
||||
endmodule
|
||||
EOT
|
Loading…
Add table
Add a link
Reference in a new issue