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

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-12-2003, 10:41 PM
Mike Treseler
Guest
 
Posts: n/a
Default Re: When do I always put a "else NULL" statement in my VHDL code?

walala wrote:

>
> I learned from books that I should exhaust all branches of "if"
> statement, so I write in the following way:
>
> if rst = '1' then
> count <= 0;
> elsif clk'event and clk = '1' then
> if (INPUTEND = '1') then
> ...
> else
> null;
> end if;
> else
> null;
> end if;
>
>
> But I also saw on the Internet sometimes people don't write code in my
> cubersome way...


First time I've seen it.

>
> Can anybody clarify a little for me? When I need to write this "else
> null", and when I don't need it?



It's just style.
It will compile the same either way.
Consider leaving out the
else clause if you're not using it.

-- 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
What is a "bug", and what is "good code"? (or: more default_nettype) Evan Lavelle Verilog 2 07-26-2007 03:03 PM
Is "for" statement considered as RTL code?? Lee Verilog 3 07-26-2004 09:49 PM
Re: When do I always put a "else NULL" statement in my VHDL code? walala VHDL 2 10-11-2003 11:51 PM
About Latches and Registers was (When do I always put a "else NULL"statement in my VHDL code?) Ingmar Seifert VHDL 0 09-14-2003 08:57 PM
Re: When do I always put a "else NULL" statement in my VHDL code? Kelvin VHDL 1 09-13-2003 12:07 PM


All times are GMT +1. The time now is 07:11 PM.


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