AHDL (Altera)

AHDL (Altera Hardware Description Language), Altera ortaklığı tarafından kendi ürettiği CPLD ve FPGA türündeki aygıtlarla birlikte kullanılmak üzere geliştirilen ve pazarlanan bir sayısal donanım tanımlama dilidir. Bu donanım tanımlama dilinin C programlama diline benzer yapısı ve VHDL diline benzer işlevi vardır. Altera'nın Quartus ve Max+ serisi derleyicileriyle derlenir.

Örnek kod:

% a simple AHDL up counter, released to public domain 11/13/2006 %
% [block quotations achieved with percent sign] %
% like c, ahdl functions must be prototyped %

% PROTOTYPE:
 FUNCTION COUNTER (CLK)
	RETURNS (CNTOUT[7..0]); %

% function declaration, where inputs, outputs, and
bidirectional pins are declared %
% also like c, square brakets indicate an array %

SUBDESIGN COUNTER
(
	CLK		:INPUT;
	CNTOUT[7..0]	:OUTPUT;
)

% variables can be anything from flip-flops (as in this case),
tri-state buffers, state machines, to user defined functions %

VARIABLE
	TIMER[7..0]: DFF;

% as with all hardware description languages, think of this
 less as an algorithm and more as wiring nodes together %

BEGIN
	DEFAULTS

		TIMER[].prn = VCC; %  this takes care of d-ff resets %
		TIMER[].clrn = VCC;
	END DEFAULTS;

	TIMER[].d = TIMER[].q + H"1";
END;

Ayrıca bakınız

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.