📄 altera_mf.v
字号:
// Copyright (C) 1988-2004 Altera Corporation
// Any megafunction design, and related netlist (encrypted or decrypted),
// support information, device programming or simulation file, and any other
// associated documentation or information provided by Altera or a partner
// under Altera's Megafunction Partnership Program may be used only
// to program PLD devices (but not masked PLD devices) from Altera. Any
// other use of such megafunction design, netlist, support information,
// device programming or simulation file, or any other related documentation
// or information is prohibited for any other purpose, including, but not
// limited to modification, reverse engineering, de-compiling, or use with
// any other silicon devices, unless such use is explicitly licensed under
// a separate agreement with Altera or a megafunction partner. Title to the
// intellectual property, including patents, copyrights, trademarks, trade
// secrets, or maskworks, embodied in any such megafunction design, netlist,
// support information, device programming or simulation file, or any other
// related documentation or information provided by Altera or a megafunction
// partner, remains with Altera, the megafunction partner, or their respective
// licensors. No other licenses, including any licenses needed under any third
// party's intellectual property, are provided herein.
// Quartus II 4.0 Build 214 1/28/2004
//START_MODULE_NAME------------------------------------------------------------
//
// Module Name : ALTERA_DEVICE_FAMILIES
//
// Description : Common Altera device families comparison
//
// Limitation :
//
// Results expected:
//
//END_MODULE_NAME--------------------------------------------------------------
`timescale 1 ps / 1 ps
module lcell (in, out);
input in;
output out;
assign out = in;
endmodule
`timescale 1 ps / 1 ps
module global (in, out);
input in;
output out;
assign out = in;
endmodule
`timescale 1 ps / 1 ps
module carry (in, out);
input in;
output out;
assign out = in;
endmodule
`timescale 1 ps / 1 ps
module cascade (in, out);
input in;
output out;
assign out = in;
endmodule
`timescale 1 ps / 1 ps
module carry_sum (sin, cin, sout, cout);
input sin;
input cin;
output sout;
output cout;
assign sout = sin;
assign cout = cin;
endmodule
`timescale 1 ps / 1 ps
module exp (in, out);
input in;
output out;
assign out = ~in;
endmodule
// BEGINNING OF MODULE
`timescale 1 ps / 1 ps
// MODULE DECLARATION
module ALTERA_DEVICE_FAMILIES;
// FUNCTON DECLARATION
function IS_VALID_FAMILY;
input device;
reg[8*20:1] device;
reg is_valid;
begin
if (IS_FAMILY_APEX20K(device) || IS_FAMILY_APEX20KE(device) ||
IS_FAMILY_APEXII(device) || IS_FAMILY_ACEX2K(device) || IS_FAMILY_STRATIXGX(
device) || IS_FAMILY_STRATIX(device) || IS_FAMILY_MERCURY(device) ||
IS_FAMILY_FLEX10KE(device) || IS_FAMILY_FLEX10K(device) ||
IS_FAMILY_FLEX10KA(device) || IS_FAMILY_FLEX6000(device) ||
IS_FAMILY_MAX7000B(device) || IS_FAMILY_MAX7000AE(device) ||
IS_FAMILY_MAX3000A(device) || IS_FAMILY_MAX7000S(device) ||
IS_FAMILY_MAX7000A(device) || IS_FAMILY_STRATIXII(device) ||
IS_FAMILY_STRATIXHC(device) || IS_FAMILY_MAXII(device))
is_valid = 1;
else
is_valid = 0;
IS_VALID_FAMILY = is_valid;
end
endfunction // IS_VALID_FAMILY
function IS_FAMILY_APEX20K;
input device;
reg[8*20:1] device;
reg is_20k;
begin
if (device == "APEX20K")
is_20k = 1;
else
is_20k = 0;
IS_FAMILY_APEX20K = is_20k;
end
endfunction // IS_FAMILY_APEX20K
function IS_FAMILY_APEX20KE;
input device;
reg[8*20:1] device;
reg is_20ke;
begin
if ((device == "APEX20KE") || (device == "APEX20KC") ||
(device == "EXCALIBUR_ARM") || (device == "EXCALIBUR_MIPS"))
is_20ke = 1;
else
is_20ke = 0;
IS_FAMILY_APEX20KE = is_20ke;
end
endfunction // IS_FAMILY_APEX20KE
function IS_FAMILY_APEXII;
input device;
reg[8*20:1] device;
reg is_apexii;
begin
if ((device == "APEX II") || (device == "APEXII"))
is_apexii = 1;
else
is_apexii = 0;
IS_FAMILY_APEXII = is_apexii;
end
endfunction // IS_FAMILY_APEXII
function IS_FAMILY_ACEX2K;
input device;
reg[8*20:1] device;
reg is_acex2k;
begin
if ((device == "CYCLONE") || (device == "Cyclone"))
is_acex2k = 1;
else
is_acex2k = 0;
IS_FAMILY_ACEX2K = is_acex2k;
end
endfunction // IS_FAMILY_ACEX2K
function IS_FAMILY_STRATIXGX;
input device;
reg[8*20:1] device;
reg is_stratixgx;
begin
if ((device == "STRATIX-GX") || (device == "STRATIX GX") ||
(device == "Stratix GX"))
is_stratixgx = 1;
else
is_stratixgx = 0;
IS_FAMILY_STRATIXGX = is_stratixgx;
end
endfunction // IS_FAMILY_STRATIXGX
function IS_FAMILY_STRATIX;
input device;
reg[8*20:1] device;
reg is_stratix;
begin
if ((device == "STRATIX") || (device == "Stratix"))
is_stratix = 1;
else
is_stratix = 0;
IS_FAMILY_STRATIX = is_stratix;
end
endfunction // IS_FAMILY_STRATIX
function IS_FAMILY_MERCURY;
input device;
reg[8*20:1] device;
reg is_mercury;
begin
if ((device == "MERCURY") || (device == "Mercury"))
is_mercury = 1;
else
is_mercury = 0;
IS_FAMILY_MERCURY = is_mercury;
end
endfunction // IS_FAMILY_MERCURY
function IS_FAMILY_FLEX10KE;
input device;
reg[8*20:1] device;
reg is_flex10ke;
begin
if ((device == "FLEX10KE") || (device == "FLEX 10KE") ||
(device == "ACEX1K") || (device == "ACEX 1K"))
is_flex10ke = 1;
else
is_flex10ke = 0;
IS_FAMILY_FLEX10KE = is_flex10ke;
end
endfunction // IS_FAMILY_FLEX10KE
function IS_FAMILY_FLEX10K;
input device;
reg[8*20:1] device;
reg is_flex10k;
begin
if ((device == "FLEX10K") || (device == "flex10k") || (device == "FLEX 10K") || (device == "flex 10k"))
is_flex10k = 1;
else
is_flex10k = 0;
IS_FAMILY_FLEX10K = is_flex10k;
end
endfunction //IS_FAMILY_FLEX10K
function IS_FAMILY_FLEX10KA;
input device;
reg[8*20:1] device;
reg is_flex10ka;
begin
if ((device == "FLEX10KA") || (device == "flex10ka") || (device == "FLEX 10KA") || (device == "flex 10ka"))
is_flex10ka = 1;
else
is_flex10ka = 0;
IS_FAMILY_FLEX10KA = is_flex10ka;
end
endfunction //IS_FAMILY_FLEX10KA
function IS_FAMILY_FLEX6000;
input device;
reg[8*20:1] device;
reg is_flex6000;
begin
if ((device == "FLEX6000") || (device == "flex6000") || (device == "FLEX 6000") || (device == "flex 6000") || (device == "FLEX6K") || (device == "flex6k"))
is_flex6000 = 1;
else
is_flex6000 = 0;
IS_FAMILY_FLEX6000 = is_flex6000;
end
endfunction //IS_FAMILY_FLEX6000
function IS_FAMILY_MAX7000B;
input device;
reg[8*20:1] device;
reg is_max7000b;
begin
if ((device == "MAX7000B") || (device == "max7000b") || (device == "MAX 7000B") || (device == "max 7000b"))
is_max7000b = 1;
else
is_max7000b = 0;
IS_FAMILY_MAX7000B = is_max7000b;
end
endfunction //IS_FAMILY_MAX7000B
function IS_FAMILY_MAX7000AE;
input device;
reg[8*20:1] device;
reg is_max7000ae;
begin
if ((device == "MAX7000AE") || (device == "max7000ae") || (device == "MAX 7000AE") || (device == "max 7000ae"))
is_max7000ae = 1;
else
is_max7000ae = 0;
IS_FAMILY_MAX7000AE = is_max7000ae;
end
endfunction //IS_FAMILY_MAX7000AE
function IS_FAMILY_MAX3000A;
input device;
reg[8*20:1] device;
reg is_max3000a;
begin
if ((device == "MAX3000A") || (device == "max3000a") || (device == "MAX 3000A") || (device == "max 3000a"))
is_max3000a = 1;
else
is_max3000a = 0;
IS_FAMILY_MAX3000A = is_max3000a;
end
endfunction //IS_FAMILY_MAX3000A
function IS_FAMILY_MAX7000S;
input device;
reg[8*20:1] device;
reg is_max7000s;
begin
if ((device == "MAX7000S") || (device == "max7000s") || (device == "MAX 7000S") || (device == "max 7000s"))
is_max7000s = 1;
else
is_max7000s = 0;
IS_FAMILY_MAX7000S = is_max7000s;
end
endfunction //IS_FAMILY_MAX7000S
function IS_FAMILY_MAX7000A;
input device;
reg[8*20:1] device;
reg is_max7000a;
begin
if ((device == "MAX7000A") || (device == "max7000a") || (device == "MAX 7000A") || (device == "max 7000a"))
is_max7000a = 1;
else
is_max7000a = 0;
IS_FAMILY_MAX7000A = is_max7000a;
end
endfunction //IS_FAMILY_MAX7000A
function IS_FAMILY_STRATIXII;
input device;
reg[8*20:1] device;
reg is_stratixii;
begin
if ((device == "Stratix II") || (device == "StratixII"))
is_stratixii = 1;
else
is_stratixii = 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -