The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 19th, 2024, 2:02pm
Pages: 1
Send Topic Print
1-bit A2D having flexible thresholds for the analog signal (Read 3349 times)
Zorro
Community Member
***
Offline



Posts: 63

1-bit A2D having flexible thresholds for the analog signal
Sep 02nd, 2016, 7:34am
 
Hi All,

I have a question regarding "Digital Sensitivity to Analog Events".

I am using following code to convert the electrical signal V(in, vss) to digital and it is working fine.

     always @(above(V(in, vss)-thr_high)) begin
           in_dig = 1;
     end

     always @(above(thr_low-V(in, vss))) begin
           in_dig = 0;
     end      

     
This works fine when the thresholds thr_high and thr_low are well known and fixed. Let's say for example if the input signal "in" goes from 0V to 3V I can define thr_high=2V, thr_low=1V and everything is fine.

The problem is: how to discretize the analog signal "in" if the signal values for the threshols are flexible???


Example
Imagine that the input signal looks like in the attached picture.
The input signal "in" is allowed to be between 2V and 3V, and the peak-to-peak variation can be 100mV to 200mV.


Region 1
should be discretized because "in" is between the allowed limits 2V and 3V and the peak-to-peak is between 100mV and 200mV.

Region 2
should be discretized because "in" is between the allowed limits 2V and 3V and the peak-to-peak is between 100mV and 200mV.

Region 3
should be discretized because "in" is between the allowed limits 2V and 3V and the peak-to-peak is between 100mV and 200mV.

Region 4
should not be discretized because "in" is above the allowed limits 2V and 3V .

Region 5
should not be discretized because "in" is below the allowed limits 2V and 3V .

Region 6
should not be discretized;  "in" is between the allowed limits 2V and 3V but the peak-to-peak is larger than 200mV.

Region 7
should be discretized because "in" is between the allowed limits 2V and 3V and the peak-to-peak is between 100mV and 200mV.

So my problem in general is how to detect a variable transition of the input signal as long as it is inside the valid limits?

Thank you!
Zorro
Back to top
 

pict01.png
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: 1-bit A2D having flexible thresholds for the analog signal
Reply #1 - Sep 3rd, 2016, 12:55am
 
I have no idea what you are asking.

What does "The input signal "in" is allowed to be between 2V and 3V" mean?

What does "should be discretized" mean?

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: 1-bit A2D having flexible thresholds for the analog signal
Reply #2 - Sep 3rd, 2016, 1:15am
 
Hello Ken,

sorry the question was not asked correctly.

The conversion from analog to digital applies only if the analog signal "in" is between 2V and 3V. If "in" is above 3V or below 2V then the digital signal "in_dig" should remain low.

Thank you!
Zorro.
Back to top
 
 
View Profile   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: 1-bit A2D having flexible thresholds for the analog signal
Reply #3 - Sep 3rd, 2016, 1:22am
 
The tricky part is that the maximum peak-to-peak voltage of the input signal is 200mV.
This means an input signal "in" could have pulses from 1.0V to 1.2V. (a)
Then the input signal "in" could have pulses from 1.4V to 1.6V. (b)
Then the input signal "in" could have pulses from 1.8V to 2.0V. (c)
In other words, we don't have the same threshold crossings all the time.

1. if we define a fixed threshold of let's say 1.1V then only (a) would be converted to digital but not (b) and (c).
2. if we define a fixed threshold of let's say 1.5V then only (b) would be converted to digital but not (a) and (c).

Thank you!
Zorro.

Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: 1-bit A2D having flexible thresholds for the analog signal
Reply #4 - Sep 6th, 2016, 6:02am
 
Zorro wrote on Sep 3rd, 2016, 1:15am:
If "in" is above 3V or below 2V then the digital signal "in_dig" should remain low.


Is this what you meant, or should the output be high when "in" is above 3V? It looks to me that your original post indicated the latter:

Code:
     always @(above(V(in, vss)-thr_high)) begin
	     in_dig = 1;
     end 



I don't understand what "in_dig" is supposed to be; you call it a digital signal and show values of 0 or 1, but then you talk about an analog to digital conversion, as though maybe it's not just a single bit.

I'm not sure you need the @above event; why not just have
Code:
  if (V(in,vss) > thr_high) begin
    in_dig = 1;
  end else if (V(in,vss) < thr_low) begin
    in_dig = 0;
  end else begin
    // not sure if this is what you meant by "discretized" or "converted"
    in_dig = (V(in,vss) - thr_low)/(thr_high-thr_low);
  end 


Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.