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

Reply

VHDL - Sequential counters and Quatrus's RTL

 
Thread Tools Search this Thread
Old 02-26-2008, 07:50 PM   #1
Default Sequential counters and Quatrus's RTL


Hi,

I am little puzzled by the question that how Quatrus is generating RTL
diagrams for my VHDL code. For example

The code#1

Process ( CLK, Reset_switch )
Begin
If ( Reset_switch = '1') then
channel_out <= (others =>'0');
Elsif rising_edge ( CLK ) then
channel_out <= channel_out + 2;
End if ;
End Process;

generates the following RTL diagram

http://img221.imageshack.us/my.php?image=code1le1.png

And the code# 2
Process ( CLK, Reset_switch )
Begin
If ( Reset_switch = '1') then
channel_out <= (others =>'0');
Elsif rising_edge ( CLK ) then
channel_out <= channel_out + 1;
End if ;
End Process;
generates the following RTL diagram

http://img221.imageshack.us/my.php?image=code2qk9.png


Question1: Why the Quatrus is showing five different individual flip
flops when adding number 2 and not with when I add number 1 ?

Question2 : I defined the above counters as Component in the Top level
file and use the port map function to map the ports but if I do not
use the port map function and try to define everything inside only one
file then Quatrus do not even recognize the counter and does not show
the counter in the RTL viewer?

Please advice!
John





john
  Reply With Quote
Old 02-26-2008, 11:44 PM   #2
Dwayne Dilbeck
 
Posts: n/a
Default Re: Sequential counters and Quatrus's RTL
1) It is only generating 5 flip flops becuase the value of channel_out(0)
is never changing. it is being optimized away to save gates.

2) 6 registers are bing created. take a look at the name of the register
"channel_out[5..0]~reg0" It is creating 6 registers and colapsing them
visually to make the schematic easier to read. In this code the value of
channel_out(0) changes and can not be optimized.


"john" <> wrote in message
news:32f130c4-5490-445e-8539-...
> Hi,
>
> I am little puzzled by the question that how Quatrus is generating RTL
> diagrams for my VHDL code. For example
>
> The code#1
>
> Process ( CLK, Reset_switch )
> Begin
> If ( Reset_switch = '1') then
> channel_out <= (others =>'0');
> Elsif rising_edge ( CLK ) then
> channel_out <= channel_out + 2;
> End if ;
> End Process;
>
> generates the following RTL diagram
>
> http://img221.imageshack.us/my.php?image=code1le1.png
>
> And the code# 2
> Process ( CLK, Reset_switch )
> Begin
> If ( Reset_switch = '1') then
> channel_out <= (others =>'0');
> Elsif rising_edge ( CLK ) then
> channel_out <= channel_out + 1;
> End if ;
> End Process;
> generates the following RTL diagram
>
> http://img221.imageshack.us/my.php?image=code2qk9.png
>
>
> Question1: Why the Quatrus is showing five different individual flip
> flops when adding number 2 and not with when I add number 1 ?
>
> Question2 : I defined the above counters as Component in the Top level
> file and use the port map function to map the ports but if I do not
> use the port map function and try to define everything inside only one
> file then Quatrus do not even recognize the counter and does not show
> the counter in the RTL viewer?
>
> Please advice!
> John
>
>
>





Dwayne Dilbeck
  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




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