Telegram Group & Telegram Channel
Продолжаю тыкать палкой интерфейсы совместно с опенсорсными тулами. На этот раз речь пойдет про массивы интерфейсов, в частности их применимость в портах модулей.

Следующий код компилируется в Verilator, Tabby CAD (Yosys+Verific) и в Vivado. Yosys с открытым плагином от Antmicro ругается на массив интерфейсов в описании портов модуля (Encountered unhandled type in process_port: interface_array).

interface iface;
logic a;
modport in(input a);
endinterface

module test_mod (iface.in x[2], output logic y);
assign y = x[0].a | x[1].a;
endmodule

module top (input logic [1:0] x, output logic y);
iface i[2]();
test_mod DUT (i, y);

assign i[0].a = x[0];
assign i[1].a = x[1];
endmodule

Одиночный интерфейс, не в виде массива, открытым плагином поддерживается и успешно синтезируется.

Порадовала утилита sv2v, которая преобразовала этот код в код на чистом верилоге, который успешно синтезировался Yosys без плагинов.

module top (x, y);
input wire [1:0] x;
output wire y;
genvar _arr_DA352;
generate
for (_arr_DA352 = 0; _arr_DA352 <= 1; _arr_DA352 = _arr_DA352 + 1) begin : i
wire a;
end
endgenerate
localparam _bbase_D0DCC_x = 0;
generate
if (1) begin : DUT
localparam _mbase_x = 0;
wire y;
assign y = top.i[0].a | top.i[1].a;
end
endgenerate
assign y = DUT.y;
assign i[0].a = x[0];
assign i[1].a = x[1];
endmodule

Можно заметить, что утилита сохранила иерархию интерфейсов. Т.е., например, констрейны не сломаются, т.к. пути к сигналам сохранятся. Можно безболезненно симулировать код в Icarus, не опасаясь поломки иерархии.



group-telegram.com/enginegger/4
Create:
Last Update:

Продолжаю тыкать палкой интерфейсы совместно с опенсорсными тулами. На этот раз речь пойдет про массивы интерфейсов, в частности их применимость в портах модулей.

Следующий код компилируется в Verilator, Tabby CAD (Yosys+Verific) и в Vivado. Yosys с открытым плагином от Antmicro ругается на массив интерфейсов в описании портов модуля (Encountered unhandled type in process_port: interface_array).

interface iface;
logic a;
modport in(input a);
endinterface

module test_mod (iface.in x[2], output logic y);
assign y = x[0].a | x[1].a;
endmodule

module top (input logic [1:0] x, output logic y);
iface i[2]();
test_mod DUT (i, y);

assign i[0].a = x[0];
assign i[1].a = x[1];
endmodule

Одиночный интерфейс, не в виде массива, открытым плагином поддерживается и успешно синтезируется.

Порадовала утилита sv2v, которая преобразовала этот код в код на чистом верилоге, который успешно синтезировался Yosys без плагинов.

module top (x, y);
input wire [1:0] x;
output wire y;
genvar _arr_DA352;
generate
for (_arr_DA352 = 0; _arr_DA352 <= 1; _arr_DA352 = _arr_DA352 + 1) begin : i
wire a;
end
endgenerate
localparam _bbase_D0DCC_x = 0;
generate
if (1) begin : DUT
localparam _mbase_x = 0;
wire y;
assign y = top.i[0].a | top.i[1].a;
end
endgenerate
assign y = DUT.y;
assign i[0].a = x[0];
assign i[1].a = x[1];
endmodule

Можно заметить, что утилита сохранила иерархию интерфейсов. Т.е., например, констрейны не сломаются, т.к. пути к сигналам сохранятся. Можно безболезненно симулировать код в Icarus, не опасаясь поломки иерархии.

BY Arnold Enginegger




Share with your friend now:
group-telegram.com/enginegger/4

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

Ukrainian forces successfully attacked Russian vehicles in the capital city of Kyiv thanks to a public tip made through the encrypted messaging app Telegram, Ukraine's top law-enforcement agency said on Tuesday. Again, in contrast to Facebook, Google and Twitter, Telegram's founder Pavel Durov runs his company in relative secrecy from Dubai. "For Telegram, accountability has always been a problem, which is why it was so popular even before the full-scale war with far-right extremists and terrorists from all over the world," she told AFP from her safe house outside the Ukrainian capital. In the past, it was noticed that through bulk SMSes, investors were induced to invest in or purchase the stocks of certain listed companies. Also in the latest update is the ability for users to create a unique @username from the Settings page, providing others with an easy way to contact them via Search or their t.me/username link without sharing their phone number.
from us


Telegram Arnold Enginegger
FROM American