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 07-17-2004, 02:34 AM
Jason Zheng
Guest
 
Posts: n/a
Default -> trigger usage

Hi,

Can anyone give an easy-to-understand explanation of the "->" operator?
I looked many places but it was not well documented. Please give
examples if possible. Thanks lot.
Reply With Quote
  #2 (permalink)  
Old 07-17-2004, 07:44 PM
Jeremy Webb
Guest
 
Posts: n/a
Default Re: -> trigger usage

Jason Zheng <[email protected]> wrote in message news:<cd9s69$3ic$[email protected]>...
> Hi,
>
> Can anyone give an easy-to-understand explanation of the "->" operator?
> I looked many places but it was not well documented. Please give
> examples if possible. Thanks lot.


See page 139 of the Verilog IEEE Std 1364-2001 Specification.

Jeremy
Reply With Quote
  #3 (permalink)  
Old 07-20-2004, 04:40 PM
John Providenza
Guest
 
Posts: n/a
Default Re: -> trigger usage

It is used for *simulation* purposes to trigger event.
It is used with a "@" construct that is waiting for the
event. A simple example:

event err;

always @(err)
begin
$display("I got an error");
// maybe do more reporting or dumping here...
....
// maybe you want to do a $finish if batch mode, or
// something other than a $stop.
$stop;
end

// deep inside your code....
if (expect !== actual)
// I see an error, trigger the handler.
-> err;

NOTE: no posedge or negedge, an event simply happens.

I wouldn't use this in code to be synthesized.

I hope this helps.

John P


Jason Zheng <[email protected]> wrote in message news:<cd9s69$3ic$[email protected]>...
> Hi,
>
> Can anyone give an easy-to-understand explanation of the "->" operator?
> I looked many places but it was not well documented. Please give
> examples if possible. Thanks lot.

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
variable usage in verilog Bluedoze Verilog 0 01-25-2004 07:14 AM
tasks usage CupOfWater Verilog 3 07-15-2003 07:30 PM
Discrepancy in CLB Usage Report Anand P Paralkar Verilog 0 07-02-2003 06:29 PM


All times are GMT +1. The time now is 01:22 AM.


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