[an error occurred while processing this directive]
|
В xapp154 много мелких ошибок. Вот оно же, но причёсанное. Прверил на ISE 6.1 SP3.
module DAC ( DACout, DACin, Clk, Reset );
parameter WIDTH = 8 ;
input [WIDTH-1:0] DACin; // DAC input (excess 2**MSBI)
input Clk;
input Reset;
output reg DACout; /* This is the average output that feeds low pass filter
for optimum performance, ensure that this ff is in IOB */
reg [WIDTH+1:0] DeltaAdder; // Output of Delta adder
reg [WIDTH+1:0] SigmaAdder; // Output of Sigma adder
reg [WIDTH+1:0] SigmaLatch; // Latches output of Sigma adder
reg [WIDTH+1:0] DeltaB; // B input of Delta adder
always @(SigmaLatch) DeltaB = {SigmaLatch[WIDTH+1], SigmaLatch[WIDTH+1]} << (WIDTH);
always @(DACin or DeltaB) DeltaAdder = DACin + DeltaB;
always @(DeltaAdder or SigmaLatch) SigmaAdder = DeltaAdder + SigmaLatch;
always @(posedge Clk or posedge Reset)
begin
if (Reset) begin SigmaLatch <= 1'b1 << (WIDTH); DACout <= 1'b0; end
else begin SigmaLatch <= SigmaAdder; DACout <= SigmaLatch[WIDTH+1]; end
end
endmodule
E-mail: info@telesys.ru