Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

synthesizability of casex and caxez

Status
Not open for further replies.

ASIC_int

Advanced Member level 4
Joined
May 14, 2011
Messages
118
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,234
Is caxex and casez synthesizable?
 

ckshivaram

Advanced Member level 5
Joined
Apr 21, 2008
Messages
5,070
Helped
2,149
Reputation
4,304
Reaction score
2,089
Trophy points
1,393
Location
villingen (Germany) / Bangalore
Activity points
30,097
Both casex and casez are synthesizable. Casex generates a don't-care space for unspecified state points. Casez uses a "Z logic value" to represent a don't-care bits.

There are two meanings to an "X". For a simulation, "X" means dont-know but for a synthesis "X" means a don't care. X is synthesizable because it could be anything. All X means it is 1 or a 0.
The statement of a "Z" not being synthesizable is also incorrect. What do you think this verilog code reveals . .
tri [0:3] buf_out = en? in: 4'bz;

Ta-Da! A 4-bit tri-state bus that goes "Z" when disabled.


my knowledge is very limited in this... we can wait for other experts comment too.....
 
  • Like
Reactions: MRAMA

    MRAMA

    points: 2
    Helpful Answer Positive Rating

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,960
Helped
14,147
Reputation
28,553
Reaction score
12,833
Trophy points
1,393
Location
Bochum, Germany
Activity points
278,233
I'm using Verilog language only occasionally and never used casex or casez in a design.

To answer the question exactly, I would like to refer to the Synopsys HDL compiler for Verilog manual. It clarifies, that casex and casez are supported. This means, that 'x' respectively 'z' are allowed for case items. The respective bits are simply ignored for the comparison, you can't check the case expression for 'x' or 'z'.

I only see a purpose of casex or casez in simulation, where variables can acutally take respective values. Support in synthesis mainly means, that they can be compiled without error. In addition, you can use the construct to specify don't care conditions, as mentioned by ckshivaram.
 

ASIC_int

Advanced Member level 4
Joined
May 14, 2011
Messages
118
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,234
Hi Fvm:

CAN U PLEASE ATTACH THE DOCUMENT OF Synopsys HDL compiler for Verilog manual? How to get that?

What do u mean by "The respective bits are simply ignored for the comparison, you can't check the case expression for 'x' or 'z'" ?

I have a IEEE document that indirectly say caxes and casez are not synthesizable if caxe expressions have x or z in them.
 

lostinxlation

Advanced Member level 3
Joined
Aug 19, 2010
Messages
701
Helped
197
Reputation
394
Reaction score
184
Trophy points
1,323
Location
San Jose area
Activity points
5,051
What do u mean by "The respective bits are simply ignored for the comparison, you can't check the case expression for 'x' or 'z'" ?
Have you ever stopped and thought about what kind of logic the synthesis tool will make if 'z' or 'x' are involved in the synthesis ?
It's not a rocket science to understand how z or x in casex/z would be treated during synthesis if you take a real life logic circuit into consideration.
 
Last edited:
  • Like
Reactions: FvM

    FvM

    points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top