Vivado Synthesis Attribute

2020-08-10  本文已影响0人  非鱼知乐

Originated from UG901 v2020.1. Covers VHDL design only.

1. ASYN_REG

attribute ASYNC_REG : string;
attribute ASYNC_REG of sync_regs : signal is "TRUE";
attribute ASYNC_REG : boolean;
attribute ASYNC_REG of sync_regs : signal is TRUE;

2. BLACK_BOX

attribute BLACK_BOX : string;
attribute BLACK_BOX of beh : architecutre is "yes";

3. CASCADE_HEIGHT

attribute CASCADE_HEIGHT: integer;
attribute CASCADE_HEIGHT of ram: signal is 4;

4. CLOCK_BUFFER_TYPE

-- define in VHDL
entity test is
    port
    (
        in1 : in std_logic;
        clock : in std_logic;
        out1 : out std_logic;
    );
    attribute CLOCK_BUFFER_TYPE: string;
    attribute CLOCK_BUFFER_TYPE of clock : signal is "BUFR";
end test;
# define in XDC
set_property CLOCK_BUFFER_TYPE BUFG [get_ports clk];

5. DIRECT_ENABLE

-- define in VHDL
entity test is
    port
    (
        in1 : in std_logic;
        clock : in std_logic;
        en1, en2, en3 : in std_logic;
        out1 : out std_logic;
    );
    attribute DIRECT_ENABLE: string;
    attribute DIRECT_ENABLE of EN3: signal is "yes";
end test;
# define in XDC
set_property DIRECT_ENABLE  yes [get_nets -of [get_ports en3]];

6. DIRECT_RESET

-- define in VHDL
entity test is
    port
    (
        in1 : in std_logic;
        clock : in std_logic;
        rst1, rst2 : in std_logic;
        out1 : out std_logic;
    );
    attribute DIRECT_RESET : string;
    attribute DIRECT_RESET of rst2 : signal is "yes";
end test;
# define in XDC
set_property DIRECT_ENABLE  yes [get_nets -of [get_ports rst2]];

7. DONT_TOUCH

-- VHDL entity
entity test is
    port
    (
        in1 : in std_logic;
        clock : in std_logic;
        rst1, rst2 : in std_logic;
        out1 : out std_logic;
    );
    attribute DONT_TOUCH : string;
    attribute DONT_TOUCH of test : entity is "true|yes";
end test;
-- VHDL signal
signal sig1 : std_logic;
attribute DONT_TOUCH : string;
attribute DONT_TOUCH of test : entity is "true";
...
...
sig1 <= in1 and in2;
out1 <= sig1 and in3;
-- VHDL architecture
entity rtl of test is
    attribute DONT_TOUCH : string;
    attribute DONT_TOUCH of rtl : architecture is "yes";
-- VHDL component
entity rtl of test is
    attribute DONT_TOUCH : string;
    component my_comp
        port
        (
            in1 : in std_logic;
            out1 : out std_logic;
        );
    end component;
    attribute DONT_TOUCH of my_comp : component is "yes";

8. DSP_FOLDING

-- VHDL example
attribute DSP_FOLDING : string;
attribute DSP_FOLDING of my_entity : entity is "yes";

9. DSP_FOLDING_FASTCLOCK

-- VHDL example
attribute DSP_FOLDING_FASTCLOCK : string;
attribute DSP_FOLDING of clock_fast : signal is "yes";

10. EXTRACT_ENABLE

-- VHDL example
signal my_reg : std_logic;
attribute EXTRACT_ENABLE : string;
attribute EXTRACT_ENABLE of my_reg : signal is "yes";

11. EXTRACT_RESET

-- VHDL example
signal my_reg : std_logic;
attribute EXTRACT_RESET : string;
attribute EXTRACT_RESET of my_reg : signal is "yes";

12. FSM_ENCODING

-- VHDL example
typee state is (zero, one, two, three);
signal my_state : state;
attribute FSM_ENCODING : string;
attribute FSM_ENCODING of my_state : signal is "sequentiall";

13. FSM_SAFE_STATE

