Subject: RE: [sv-ec] Asychronous mailbox proposal
From: David W. Smith (david.smith@synopsys.com)
Date: Thu Dec 12 2002 - 16:21:27 PST
Hi Kevin,
I would request that any additions like this go through me before going to
Stu. I believe there may be some problems with what you suggest and would
prefer to have the discussion first.
Stu, please wait on adding this.
Regards
David
David W. Smith
Synopsys Scientist
Synopsys, Inc.
Synopsys Technology Park
2025 NW Cornelius Pass Road
Hillsboro, OR 97124
Voice: 503.547.6467
Main: 503.547.6000
FAX: 503.547.6906
Email: david.smith@synopsys.com
http://www.synopsys.com
-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Kevin
Cameron
Sent: Thursday, December 12, 2002 12:30 PM
To: Stuart Sutherland
Cc: sv-ec
Subject: [sv-ec] Asychronous mailbox proposal
Stu,
I was wondering if you could paste the section below into the LRM for review
with the mailbox stuff, it's the only functionality from the channels
proposal that isn't handled by mailboxes (the rest is handled by DirectC):
12.5.1 Asynchronous Mailbox Communication
Data arriving at a mailbox generates an event. The event is true while data
remains in the mailbox. As with signal events these events can be waited for
with the @ operator. The following code could be used to replace a wire of
type logic with a FIFO to safely cross clock domains:
typedef mailbox #(logic) l_mbox;
l_mbox lm = new;
logic l_val1;
always @(posedge clock1) lm.put(l_val1) // write data on clock1
logic l_val2;
always @(lm && posedge clock2) lm.get(l_val2); // sync data to
clock2
-------------------------------------------
Note: the alternative code without @(lm) would poll on every "posedge
clock2" and do a try_get - which is a lot more inefficient.
Regards,
Kev.
-- National Semiconductor, Tel: (408) 721 3251 2900 Semiconductor Drive, Mail Stop D3-500, Santa Clara, CA 95052-8090
This archive was generated by hypermail 2b28 : Thu Dec 12 2002 - 16:21:34 PST