Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

3input nand Gate using VHDL

Status
Not open for further replies.

mangohaha

Newbie level 5
Joined
Sep 6, 2012
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,345
Is this right? I want to make a 3 input nand gate....


Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
library IEEE;
use IEEE.std_logic_1164.all;
 
entity nand3 is port(
x: in std_logic;
y: in std_logic;
z: in std_logic;
f: out std_logic);
end nand3;
 
architecture behav of nand3 is
 
begin
f <= (x nand y nand z);
 
 
end behav;


Thanks....
 
Last edited by a moderator:

Yes
How about compiling it yopurself to see the results in an RTL viewer?
 

Hi,

Trickydicky is right ..
Because I dont think it will synthsize at first place.
and RTL view will give you a clear idea.

Good luck.
 

Hi,

Trickydicky is right ..
Because I dont think it will synthsize at first place.
and RTL view will give you a clear idea.

Good luck.

This code should synthesize fine.
The suggestion of RTL viewer was to give the user a bit more of an insight into how it will really look, and hopefully next time the qestion wont be so trivial.
 

Hello Tricky,

I m sorry not synthesis error, it gives Syntax error near "nand"..
i think thats because it has to be stored in a signal before the second nand operation.

or am I missing something ??
 

ok yes - small syntax error
it should be:
f <= (x nand y) nand z;

- - - Updated - - -

Also - you cannot compile this in quartus because there is already a primitive called nand3 and it wont let you compile another one.
 

I want to ask about the primitive in quartus..

Is it the entity name "nand3" which is matching with the primitive in quartus or any entity name with this logic will not be allowed by quartus ?
 

well as i see it nand is a primitive gate and can have only two input as defined but if you wish to have a 3 input nand gate to need to feed the output of earlier nand gate along with the third input to another nand gate......
 

I want to ask about the primitive in quartus..

Is it the entity name "nand3" which is matching with the primitive in quartus or any entity name with this logic will not be allowed by quartus ?

Quartus has a primitive entity called nand3, so you are not allowed to create your own entity called nand3.

well as i see it nand is a primitive gate and can have only two input as defined but if you wish to have a 3 input nand gate to need to feed the output of earlier nand gate along with the third input to another nand gate......

This shows you do not understand FPGA architecture. In FPGAs, there are no gates at all, just 4/5/6 input Look up tables (depending on the chip). With more inputs, you can produce more "gates" per lut.
 
  • Like
Reactions: verylsi

    verylsi

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top