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: |

He said that since his platform does not have the capacity to check all channels, it may restrict some in Russia and Ukraine "for the duration of the conflict," but then reversed course hours later after many users complained that Telegram was an important source of information. Recently, Durav wrote on his Telegram channel that users' right to privacy, in light of the war in Ukraine, is "sacred, now more than ever." Telegram was co-founded by Pavel and Nikolai Durov, the brothers who had previously created VKontakte. VK is Russia’s equivalent of Facebook, a social network used for public and private messaging, audio and video sharing as well as online gaming. In January, SimpleWeb reported that VK was Russia’s fourth most-visited website, after Yandex, YouTube and Google’s Russian-language homepage. In 2016, Forbes’ Michael Solomon described Pavel Durov (pictured, below) as the “Mark Zuckerberg of Russia.” The news also helped traders look past another report showing decades-high inflation and shake off some of the volatility from recent sessions. The Bureau of Labor Statistics' February Consumer Price Index (CPI) this week showed another surge in prices even before Russia escalated its attacks in Ukraine. The headline CPI — soaring 7.9% over last year — underscored the sticky inflationary pressures reverberating across the U.S. economy, with everything from groceries to rents and airline fares getting more expensive for everyday consumers. But the Ukraine Crisis Media Center's Tsekhanovska points out that communications are often down in zones most affected by the war, making this sort of cross-referencing a luxury many cannot afford.
from it


Telegram Arnold Enginegger
FROM American