When you're doing the structural style, you realize you need to create the smaller components like and2, xor2, etc, which are usually already made by others who were in the lab before you. These are instructions to easily import these gates into your own project. Step 0: If you're keen on doing it yourself, this image explains how to add a new component. Step 2: Search for the components you need, and on selecting them, click Ok I should mention that to avoid DATA BINDING issues, make sure the input and output signals of t the he component mentioned in the Structural Style Program should be named the same as that in components you've added. That is, if this code snippet is there in your Structural Style program:
Then, the and2 component you're using should have a, b as it's input and y as it's output as specified in the entity. (that is, having x,y,z as the names would give you an error) ENTITY AND2 IS PORT( A,B : IN STD_LOGIC; Y : OUT STD_LOGIC ); END ENTITY AND2; ENTITY NM_EN IS PORT( W,X : IN STD_LOGIC; Z : OUT STD_LOGIC ); END ENTITY NM_EN; |