-- VHDL example
typee state is (zero, one, two, three);
signal my_state : state;
attribute FSM_SAFE_STATE : string;
attribute FSM_SAFE_STATE of my_state : signal is "power_on_state";

14. GATED_CLOCK

-- VHDL
entity test is
    port
    (
        in1, in2 : in std_logic;
        en : in std_logic;
        clk : in std_logic;
        out1 : out std_logic
    );
    attribute GATED_CLOCK : string;
    attribute GATED_CLOCK of clk : entity is "true|yes";
end test;

15. IOB

-- VHDL
signal sig1 : std_logic;
attribute IOB : string;
attribute IOB of sig1 : signal is "true";

16. IO_BUFFER_TYPE

-- VHDL
entity test is
    port
    (
        in1, in2 : in std_logic;
        clk : in std_logic;
        out1 : out std_logic
    );
    attribute IO_BUFFER_TYPE: string;
    attribute IO_BUFFER_TYPEof out1 : signal is "none";
end test;

17. KEEP

-- VHDL
signal sig1 : std_logic;
attribute KEEP : string;
attribute KEEP of sig1 : signal is "true";
...
sig1 <= in1 and in2;
sig2 <= sig1 and in3;

18. KEEP_HIERARCHY

-- VHDL on architecture
attribute KEEP_HIERARCHY : string;
attribute KEEP_HIERARCHY of beh : entity is "yes";
# XDC on instance
set_property KEEP_HIERARCHY yes [get_cells u0]

19. MARK_DEBUG

-- VHDL
signal dbg : std_logic;
attribute MARK_DEBUG : string;
attribute MARK_DEBUG of dbg : signal is "true";
# XDC on net
set_property MARK_DEBUG TRUE [get_nets dbg]

20. MAX_FANOUT

-- VHDL
signal sig1 : std_logic;
attribute MAX_FANOUT : integer;
attribute MAX_FANOUT of sig1 : signal is 50;

21. RAM_DECOMP

-- VHDL
attribute RAM_DECOMP : string;
attribute RAM_DECOMP of my_ram : signal is "power";
# XDC
set_property RAM_DECOMP power [get_cells my_ram]

21. RAM_STYLE

-- VHDL
attribute RAM_STYLE : string;
attribute RAM_STYLE of my_ram : signal is "distributed";
# XDC
set_property RAM_DECOMP power [get_cells my_ram]

22. RETIMING_BACKWARD

-- VHDL
attribute RETIMING_BACKWARD : string;
attribute RETIMING_BACKWARD of my_sig : signal is 1;
# XDC
set_property RETIMING_BACKWARD 1 power [get_cells my_sig]

23. RETIMING_FORWARD

-- VHDL
attribute RETIMING_FORWARD : string;
attribute RETIMING_FORWARD of my_sig : signal is 1;
# XDC
set_property RETIMING_FORWARD 1 power [get_cells my_sig]

24. ROM_STYLE

-- VHDL
attribute ROM_STYLE : string;
attribute ROM_STYLE of my_rom : signal is "distributed";

25. RW_ADDR_COLLISION

-- VHDL
attribute RW_ADDR_COLLISION : string;
attribute RW_ADDR_COLLISIONof my_ram : signal is "yes";

26. SHREG_EXTRACT

-- VHDL
attribute SHREG_EXTRACT : string;
attribute SHREG_EXTRACT of my_srl : signal is "no";

27. SRL_STYLE

-- VHDL
attribute SRL_STYLE : string;
attribute SRL_STYLEof my_srl : signal is "reg_srl_reg";
# XDC
set_property SRL_STYLE register [get_cells my_shiftter_reg*]

28. TRANSLATE_OFF/TRANSLATE_ON

-- VHDL
-- synthesis TRANSLATE_OFF
Code ...
-- synthesis TRANSLATE_ON

29. USE_DSP

-- VHDL
attribute USE_DSP : string;
attribute USE_DSP of p_reg: signal is no;

30. Using synthesis attributes in XDC files

Format:

set_property <attribute> <value> <target>

For example:

set_property MAX_FANOUT 15 [get_cells in1_int_reg]

31. Synthesis attribute propagation rules

REFERENCE

上一篇 下一篇

猜你喜欢

热点阅读