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 has kind of an old-school cyber-libertarian world view where technology is there to set you free," Maréchal said. One thing that Telegram now offers to all users is the ability to “disappear” messages or set remote deletion deadlines. That enables users to have much more control over how long people can access what you’re sending them. Given that Russian law enforcement officials are reportedly (via Insider) stopping people in the street and demanding to read their text messages, this could be vital to protect individuals from reprisals. 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." Soloviev also promoted the channel in a post he shared on his own Telegram, which has 580,000 followers. The post recommended his viewers subscribe to "War on Fakes" in a time of fake news. This ability to mix the public and the private, as well as the ability to use bots to engage with users has proved to be problematic. In early 2021, a database selling phone numbers pulled from Facebook was selling numbers for $20 per lookup. Similarly, security researchers found a network of deepfake bots on the platform that were generating images of people submitted by users to create non-consensual imagery, some of which involved children.
from us


Telegram Arnold Enginegger
FROM American