Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Architecture in logic elements?

How can i implement an architecture in a logic element or lut?

I use a cyclone ii with quartus tool.

Example:

I have this architecture:

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity xor2a is

Port ( a : in STD_LOGIC;

b : in STD_LOGIC;

-- c : in std_logic;

-- d: in std_logic;

z : out STD_LOGIC);

end xor2a;

architecture rtl of xor2a is

begin

z<= a xor b;

end rtl;

Can i implement the rtl architecture in a specific own logic element?

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I know it's not what you're asking, but why? Besides being an extremely inefficient way to do design, I've almost never seen someone get better results than letting synthesis figure out the best implementation. This is especially true for Stratix II/III/IV architectures with the Adaptive LUT, where it's not just how something gets synthesized but what inputs can be shared with other LUTs to get the best performance/area out of the architecture.

    (The time to do this is when you've let the synthesizer do generic code and found it to be wrong, and are trying to tweak a small section. My comment above is for the designer trying to do lots of logic like this because they had to do it in Xilinx.)

    The first thing I would look at is the designing with low-level primitives app note:

    http://www.altera.com/literature/ug/ug_low_level.pdf?gsa_pos=3&wt.oss_r=1&wt.oss=altera%20primitives

    I've used the LCELL method before, and have just done it in a schematic(not ideal but it was quick and dirty, and that's all I needed).

    Since you're looking at the topic, you might find the following interesting too:

    http://www.altera.com/literature/manual/stx_cookbook.pdf?gsa_pos=3&wt.oss_r=1&wt.oss=synthesis%20cookbook

    Feel free to post what you're trying to do(and why), as you might get some useful feedback.