📄 class.ptf
字号:
CLASS altera_avalon_cfi_flash
{
SDK_GENERATION
{
SDK_FILES 0
{
cpu_architecture = "always";
sdk_files_dir = "sdk";
c_header_file = "sdk/am29lv065d_flash_struct.h";
}
}
ASSOCIATED_FILES
{
Add_Program = "default";
Edit_Program = "default";
Generator_Program = "cfi_flash.pl";
}
MODULE_DEFAULTS
{
class = "altera_avalon_cfi_flash";
class_version = "1.1";
iss_model_name = "altera_avalon_flash";
HDL_INFO
{
}
SLAVE s1
{
PORT_WIRING
{
PORT data
{
width = "8";
is_shared = "1";
direction = "inout";
type = "data";
}
PORT address
{
width = "23";
is_shared = "1";
direction = "input";
type = "address";
}
PORT read_n
{
width = "1";
is_shared = "1";
direction = "input";
type = "read_n";
}
PORT write_n
{
width = "1";
is_shared = "1";
direction = "input";
type = "write_n";
}
PORT select_n
{
width = "1";
is_shared = "0";
direction = "input";
type = "chipselect_n";
}
}
WIZARD_SCRIPT_ARGUMENTS
{
class = "altera_avalon_cfi_flash";
Supports_Flash_File_System = "1";
}
SYSTEM_BUILDER_INFO
{
Bus_Type = "avalon_tristate";
Is_Nonvolatile_Storage = "1";
Is_Memory_Device = "1";
Address_Alignment = "dynamic";
Has_IRQ = "0";
IRQ_Number = "N/A";
Base_Address = "--unknown--";
Data_Width = "8";
Address_Width = "23";
Simulation_Num_Lanes = "1";
Convert_Xs_To_0 = "1";
}
}
SYSTEM_BUILDER_INFO
{
Make_Memory_Model = "1";
Is_Enabled = "1";
Instantiate_In_System_Module = "0";
Top_Level_Ports_Are_Enumerated = "1";
}
WIZARD_SCRIPT_ARGUMENTS
{
Setup_Value = "40";
Wait_Value = "160";
Hold_Value = "40";
Timing_Units = "ns";
Unit_Multiplier = "1";
}
}
USER_INTERFACE
{
USER_LABELS
{
name = "Flash Memory (Common Flash Interface)";
technology = "Memory,EP1S10 Nios Development Board Stratix Edition,EP1S40 Nios Development Board Stratix Pro Edition,EP1C20 Nios Development Board Cyclone Edition,EP2S60 Nios Development Board Stratix II Edition,EP2S60 DSP Board Stratix II Edition";
}
LINKS
{
LINK help
{
title="Data Sheet";
url="http://www.altera.com/literature/hb/nios2/n2cpu_nii51013.pdf";
}
}
WIZARD_UI default
{
title = "Flash Memory (Common Flash Interface) - {{ $MOD }}";
CONTEXT
{
SWSA = "SLAVE s1/WIZARD_SCRIPT_ARGUMENTS";
WSA = "WIZARD_SCRIPT_ARGUMENTS";
SBI = "SLAVE s1/SYSTEM_BUILDER_INFO";
MODULE_SBI = "SYSTEM_BUILDER_INFO";
SPWA = "SLAVE s1/PORT_WIRING/PORT address";
SPWD = "SLAVE s1/PORT_WIRING/PORT data";
}
$$cfi_new_refdes = "{{ if ($SWSA/flash_reference_designator == '') '--none--'; else $SWSA/flash_reference_designator; }}";
$$add_code = "{{ if ($$add) 1; else 0; }}";
$$edit_code = "{{ if ($$edit) 1; else 0; }}";
$$cfi_utilcomponentclass = "altera_avalon_cfi_flash";
$$no_board_is_selected = "{{ $SYSTEM/WIZARD_SCRIPT_ARGUMENTS/board_class == ''; }}";
$$cfi_instances = "{{ sopc_slave_list('WIZARD_SCRIPT_ARGUMENTS/class=altera_avalon_cfi_flash'); }}";
$$sopc_kit_nios2 = "{{ sopc_get_kit_dir('sopc_kit_nios2'); }}";
ACTION get_flash_info
{
code = "{{
$$board_info = exec_and_wait(
$$sopc_kit_nios2+'/components/'+$$cfi_utilcomponentclass+'/cfi_flash.pl',
'get_board_info',
$$system_directory+'/'+$SYSTEM+'.ptf',
$$/target_module_name,
$$cfi_instances,
's1',
$$cfi_new_refdes,
$$add_code,
$$edit_code,
$SYSTEM/WIZARD_SCRIPT_ARGUMENTS/board_class,
$BUS/BOARD_INFO/altera_avalon_cfi_flash/reference_designators
);
$$extra_info = exec_and_wait(
$$sopc_kit_nios2+'/components/'+$$cfi_utilcomponentclass+'/cfi_flash.pl',
'get_extra_info',
$$system_directory+'/'+$SYSTEM+'.ptf',
$$/target_module_name,
$$cfi_instances,
's1',
$$cfi_new_refdes,
$$add_code,
$$edit_code,
$SYSTEM/WIZARD_SCRIPT_ARGUMENTS/board_class,
$BUS/BOARD_INFO/altera_avalon_cfi_flash/reference_designators
);
if ($$board_info == 'no_board')
{
$$error_message = '';
$$warning_message = '';
$$enabled_combo = 1;
$$editable_combo = 1;
}
if ($$board_info == 'error')
{
$$error_message = $$extra_info;
$$warning_message = '';
$$enabled_combo = 1;
$$editable_combo = 1;
}
if ($$board_info == 'warning')
{
$$warning_message = $$extra_info;
$$error_message = '';
$$enabled_combo = 1;
$$editable_combo = 1;
}
if ($$board_info == '1_ref_des')
{
$$error_message = '';
$$warning_message = '';
$$enabled_combo = 0;
$$editable_combo = 0;
}
if ($$board_info == 'some_ref_des')
{
$$error_message = '';
$$warning_message = '';
$$enabled_combo = 1;
$$editable_combo = 0;
}
}}";
}
ACTION initialize
{
code = "{{
post_event('get_flash_info');
if ($$add)
{
if ($$board_info == 'some_ref_des')
{
$SWSA/flash_reference_designator = $$extra_info;
$$cfi_new_refdes = $$extra_info;
}
if ($$board_info == '1_ref_des')
{
$SWSA/flash_reference_designator = $$extra_info;
$$cfi_new_refdes = $$extra_info;
}
if ($SYS/board_class == 'altera_nios_dev_board_stratix_2s60_es')
{
$SPWA/width = 24;
$SBI/Address_Width = 24;
$WSA/Setup_Value = 45;
$WSA/Hold_Value = 35;
}
}
}}";
}
PAGES main
{
PAGE 1
{
GROUP
{
layout = "horizontal";
TEXT { title = "Presets:"; }
COMBO
{
id = "preset";
ITEM { title = "(Custom)"; }
ITEM
{
title = "AMD29LV065D-120R";
DATA
{
SLAVE s1
{
PORT_WIRING
{
PORT address
{
width = "23";
}
PORT data
{
width = "8";
}
}
SYSTEM_BUILDER_INFO
{
Data_Width = "8";
Address_Width = "23";
Simulation_Num_Lanes = "1";
}
}
WIZARD_SCRIPT_ARGUMENTS
{
Setup_Value = "40";
Wait_Value = "160";
Hold_Value = "40";
Timing_Units = "ns";
Unit_Multiplier = "1";
}
}
}
ITEM
{
title = "AMD29LV128M-123R (BYTE Mode)";
DATA
{
SLAVE s1
{
PORT_WIRING
{
PORT address
{
width = "24";
}
PORT data
{
width = "8";
}
}
SYSTEM_BUILDER_INFO
{
Data_Width = "8";
Address_Width = "24";
Simulation_Num_Lanes = "1";
}
}
WIZARD_SCRIPT_ARGUMENTS
{
Setup_Value = "45";
Wait_Value = "160";
Hold_Value = "35";
Timing_Units = "ns";
Unit_Multiplier = "1";
}
}
}
ITEM
{
title = "AMD29LV128M-123R (WORD Mode)";
DATA
{
SLAVE s1
{
PORT_WIRING
{
PORT address
{
width = "23";
}
PORT data
{
width = "16";
}
}
SYSTEM_BUILDER_INFO
{
Data_Width = "16";
Address_Width = "23";
Simulation_Num_Lanes = "2";
}
}
WIZARD_SCRIPT_ARGUMENTS
{
Setup_Value = "45";
Wait_Value = "160";
Hold_Value = "35";
Timing_Units = "ns";
Unit_Multiplier = "1";
}
}
}
ITEM
{
title = "AMD29LV641DH-123R ";
DATA
{
SLAVE s1
{
PORT_WIRING
{
PORT address
{
width = "22";
}
PORT data
{
width = "16";
}
}
SYSTEM_BUILDER_INFO
{
Data_Width = "16";
Address_Width = "22";
Simulation_Num_Lanes = "2";
}
}
WIZARD_SCRIPT_ARGUMENTS
{
Setup_Value = "45";
Wait_Value = "160";
Hold_Value = "35";
Timing_Units = "ns";
Unit_Multiplier = "1";
}
}
}
ITEM
{
title = "TE28F320J3A-110 (BYTE Mode)";
DATA
{
SLAVE s1
{
PORT_WIRING
{
PORT address
{
width = "22";
}
PORT data
{
width = "8";
}
}
SYSTEM_BUILDER_INFO
{
Data_Width = "8";
Address_Width = "22";
Simulation_Num_Lanes = "1";
}
}
WIZARD_SCRIPT_ARGUMENTS
{
Setup_Value = "50";
Wait_Value = "160";
Hold_Value = "35";
Timing_Units = "ns";
Unit_Multiplier = "1";
}
}
}
ITEM
{
title = "TE28F320J3A-110 (WORD Mode)";
DATA
{
SLAVE s1
{
PORT_WIRING
{
PORT address
{
width = "21";
}
PORT data
{
width = "16";
}
}
SYSTEM_BUILDER_INFO
{
Data_Width = "16";
Address_Width = "21";
Simulation_Num_Lanes = "2";
}
}
WIZARD_SCRIPT_ARGUMENTS
{
Setup_Value = "50";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -