Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - AHDL program: HELP!

 
Thread Tools Search this Thread
Old 11-05-2006, 09:52 PM   #1
Default AHDL program: HELP!


I know this is a VHDL group, however, since there is no AHDL group and
I read more than one post in which people talked about using or having
used AHDL I suppose I can find some help in here.
This is the code:

SUBDESIGN FlipD
(
D,LE,CL,PS :INPUT;
Q :OUTPUT;
)

VARIABLE
tmp[1..0] :NODE; %store latches outputs%
en,out :NODE; %Enable of slave latch and master-latch output%
%prep[1..0] :NODE; %Array of preparatory states%

BEGIN

tmp[0]=out; %copies MASTER-output%
tmp[1]=Q; %copies SLAVE-output%
en=!LE; %SLAVE latch-enable (negation of LE)%
prep[]=(PS,CL);

IF(LE==VCC) THEN %Latch-Enable on%

CASE prep[] IS
WHEN b"01"=>% CL activated, out goes to GND%
out=GND;
WHEN b"10"=>%PS activated, out goes to VCC%
out=VCC;
WHEN OTHERS=>%any other combination: transparent latch%
out=D;

END CASE;
END IF;
ELSE
out=tmp[0]; %MASTER-output remains the same%
END IF;

IF(en==VCC) THEN %if slave is enabled%
Q=out; %update output value by copying MASTER output%
ELSE
Q=tmp[1];%SLAVE output remains the same%
END IF;
END;

What I'm trying to do with this code is a D type Flip-Flop. The funny
thing is that if I remove the CASE block (which analices CL and PS
inputs), the thing works just right, but when I try to simulate the
whole program (with CL and PS set in any different values, it doesn't
make a difference) the output gets stucked at VCC forever.
Any ideas?



msigwald@gmail.com
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
This is incredible! jc_ice DVD Video 1 08-13-2006 10:47 AM
Please try this Rob DVD Video 1 08-13-2006 10:43 AM
Get Rich Daun Johnson A+ Certification 0 01-31-2006 03:11 PM
make lots O money fast an easy migeul A+ Certification 0 03-06-2004 01:45 AM
Re: free email addresses finding program (files included) Leonardo A+ Certification 1 12-05-2003 03:51 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46