Thursday, January 08, 2009     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: unsynthesisable keyword - typedef enum ?
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
SHL
Posts: 8
Online: User is Offline
8/16/2007 8:42 AM  

Hi there,

I ve written a program by using typedef enum as shown below and it cannot be synthesis. Syntax Error stated :
- Expecting module level statement
- Expecting target variable, got p_state - Misspelling?
- Expecting radix character (one of b, o, h, or d) or unsized single bit literal (one of '1, '0, 'x, 'z)

Can anyone give me some advice on this? thank you very much.

typedef enum logic ΐ:0]{
 Idle = 0,
 Fetch = 1,
 Exe = 2
} state_type;
state_type p_state, n_state;

always @ ( posedge clk or negedge nreset)
begin
  if (~nreset)
    p_state = state_type'(Idle);
  else if (clk)
    p_state = n_state;
end

tpylant
Posts: 87
Online: User is Offline
8/16/2007 9:38 AM  
You stated that this is in a program block. I would consider program blocks to be used only in testbench and not synthesizable. Try changing the program/endprogram to a module/endmodule and see if that resolves the problem.

TIm
SHL
Posts: 8
Online: User is Offline
8/16/2007 3:21 PM  
Hi Tim,

Sorry. I am actually writting a module and wish to synthesis it. It is a Controller block.

SHL
tpylant
Posts: 87
Online: User is Offline
8/17/2007 10:22 AM  
Are you using RC (RTL Compiler)? Using RC 6.2 and RC 7.1 with the '-sv' switch, it ran through RC (read_hdl/elab/synth) quickly without any issues or messages at all. Resulting structure looks likie what I'd expect based on the always block.

If you're still having problems, you'll probably get better answers by posting to the Synthesis forum (http://www.cdnusers.org/Forums/tabid/52/view/topics/forumid/17/Default.aspx).

Tim
SHL
Posts: 8
Online: User is Offline
8/17/2007 1:53 PM  
Im using Synplify Pro 8.6 as my synthesis tool.
tpylant
Posts: 87
Online: User is Offline
8/17/2007 2:30 PM  
I would advise checking with Synplify on their support SystemVerilog. From the IUS and RC side, your code is supported.

Tim
ajeetha
Posts: 97
Online: User is Offline
8/20/2007 3:43 AM  
Posted By SHL on 8/17/2007 1:53 PM
Im using Synplify Pro 8.6 as my synthesis tool.
Hi SHL,
    As Tim suggested you should work with Synplicty for this. Or you can drop me an email separately via ajeetha <> gmail.com or akumari <> noveldv.com for this issue, I've a working example for you that runs with Synplicity.

Meanwhile in your code 2 comments:

1. You should use NBA in sequential block.
2. Why do you need typecasting on p_state = Idle?

Try the folloing code in latest version (8.9 version):


<br><p><font color="#ff0000">typedef enum logic ΐ:0]{<br> Idle = 0, <br> Fetch = 1, <br> Exe = 2 <br>} state_type;<br>state_type p_state, n_state;</font></p>
<p><font color="#ff0000">always @ ( posedge clk or negedge nreset)<br>begin<br>  if (~nreset) <br>    p_state <= Idle;<br>  else if (clk) <br>    p_state <= n_state;<br>end</font></p>


HTH
Ajeetha, CVC
www.noveldv.com
ajeetha
Posts: 97
Online: User is Offline
8/20/2007 3:44 AM  
Posted By SHL on 8/17/2007 1:53 PM
Im using Synplify Pro 8.6 as my synthesis tool.
Hi SHL,
    As Tim suggested you should work with Synplicty for this. Or you can drop me an email separately via ajeetha <> gmail.com or akumari <> noveldv.com for this issue, I've a working example for you that runs with Synplicity.

Meanwhile in your code 2 comments:

1. You should use NBA in sequential block.
2. Why do you need typecasting on p_state = Idle?

Try the folloing code in latest version (8.9 version):



typedef enum logic ΐ:0]{
 Idle = 0,
 Fetch = 1,
 Exe = 2
} state_type;
state_type p_state, n_state;

always @ ( posedge clk or negedge nreset)
begin
  if (~nreset)
    p_state <= Idle;
  else if (clk)
    p_state <= n_state;
end



HTH
Ajeetha, CVC
www.noveldv.com
Posting to forums is available to community members only.
Login or Register

Forums > Functional Verification > SystemVerilog > unsynthesisable keyword - typedef enum ?


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.