Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
logic [$clog2(cnt)-1:0] iter = 0;`timescale 1 ps / 1 ps
module checkObj2();
logic clk50;
logic [1:0] button;
logic [1:0] group [4];
ObjTest2 dut(
.clk50,
.button,
.group
);
always
begin
clk50 = 0;
#10000;
clk50 = 1;
#10000;
end
initial
begin
button = 2'b00;
#5500000;
button = 1'b01;
#5000000;
button = 2'b11;
#5000000;
button = 2'b00;
end
endmodule

interface demoInterface ();
logic in;
logic out;
modport InDevice (input in,output out);
endinterface
module ObjTest3 #(parameter cnt=4)
(
input clk,
input button
);
demoInterface interfaces [cnt]();
fakedevice f (interfaces[0]);
endmodule
module fakedevice (demoInterface.InDevice Bus);
assign Bus.in = Bus.out;
endmodule
Error (10231): Verilog HDL error at ObjTest3.sv(28): value cannot be assigned to input «in»
Проверка синтезируемости красивых возможностей SystemVerilog на практике