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.

VHDL synthesizable D-flop flop

Status
Not open for further replies.

Pradeepa_kck

Newbie level 5
Newbie level 5
Joined
Dec 27, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Sri Lanka
Visit site
Activity points
1,378
Following is a working VHDL code for a D-flip flop with Asynchronous reset. Note that it is using a variable state for it's operation.

architecture var of D_FF is
begin
p0: process(Clock, Reset) is
variable state : std_logic;
begin
if(Reset = '0') then
state := '0';
elsif rising_edge(Clock) then
state := D;
end if;
Q <= state;
Qbar <= notstate;
end process p0;
end architecture var;

My problem is that without using this state variable can't we simply drive the output by D. Then we will not need a variable to store the state.

Q <= D;
Q <= not D;

Is there any drawback of doing that?
 

@trickydicky..

Just intruding into pradeepa thread..

1. Irrespective of using variable logic as pradeepa mentioned here or a standard template, the synthesis will lead to same schematic at the output.. am i right?
2. But the space EEPROM occupied by program and execution time are high in this logic than standard one.. am i right?
 

The standard VHDL template would use a signal instead of a variable. But the synthesized logic would usually be the same if you use a variable.

2. But the space EEPROM occupied by program and execution time are high in this logic than standard one.. am i right?
You are talking about what? Where do you see an EEPROM involved with the problem?
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top