Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

How to write a DAC in VHDL code?

Status
Not open for further replies.

kun

Member level 2
Joined
Oct 15, 2007
Messages
49
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,635
can anyone tell me how to write a simple
DAC VHDL

i know help on that please~~~ :cry:

friday got to hand in

meanwhile i tryiing myself too

if this is in Verilog Module
how to cover to VHDL
anyone please ~~:cry:

module dac(DACout, DACin, Clk, Reset);
output DACout;
reg DACout;
input Clk;
input Reset;

reg ['MSBI+2:0] DeltaAdder;
reg ['MSBI+2:0] SigmaAdder;
reg ['MSBI+2:0] SigmaLatch;
reg ['MSBI+2:0] DeltaB;

always @(SigmaLatch) DeltaB - {SigmaLatch['MSBI+2], SIgmaLatch['MSBI+2]} << ('MSBI+1);

always @(DACin or DelataB) DeltaAdder = DACin + DeltaB;

always @(DelaAdder or SigmaLatch) SigmalAdder = DeltaAdder + SigmaLaych;

always @(posedge Clk or posedge Reset)

begin
IF(Reset)
begin
SigmaLatch <= #1 1'b1 << ('MSBI+1);
DACout <= #1 1'b0;
end
else
begin
SigmaLatch <== #1 SigmaAdder;
DACout <= #1 SigmaLatch['MSBI+2];
end
end
endmodule
 

How to write a DAC

I don't know how to convert Verilog to VHDL, but the code you've shown won't work due to typographical errors.
The original module is in Xilinx application note 154, "Virtex Synthesizable Delta-Sigma DAC":
https://www.xilinx.com/bvdocs/appnotes/xapp154.pdf

Maybe someone else can help you convert it to VHDL.
 

    kun

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top