What are the useful attributes that can be used with passes in Yosys?

Mehrdad

What are the most useful attributes that can be used with passes in Yosys?

Also, I was wondering if you could give me an example to set 'keep_hierarchy' for a specific module (namely "counter") using 'setattr'.

CliffordVienna

The README File contains a list of the most prominent attributes. (Section "Verilog Attributes and non-standard features".)

Regarding keep_hierarchy and setattr: Consider the following example code.

module test(input A, B, output X, Y);
  test_and and_inst (.A(A), .B(B), .O(X));
  test_xor xor_inst (.A(A), .B(B), .O(Y));
endmodule

module test_and(input A, B, output O);
  assign O = A & B;
endmodule

module test_xor(input A, B, output O);
  assign O = A ^ B;
endmodule

Obviously the following would just display a schematic with a $and and a $xor gate:

yosys -p 'prep; flatten; opt -purge; show test' test.v

Now we can prevent flatten from flattening and_inst by setting the keep_hierarchy attribute on the cell:

yosys -p 'prep; setattr -set keep_hierarchy 1 test/and_inst; flatten; opt -purge; show test' test.v

Alternatively we can prevent all instances of test_and to be flattened by simply setting the attribute on the module itself:

yosys -p 'prep; setattr -mod -set keep_hierarchy 1 test_and; flatten; opt -purge; show test' test.v

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to execute yosys passes from an LLVM pass?

From Dev

What can `inxi` be used for?

From Dev

What can `inxi` be used for?

From Dev

What can JSON strings be used for?

From Dev

On what level can SPDY be used?

From Dev

What can be used to 'gzip' in Windows?

From Dev

What is OpenStack? And how can it be used?

From Dev

What can be used for Webcommunication on Android

From Dev

In what cases mongoexport can be used?

From Dev

What is a good "template" Yosys synthesis script?

From Dev

What is a good "template" Yosys synthesis script?

From Java

What data structure could be used to store objects with multiple comparable attributes

From Dev

What pattern is used to provide global configuration of custom elements or attributes in aurelia?

From Dev

What type would be used for abstracting a JSX element's attributes into an object?

From Dev

What is a name of this port? And for what purpose can it be used?

From Dev

Yosys Can't open include file

From Dev

what are passes and multiple shader passes and their private variables

From Dev

HTML: Can always the same identifier be used for name and id attributes?

From Dev

What is noexcept useful for?

From Java

What is the volatile keyword useful for?

From Java

What is a mixin, and why are they useful?

From Java

What are enums and why are they useful?

From Java

What is reflection and why is it useful?

From Dev

What are Ruby globals useful for?

From Dev

What are blocks useful for?

From Dev

What are 'constexpr' useful for?

From Dev

What exactly is #define useful for?

From Dev

eval and binding: what are they useful for?

From Dev

What is the collation useful for in mysql

Related Related

HotTag

Archive