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

Reply

VHDL - Counter verification

 
Thread Tools Search this Thread
Old 02-26-2008, 10:12 PM   #1
Default Counter verification


Hi,

Process ( CLK, Reset_switch, Ch_Trig )
Begin
If ( Reset_switch = '1') then
channel_out <= (others =>'0');
Elsif ( Ch_Trig = '1') then
channel_out <= (others =>'0');
Elsif rising_edge ( CLK ) then
if ( ser_counter_in = "0010011") then
channel_out <= channel_out + 1;
Else
End if;
End if ;
End Process;

The above mentioned code generated the following RTL diagram

http://img253.imageshack.us/my.php?image=code3qi0.png

I have following questions

1. Is the RTL diagram according to my VHDL code?
2. I can not see the Adder and subtractor in detail. The quatrus is
showing them as blocks.
3. The multiplexer does not have a clock , though I did mention the
clock.

Please advice!
Thanks
John


john
  Reply With Quote
Old 02-26-2008, 11:29 PM   #2
Dwayne Dilbeck
 
Posts: n/a
Default Re: Counter verification
1)Based on the fact I can't get all the signal names from the picture, I
would say the RTL diagram looks liek your code. Both Reset and ch_trig will
reset the counter on a high value. The counter increments when
ser_counter_in equals some value. Why are you using a diagram to verify
functionality? This is an error prone process. Do you have a self checking
Testbench? That would be a better way to verify things.

2)Uhm... what subtractor? your code and diagram doesn't show one. Why do you
need to see the logic implementation of the adder? You know the logic was
mapped to an adder that is what you want. You target is an FPGA not an ASIC.
It doesn't seem to matter if the adder is a Carry skip, carry look ahead,
and a cascading adder? It is mapping it to an FPGA primitive for adding.

3) The output of the MUX is clocked into the flops. The clock is there.

"john" <> wrote in message
news:3c5fbd2a-1f11-4881-a3fb-...
> Hi,
>
> Process ( CLK, Reset_switch, Ch_Trig )
> Begin
> If ( Reset_switch = '1') then
> channel_out <= (others =>'0');
> Elsif ( Ch_Trig = '1') then
> channel_out <= (others =>'0');
> Elsif rising_edge ( CLK ) then
> if ( ser_counter_in = "0010011") then
> channel_out <= channel_out + 1;
> Else
> End if;
> End if ;
> End Process;
>
> The above mentioned code generated the following RTL diagram
>
> http://img253.imageshack.us/my.php?image=code3qi0.png
>
> I have following questions
>
> 1. Is the RTL diagram according to my VHDL code?
> 2. I can not see the Adder and subtractor in detail. The quatrus is
> showing them as blocks.
> 3. The multiplexer does not have a clock , though I did mention the
> clock.
>
> Please advice!
> Thanks
> John





Dwayne Dilbeck
  Reply With Quote
Old 02-27-2008, 11:58 AM   #3
Tricky
 
Posts: n/a
Default Re: Counter verification

> 2. I can not see the Adder and subtractor in detail. The quatrus is
> showing them as blocks.


In FPGAs adders are not implemented in logic, they are implemented in
look-up tables (LUTS), as all logic is. So therfore, an adder is a
primitive. If you wanted to see the full implementation, look at the
technology map viewer. With newer version it will even let you look at
the logic implemented in each LUT.


Tricky
  Reply With Quote
Old 02-29-2008, 11:16 PM   #4
Dave Pollum
 
Posts: n/a
Default Re: Counter verification
On Feb 26, 5:12 pm, john <conphil...@hotmail.com> wrote:
> Hi,
>
> Process ( CLK, Reset_switch, Ch_Trig )
> Begin
> If ( Reset_switch = '1') then
> channel_out <= (others =>'0');
> Elsif ( Ch_Trig = '1') then
> channel_out <= (others =>'0');
> Elsif rising_edge ( CLK ) then
> if ( ser_counter_in = "0010011") then
> channel_out <= channel_out + 1;
> Else
> End if;
> End if ;
> End Process;
>
> The above mentioned code generated the following RTL diagram
>
> http://img253.imageshack.us/my.php?image=code3qi0.png
>
> I have following questions
>
> 1. Is the RTL diagram according to my VHDL code?
> 2. I can not see the Adder and subtractor in detail. The quatrus is
> showing them as blocks.
> 3. The multiplexer does not have a clock , though I did mention the
> clock.
>
> Please advice!
> Thanks
> John


Is there a separate process that increments or decrements your counter
"ser_counter_in"?
-Dave Pollum


Dave Pollum
  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
The Counter Strikes... aihockey44 Gaming 0 04-29-2009 08:35 PM
Error: Physical sythesis tool PALAC is not supported by Formal Verification tool Conf bbiandov Software 0 12-22-2008 05:25 AM
VHDL problem - Signal counter cannot be synthesized, bad synchronous description. shipacpoloy Software 0 08-14-2007 07:26 AM
DVD verification software? Som DVD Video 1 05-29-2005 04:24 PM
Resetting The Counter. Patrick D. Rockwell DVD Video 3 07-09-2004 10:32 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