Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
'x' state on one bit of the input bus of an adder cause the output bus be all 'x' during simulation
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Haiwen  
View profile  
 More options Feb 6, 12:39 am
Newsgroups: comp.arch.fpga
From: Haiwen <heavenf...@gmail.com>
Date: Sun, 5 Feb 2012 21:39:03 -0800 (PST)
Local: Mon, Feb 6 2012 12:39 am
Subject: 'x' state on one bit of the input bus of an adder cause the output bus be all 'x' during simulation
I have an adder:
module adder(
input [1:0] add1,
input [1:0] add2,
output [2:0] addout
);
assign addout = add1 + add2;
endmodule

The input is:
add1 = 2'bx0;
add2 = 2'b00;

The RTL simulation result is:
addout = 3'bxxx;

The Timing simulation result is:
addout = 3'b0x0;
and this is what I expected.

How can I solve the mismatch in RTL simulation?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Maryan  
View profile  
 More options Feb 6, 9:42 am
Newsgroups: comp.arch.fpga
From: Chris Maryan <kmar...@gmail.com>
Date: Mon, 6 Feb 2012 06:42:53 -0800 (PST)
Local: Mon, Feb 6 2012 9:42 am
Subject: Re: 'x' state on one bit of the input bus of an adder cause the output bus be all 'x' during simulation
The "timing" simulation is probably on a post synthesis or post fit netlist, where the "+" has been converted to a proper adder in whatever logic is appropriate for your application. Describe a complete adder out of plain gates and you will get what you want. (i.e. describe a ripple-carry adder or some other architecture)

Moreover, why do you care about the details of the output of an adder with an X input?

Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy  
View profile  
 More options Feb 7, 11:03 am
Newsgroups: comp.arch.fpga
From: Andy <jonesa...@comcast.net>
Date: Tue, 7 Feb 2012 08:03:10 -0800 (PST)
Local: Tues, Feb 7 2012 11:03 am
Subject: Re: 'x' state on one bit of the input bus of an adder cause the output bus be all 'x' during simulation
On Feb 6, 8:42 am, Chris Maryan <kmar...@gmail.com> wrote:

> Moreover, why do you care about the details of the output of an adder with an X input?

> Chris

Because the actual behavior of the HW is implementation dependent, the
RTL operator does not attempt to define its behavior for inputs
containing meta-values, beyond the whole result being 'unknown'.

To compare the results, I would take the RTL outputs, run them through
a 'X' to '-' ('unknown' to 'dont care') conversion (probably need to
write your own function), and then use std_match() to compare the RTL
vs gate level outputs.

This in effect says that for verification, if the output of the RTL is
not known, then the output of the gate level sim is of no consequence.

Andy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Snowy  
View profile  
 More options Feb 7, 11:53 am
Newsgroups: comp.arch.fpga
From: "Snowy" <snowybr...@charter.net>
Date: Tue, 7 Feb 2012 10:53:16 -0600
Local: Tues, Feb 7 2012 11:53 am
Subject: Re: 'x' state on one bit of the input bus of an adder cause the output bus be all 'x' during simulation
It takes some bit manipulation to handle unknowns exactly.  That takes
programmer time and CPU time (I've done it).  Most likely they traded off
exactness for speed.  Usually, you don’t care about the result unless it is
totally defined.  As someone else suggested, you might need to write your
own model if you want exactness.

Gary

"Haiwen"  wrote in message

news:3d0b033f-3994-43d5-a1e6-0fb463b0a86f@n8g2000pbc.googlegroups.com...

I have an adder:
module adder(
input [1:0] add1,
input [1:0] add2,
output [2:0] addout
);
assign addout = add1 + add2;
endmodule

The input is:
add1 = 2'bx0;
add2 = 2'b00;

The RTL simulation result is:
addout = 3'bxxx;

The Timing simulation result is:
addout = 3'b0x0;
and this is what I expected.

How can I solve the mismatch in RTL simulation?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »