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

Channels are not fully encrypted, end-to-end. All communications on a Telegram channel can be seen by anyone on the channel and are also visible to Telegram. Telegram may be asked by a government to hand over the communications from a channel. Telegram has a history of standing up to Russian government requests for data, but how comfortable you are relying on that history to predict future behavior is up to you. Because Telegram has this data, it may also be stolen by hackers or leaked by an internal employee. Andrey, a Russian entrepreneur living in Brazil who, fearing retaliation, asked that NPR not use his last name, said Telegram has become one of the few places Russians can access independent news about the war. This provided opportunity to their linked entities to offload their shares at higher prices and make significant profits at the cost of unsuspecting retail investors. The account, "War on Fakes," was created on February 24, the same day Russian President Vladimir Putin announced a "special military operation" and troops began invading Ukraine. The page is rife with disinformation, according to The Atlantic Council's Digital Forensic Research Lab, which studies digital extremism and published a report examining the channel. 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 no


Telegram Arnold Enginegger
FROM American