Friday, November 21, 2008     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: serial transmission of structures
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
marco.stanzani
Posts: 11
Online: User is Offline
7/21/2006 6:46 AM  

hi there
I am looking for a 'proper' way to serially send data on a line (my application is ISO7816 but it could be any serial p[rotocol modeling)
Data are defined by

typedef enum byte {direct = 8'h3b, inverse = 8'h3f} t_InitChar;
typedef struct packed {
  bit td;
  bit tc;
  bit tb;
  bit ta;
  bit Α:0] nr_hist;
} t_FormatChar;

Which define the 7816 ATR patter

typedef struct packed {
  t_InitChar ts;
  t_FormatChar t0;
} t_atr;

I  can to send this patter by a s2p converter using the following

module p2s (in_array, out1, clk, reset, en);
parameter LE = 8;
   input clk, reset, en;
   input [LE-1:0] in_array;
   output      out1; 
   reg [LE:0]   par;
   reg         out1; 
   always @(posedge clk) begin
      if (reset)
          par <= 'b0;
      else if (en)
          par <= in_array;
      else
          {out1,par} <= {par,1'b0};
   end // always @ (posedge clk)
endmodule // p2s

and compose a pre-filled array by the structure members: still, I feel this is not the proper 'SystemVerolog'  way

Srry for this newbie question by a Verilog user which is moving into System verilog :-)

thanks


Marco Stanzani Accent S.p.A.
Sr. Consultant Engineer via Torri Bianche 3
Tel. +39-039-6290020 20059 - Vimercate (MI), Italy
kameade
Posts: 13
Online: User is Offline
7/21/2006 11:18 AM  
Hello Marco,

Since you defined your t_FormatChar type as a packed structure, you can treat it as a vector or access the individual fields. So your p2s module should be fine.  If you don't need to synthesize the p2s module you can use a task to do the parallel to serial transmission.  I have attached an example to this response in case you are interested.

I hope that helps!

Kathleen

Attachment: p2s.txt

Posting to forums is available to community members only.
Login or Register

Forums > Functional Verification > SystemVerilog > serial transmission of structures


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.