Is there a way to simulate a digital to analog converter in ModelSim????? I have my Verilog code that produces the 16 bit input to a DAC . It would be really nice if I could somehow see the analog waveform in simulation...
Is there a way to simulate a digital to analog converter in ModelSim????? I have my Verilog code that produces the 16 bit input to a DAC . It would be really nice if I could somehow see the analog waveform in simulation...
Take the 16 bit input and divide it by the full scale range and then multiply by the full scale output range. For example, if the 16 bit input you mentioned is meant to represent 0-65535 and the DAC produces an output that is between 0 and 3.3 Volts then the conversion would be
Where Dac_input is std_logic_vector(15 downto 0); (i.e. the 16 bit DAC input)
Vout is type real
I'd be surprised that your DAC would have a 16 bit parallel input, but that is your problem statement. Assuming it doesn't then the real DAC input is probably some form of serial stream in which case you then would need to create a serial to parallel conversion that produces the signal Dac_input.