i have designed a pipelined adc, but i don't know how to get the output file consisted of output codes from output waveform of adc; that is, how to convert analog high and low level(vdd and 0) into binary code,and save these binary codes(such as,10bit) into a txt file, then for matlab processing? pls help me.
i have designed a pipelined adc, but i don't know how to get the output file consisted of output codes from output waveform of adc; that is, how to convert analog high and low level(vdd and 0) into binary code,and save these binary codes(such as,10bit) into a txt file, then for matlab processing? pls help me.
thank jiangxb.but there is another problem, when i simulate the circuit in background, i can't get the txt file as i can not in background.it says nil.why?
how to get the txt file in background simulation ? thanks.
i have not simulated the circuit in background. but i think you can find the simulation result file TRAN.TRAN where you can get the result using ocnPrint command.
the other method is opening the TRAN.TRAN file in spice explorer and then exporting the result as txt file.
use strobe and printv (or somthing simelar, can't remember). Strobe can be setup in Tran under options. Set the strobeperiode to your clock fre. This acts as a ideal SH. It only taks the value at the strobperiode value. With the delay you can move it to any place in the cycel you want.
With printv you print it to a*.txt. You can also use ocean is also very good to have. Don't forget to set the output format to "sientific", if you don't, it makes numbers like this: 1.213312u instead of 1.213312e-6(wiche is batter for MATLAB)