-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full support for attributes in Yosys #27
Comments
@mithro I created this issue to keep track of attribute related features we want in Yosys. Those examples are just a subset of all possible attribute placement cases. Anyway, can you give an real world example of usage of an attribute on a port connection ? |
This is how I wanted to use the attribute on a port connection; MUX2 rmux (
(* pack = "LUT5toLUT6; LUT5toLUT7; LUT5toLUT8" *)
.I0(n5lut_0_out),
(* pack = "LUT5x2" *)
.I1(n5lut_1_out),
.O(f6mux_O)
); |
I started to work on attributes on port connections. And I encountered a problem - it seems that at some point Yosys swaps what RTLIL::SigSpec object refers to but not its attributes (which I added). |
These examples are from Verilog — 2001 - A Guide to the New Features of the Verilog® Hardware Description Language Section always @(state) //state machine with one-hot encoding
(* full_case, parallel_case *) case (state)
3'b001: next_state = 3'b010;
3'b010: next_state = 3'b100;
3'b100: next_state = 3'b001;
endcase
(* optimize *) module control ( ... );
(* state_variable *) reg [7:0] S;
dff il (q, d, (* clock_line *) ckl, rst};
sum = a + (* ripple_adder *) b;
assign next_state = fsm_func(* meally_fsm *) (state, a, b, c); |
Support for attributes on parameters was successfully landed (#25). However, there are several cases of attribute usage still not supported by the Yosys which might be useful in Symbiflow:
(not a complete list)
(* optimize *) module control ( ... );
(* port_attr *) input clk;
(* param_attr *) parameter WIDTH = 10;
(* localparam_attr *) localparam MAGIC = 8'hFE;
(* state_variable *) reg [7:0] S;
dff il (q, d, (* clock_line *) ckl, rst);
sum = a + (* ripple_adder *) b;
assign next_state = fsm_func(* meally_fsm *) (state, a, b, c);
(* inst_attr *) my_module my_instance (...);
(* gen_attr *) generate ...
(* spec_attr *) specify ...
(* specparam_attr *) specparam T = 10.0; ...
The text was updated successfully, but these errors were encountered: