Telegram Group & Telegram Channel
Нашел забавную ошибку в Вериляторе. При иерархической передаче строки в параметре модуля через два и более модуля строка может не дойти до конечного потребителя. Зависит это от того, указан ли, и где конкретно, тип параметра. Если во всей цепочке тип параметра отсутствует (выводится из дефолтного значения), то строка проходит. Если тип везде указан, то тоже проходит. А если во втором модуле тип не указать, то туда приходит строка той же длины, только заполненная пробелами. Причём, если её передать дальше, то она совсем обнулится.

Вот пример кода с багом:

module string_param_0 #(parameter S = "");
initial $display("S = '%s'", S);
endmodule

module string_param_1 #(parameter string S = "");
string_param_0 #(.S(S)) u_sp0();
endmodule

module test;
string_param_1 #(.S("Greetings from the old shoes")) u_sp1();

initial #1 $finish;
endmodule


Вывод такой:

S = '                            '


Если добавить тип параметра в первый модуль или убрать тип из второго, то вывод будет корректным:

S = 'Greetings from the old shoes'



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

Нашел забавную ошибку в Вериляторе. При иерархической передаче строки в параметре модуля через два и более модуля строка может не дойти до конечного потребителя. Зависит это от того, указан ли, и где конкретно, тип параметра. Если во всей цепочке тип параметра отсутствует (выводится из дефолтного значения), то строка проходит. Если тип везде указан, то тоже проходит. А если во втором модуле тип не указать, то туда приходит строка той же длины, только заполненная пробелами. Причём, если её передать дальше, то она совсем обнулится.

Вот пример кода с багом:

module string_param_0 #(parameter S = "");
initial $display("S = '%s'", S);
endmodule

module string_param_1 #(parameter string S = "");
string_param_0 #(.S(S)) u_sp0();
endmodule

module test;
string_param_1 #(.S("Greetings from the old shoes")) u_sp1();

initial #1 $finish;
endmodule


Вывод такой:

S = '                            '


Если добавить тип параметра в первый модуль или убрать тип из второго, то вывод будет корректным:

S = 'Greetings from the old shoes'

BY Arnold Enginegger


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

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

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

"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. Again, in contrast to Facebook, Google and Twitter, Telegram's founder Pavel Durov runs his company in relative secrecy from Dubai. Telegram has gained a reputation as the “secure” communications app in the post-Soviet states, but whenever you make choices about your digital security, it’s important to start by asking yourself, “What exactly am I securing? And who am I securing it from?” These questions should inform your decisions about whether you are using the right tool or platform for your digital security needs. Telegram is certainly not the most secure messaging app on the market right now. Its security model requires users to place a great deal of trust in Telegram’s ability to protect user data. For some users, this may be good enough for now. For others, it may be wiser to move to a different platform for certain kinds of high-risk communications. Messages are not fully encrypted by default. That means the company could, in theory, access the content of the messages, or be forced to hand over the data at the request of a government. Emerson Brooking, a disinformation expert at the Atlantic Council's Digital Forensic Research Lab, said: "Back in the Wild West period of content moderation, like 2014 or 2015, maybe they could have gotten away with it, but it stands in marked contrast with how other companies run themselves today."
from no


Telegram Arnold Enginegger
FROM American