mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
Tests: Fix buggy size test.
This commit is contained in:
parent
5cc11839b5
commit
2a43410fa6
@ -15,20 +15,23 @@ module t (input clk);
|
|||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
interface simple_bus #(AWIDTH = 8, DWIDTH = 8)
|
interface simple_bus #(AWIDTH = 8, DWIDTH = 8)
|
||||||
(input logic clk); // Define the interface
|
(input logic clk); // Define the interface
|
||||||
|
|
||||||
logic req, gnt;
|
logic req, gnt;
|
||||||
logic [AWIDTH-1:0] addr;
|
logic [AWIDTH-1:0] addr;
|
||||||
logic [DWIDTH-1:0] data;
|
logic [DWIDTH-1:0] data;
|
||||||
|
|
||||||
modport slave( input req, addr, clk,
|
modport slave( input req, addr, clk,
|
||||||
output gnt,
|
output gnt,
|
||||||
input data);
|
input data);
|
||||||
|
|
||||||
modport master(input gnt, clk,
|
modport master(input gnt, clk,
|
||||||
output req, addr,
|
output req, addr,
|
||||||
output data);
|
output data);
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
if (DWIDTH != 16) $stop;
|
||||||
|
end
|
||||||
endinterface: simple_bus
|
endinterface: simple_bus
|
||||||
|
|
||||||
module mem(interface a);
|
module mem(interface a);
|
||||||
@ -36,7 +39,7 @@ module mem(interface a);
|
|||||||
always @(posedge a.clk)
|
always @(posedge a.clk)
|
||||||
a.gnt <= a.req & avail;
|
a.gnt <= a.req & avail;
|
||||||
initial begin
|
initial begin
|
||||||
if ($bits(a.data != 16)) $stop;
|
if ($bits(a.data) != 16) $stop;
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user