FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-11-2007, 09:10 PM
Mike Treseler
Guest
 
Posts: n/a
Default Re: Variable vs. Signal on indexing--verilog synthesis template

> Jan Decaluwe wrote:
>>> clked : process(clk)
>>> variable cnt_v : count_t;
>>> begin
>>> if rising_edge(clk) then
>>> cnt_v := cnt_v + 1; -- increment on rising edge
>>> end if;
>>> cnt <= cnt_v; -- wire assignment outside of clocked clause
>>> end process clked;

>>
>> I never used this template, but started to think about it because
>> of my work on MyHDL.
>>
>> The question I have is: is there an equivalent (also synthesizable)
>> version for Verilog? At first sight, I don't think so, but perhaps
>> I'm wrong.


Mike Treseler wrote:

I can get the same register init, update, output
in one always block by doing something like this:

http://home.comcast.net/~mike_treseler/dup_reg_remove.v

The Quartus synthesis report and tech viewer get
the correct number of registers (5)

http://home.comcast.net/~mike_tresel...emove_tech.pdf

But I couldn't use my vhdl-style port assignment
trick to eliminate duplication in the verific RTL front end.

The verilog block uses no IF statement for the rising edge of the clock.
The rtl schematic shows 4 duplicated regs that do not
appear in the utilization report or tech schematic.

http://home.comcast.net/~mike_tresel...remove_rtl.pdf

This is really just a cosmetic problem since everything
after synthesis gets it right. The RTL schematic is generated
after analysis and rtl elaboration, but before fitting.
See http://www.verific.com/ for more information.

-- Mike Treseler
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
register indexing rik Verilog 1 11-01-2006 12:40 AM
diffrence between signal, variable and wire, register mohammed rafi Verilog 3 05-07-2004 06:56 PM
Indexing bit-vectors using variables Brendan Verilog 5 01-14-2004 12:57 PM
Indexing a vector using variables? Brendan Lynskey Verilog 3 12-19-2003 01:33 AM
C++ Template Classes of Multi-Value Logic Qunwei Chen Verilog 6 08-22-2003 04:50 PM


All times are GMT +1. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved