![]() |
|
|
|
#1 |
|
HI,
I was solving the following question and came up with a solution. I am a beginner and sloving the exercises from Ashenden's "Designer's guide for VHDL". DEVELOP A BEHAVIORAL MODEL FOR A D LATCH WITH A CLOCK-TO-OUTPUT PROPAGATION DELAY OF 3NS AND DATA-TO-OUTPUT PROPAGATION DELAY OF 4NS. What I worte is ...... Entity D_latch IS Port(d,clk : in std_ulogic; q : out std_ulogic); End entity D_latch; Architecture behave of D_latch is Begin latch: Process is Begin if(clk='1') then q<=d after 4ns; end if; wait on clk,d; end process latch; End architecture behave; I am not able to incorporate clock-to-output delay of 3 ns. Where should I insert this delay to emulate this . Thanks in advance. Regards, akfami. M.A.Khader |
|
|
|
|
#2 |
|
Posts: n/a
|
M.A.Khader wrote:
> HI, > > I was solving the following question and came up with a solution. I > am a beginner and sloving the exercises from Ashenden's "Designer's > guide for VHDL". > DEVELOP A BEHAVIORAL MODEL FOR A D LATCH WITH A CLOCK-TO-OUTPUT > PROPAGATION DELAY OF 3NS AND DATA-TO-OUTPUT PROPAGATION DELAY OF 4NS. > > What I worte is ...... > Entity D_latch IS > Port(d,clk : in std_ulogic; > q : out std_ulogic); > End entity D_latch; > Architecture behave of D_latch is > Begin > latch: Process is > Begin > if(clk='1') then > q<=d after 4ns; > end if; > wait on clk,d; > end process latch; > End architecture behave; > I am not able to incorporate clock-to-output delay of 3 ns. Where > should I insert this delay to emulate this . > > Thanks in advance. > > Regards, > akfami. Might this be something? --Niels Bakker library ieee; use ieee.std_logic_1164.all; Entity D_latch IS Port(d,clk : in std_ulogic; q : out std_ulogic); End entity D_latch; Architecture behave of D_latch is Begin latch: Process is Begin if clk='1' then if d'event then -- latch transparent and change of data q<=d after 4 ns; elsif clk'event then -- latch is being enabled q<=d after 3 ns; end if; end if; wait on clk,d; end process latch; end architecture behave; Niels Bakker |
|
|
|
#3 |
|
Posts: n/a
|
M.A.Khader wrote:
> latch: Process is > Begin > if(clk='1') then > q<=d after 4ns; > end if; > wait on clk,d; > end process latch; > I am not able to incorporate clock-to-output delay of 3 ns. Where > should I insert this delay to emulate this . Take the template for synthesizable latches: process(clk,d) begin if(clk='1') then q<=d; end if; end process; Remember: There is no reset included. If you want to apply a delay for simulation: process(clk,d) begin if(clk='1') then q<=d after 3 ns; -- not synthesizable end if; end process; Ralf Ralf Hildebrandt |
|
|
|
#4 |
|
Posts: n/a
|
Hi M.A.Khader
When You Stady delays, you need to understanding at first time that they are very difficult to be SYNTHESIZEable when you are going to write complex models. At first time you need to know that on your level you have three basic types delays. 1. The Internal Delay model All components in digital circuits have a certain amount of inertia. For Example, it takes a finit amount of time and a certain amount of energy for the output of a gate to respond to a change on the input. The VHDL language uses the propagation delay through the component as the default pulse rejaction width. sum <= reject 2 ns inertial (a xor b) after 5 ns; 2. The transport delay model When we connect devices we use wire to make connection and to send information. But wire are material elements, and they have resistance. This can be shown as that: sum <= transport (a xor b) after 5 ns; 3 Delta delay Dhis type of delays are unspecifyed. You need just to write: sum <= (a xor b); Don't forget to leave space between value and dementions, because they are Physical type; You can solve your task in this manner: entity D_latch IS port(d,clk : in std_ulogic; q : out std_ulogic); end entity D_latch; architecture behav of D_latch is Begin latch: Process is Begin if clk='1' then if d'event then q<=d after 4 ns; elsif clk'event then q<=d after 3 ns; end if; end if; wait on clk,d; end process latch; VHDL language is key unsensitive. Best Regards Ivaylo Krumov ivailokroumov |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple video editor? | trs80 | DVD Video | 7 | 04-10-2007 05:14 PM |
| Simple region code question... simple answer?? | joseph.greer@gmail.com | DVD Video | 7 | 01-26-2007 09:07 PM |
| DVDs without even a simple menu (suck!) | Dennis M | DVD Video | 18 | 07-25-2005 05:43 PM |
| DVD Verdict reviews: DIE! DIE! MY DARLING!, LOOK! PLAYFUL PATTERNS AND SIMPLE SHAPES / GO! EXERCISE WITH THE TELETUBBIES, and more! | DVD Verdict | DVD Video | 0 | 09-26-2003 10:02 AM |
| make your KISS DP-450 & 500 REGION FREE with a simple d/l to put on CD-R(W) | vincent101 | DVD Video | 0 | 08-17-2003 12:12 PM |