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 01-24-2005, 10:23 AM
Allan Herriman
Guest
 
Posts: n/a
Default Implicit event_expression list

Hi,

I'm having a problem with the following code (which is a simplified
version of some code that I inherited).


Simulators don't seem to mind, but XST produces the following error
message:
ERROR:HDLCompilers:168 - <filename> line <number> No signals
referenced in statement with implicit sensitivity list


module foobar ();

localparam foo = 0;
reg bar;

always @*
begin
bar = foo;
end

endmodule


Is this code meaningful? Will bar get the value of foo? Or is it a
problem in XST?

Regards,
Allan
Reply With Quote
  #2 (permalink)  
Old 01-24-2005, 01:36 PM
Guest
 
Posts: n/a
Default Re: Implicit event_expression list

Hi, If you dont have any ports in your design the tool wont synthesize
it to anything. imagine a design using no inputs and giving no outputs.
-Neo

Reply With Quote
  #3 (permalink)  
Old 01-24-2005, 01:56 PM
Allan Herriman
Guest
 
Posts: n/a
Default Re: Implicit event_expression list

On 24 Jan 2005 05:36:14 -0800, [email protected] wrote:

>Hi, If you dont have any ports in your design the tool wont synthesize
>it to anything. imagine a design using no inputs and giving no outputs.


Thanks for that gem of wisdom, Neo.

As I said, the code is a simplified version of something else. The
I/O is irrelevant to the question.

Allan
Reply With Quote
  #4 (permalink)  
Old 01-24-2005, 05:50 PM
Swapnajit Mittra
Guest
 
Posts: n/a
Default Re: Implicit event_expression list

A localparam (or parameter, for that matter) is a run time constant.
When the implicit sensitivity list expands to hold all the right hand
side variables that occur within that always block, it sees a
constant, which by definition can not change value. This is the
dilemma faced by your tool that produces that error.

- Swapnajit.
--
SystemVerilog, DPI, Verilog PLI and all other good stuffs.
Project VeriPage: http://www.project-veripage.com
For subscribing to the mailing list:
<URL: http://www.project-veripage.com/list/?p=subscribe&id=1>

Reply With Quote
  #5 (permalink)  
Old 01-24-2005, 06:32 PM
Guest
 
Posts: n/a
Default Re: Implicit event_expression list

Technically, the @* expands to an empty event control, since constants
don't get included in the expansion. Since empty event controls are
not legal in the language, producing an error is a reasonable response.

The other reasonable response is to treat it as an event control
containing only constants. The simulation behavior of that is to wait
for the constant to change value, which never happens. So the event
control waits forever, and the statement after it never executes. That
means bar never gets the value of foo, which means that it doesn't act
like combinational logic (or like the equivalent continuous assignment,
or like what a synthesis tool will probably produce). NC-Verilog takes
this approach, but produces a warning about it, since the behavior will
probably not be what was desired.

Reply With Quote
  #6 (permalink)  
Old 01-25-2005, 02:29 AM
Allan Herriman
Guest
 
Posts: n/a
Default Re: Implicit event_expression list

On 24 Jan 2005 10:32:22 -0800, [email protected] wrote:

>Technically, the @* expands to an empty event control, since constants
>don't get included in the expansion. Since empty event controls are
>not legal in the language, producing an error is a reasonable response.
>
>The other reasonable response is to treat it as an event control
>containing only constants. The simulation behavior of that is to wait
>for the constant to change value, which never happens. So the event
>control waits forever, and the statement after it never executes. That
>means bar never gets the value of foo, which means that it doesn't act
>like combinational logic (or like the equivalent continuous assignment,
>or like what a synthesis tool will probably produce). NC-Verilog takes
>this approach, but produces a warning about it, since the behavior will
>probably not be what was desired.


In short, the coding style is wrong, and I should get the original
author to change the code. (If I've interpreted your post correctly.)

Thanks,
Allan
Reply With Quote
  #7 (permalink)  
Old 01-25-2005, 12:18 PM
Guest
 
Posts: n/a
Default Re: Implicit event_expression list

Allan,
I am sorry but I realised my mistake then itself and deleted the post
but looks like it didnt get deleted.

-neo

Reply With Quote
  #8 (permalink)  
Old 01-25-2005, 06:26 PM
Guest
 
Posts: n/a
Default Re: Implicit event_expression list


Allan Herriman wrote:
>
> In short, the coding style is wrong, and I should get the original
> author to change the code. (If I've interpreted your post

correctly.)

Yes.

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
Tool to report just the list of undeclared signals : [email protected] Verilog 2 01-19-2005 04:11 PM
multi-bit signal in sensitivity list with partial use Dipu Verilog 4 11-12-2004 12:07 AM
Blocking Always with Sensitivity List rejeesh Verilog 0 06-21-2004 02:12 AM


All times are GMT +1. The time now is 09:56 AM.


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