📄 class.ptf
字号:
#
# Altera UP Avalon RS232 UART
#
CLASS altera_up_avalon_rs232
{
CB_GENERATOR
{
HDL_FILES
{
FILE
{
use_in_simulation = "1";
use_in_synthesis = "1";
type = "verilog";
filepath = "hdl/Altera_UP_Avalon_RS232.v";
}
FILE
{
use_in_simulation = "1";
use_in_synthesis = "1";
type = "verilog";
filepath = "hdl/Altera_UP_RS232_Counters.v";
}
FILE
{
use_in_simulation = "1";
use_in_synthesis = "1";
type = "verilog";
filepath = "hdl/Altera_UP_RS232_In_Deserializer.v";
}
FILE
{
use_in_simulation = "1";
use_in_synthesis = "1";
type = "verilog";
filepath = "hdl/Altera_UP_RS232_Out_Serializer.v";
}
FILE
{
use_in_simulation = "1";
use_in_synthesis = "1";
type = "verilog";
filepath = "hdl/Altera_UP_SYNC_FIFO.v";
}
}
top_module_name = "Altera_UP_Avalon_RS232.v:Altera_UP_Avalon_RS232";
emit_system_h = "0";
LIBRARIES
{
}
}
MODULE_DEFAULTS global_signals
{
class = "altera_up_avalon_rs232";
class_version = "6.0";
SYSTEM_BUILDER_INFO
{
Instantiate_In_System_Module = "1";
Has_Clock = "1";
Default_Module_Name = "uart";
Top_Level_Ports_Are_Enumerated = "1";
}
COMPONENT_BUILDER
{
GLS_SETTINGS
{
}
}
PORT_WIRING
{
PORT clk
{
width = "1";
width_expression = "";
direction = "input";
type = "clk";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT reset
{
width = "1";
width_expression = "";
direction = "input";
type = "reset";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
}
WIZARD_SCRIPT_ARGUMENTS
{
hdl_parameters
{
baud_rate = "115200";
parity = "2";
extra_stop_bit = "0";
}
PARAMETERS
{
BAUD_COUNTER_WIDTH = "9";
BAUD_TICK_INCREMENT = "9d1";
BAUD_TICK_COUNT = "9d433";
HALF_BAUD_TICK_COUNT = "9d216";
TOTAL_DATA_WIDTH = "10";
DATA_WIDTH = "8";
ODD_PARITY = "1b1";
}
SECTIONS
{
USE_EXTRA_STOP_BIT = "0";
USE_DATA_WIDTH_7 = "0";
USE_DATA_WIDTH_8 = "0";
USE_DATA_WIDTH_9 = "0";
}
}
SIMULATION
{
DISPLAY
{
}
}
SLAVE avalon_rs232_slave
{
SYSTEM_BUILDER_INFO
{
Bus_Type = "avalon";
Address_Group = "1";
Has_Clock = "0";
Address_Width = "1";
Address_Alignment = "dynamic";
Data_Width = "32";
Has_Base_Address = "1";
Has_IRQ = "1";
Setup_Time = "0cycles";
Hold_Time = "0cycles";
Read_Wait_States = "0cycles";
Write_Wait_States = "0cycles";
Read_Latency = "1";
Maximum_Pending_Read_Transactions = "0";
Active_CS_Through_Read_Latency = "0";
Is_Printable_Device = "0";
Is_Memory_Device = "0";
Is_Readable = "1";
Is_Writable = "1";
Minimum_Uninterrupted_Run_Length = "1";
}
COMPONENT_BUILDER
{
AVS_SETTINGS
{
Setup_Value = "0";
Read_Wait_Value = "0";
Write_Wait_Value = "0";
Hold_Value = "0";
Timing_Units = "cycles";
Read_Latency_Value = "1";
Minimum_Arbitration_Shares = "1";
Active_CS_Through_Read_Latency = "0";
Max_Pending_Read_Transactions_Value = "1";
Address_Alignment = "dynamic";
Is_Printable_Device = "0";
Interleave_Bursts = "0";
interface_name = "Avalon Slave";
external_wait = "0";
Is_Memory_Device = "0";
}
}
PORT_WIRING
{
PORT address
{
width = "1";
width_expression = "";
direction = "input";
type = "address";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT chipselect
{
width = "1";
width_expression = "";
direction = "input";
type = "chipselect";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT byteenable
{
width = "4";
width_expression = "";
direction = "input";
type = "byteenable";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT read
{
width = "1";
width_expression = "";
direction = "input";
type = "read";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT write
{
width = "1";
width_expression = "";
direction = "input";
type = "write";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT writedata
{
width = "32";
width_expression = "";
direction = "input";
type = "writedata";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT UART_RXD
{
width = "1";
width_expression = "";
direction = "input";
type = "export";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT irq
{
width = "1";
width_expression = "";
direction = "output";
type = "irq";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT readdata
{
width = "32";
width_expression = "";
direction = "output";
type = "readdata";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
PORT UART_TXD
{
width = "1";
width_expression = "";
direction = "output";
type = "export";
is_shared = "0";
vhdl_record_name = "";
vhdl_record_type = "";
}
}
}
}
USER_INTERFACE
{
USER_LABELS
{
name = "RS232 UART";
technology = "University Program DE1 Board,University Program DE2 Board";
}
LINKS
{
LINK datasheet
{
title = "Data Sheet";
url = "../doc/RS232.pdf";
}
}
WIZARD_UI the_wizard_ui
{
title = "RS232 UART - {{ $MOD }}";
CONTEXT
{
H = "WIZARD_SCRIPT_ARGUMENTS/hdl_parameters";
P = "WIZARD_SCRIPT_ARGUMENTS/PARAMETERS";
S = "WIZARD_SCRIPT_ARGUMENTS/SECTIONS";
M = "";
SBI_global_signals = "SYSTEM_BUILDER_INFO";
SBI_avalon_rs232_slave = "SLAVE avalon_rs232_slave/SYSTEM_BUILDER_INFO";
}
ACTION initialize
{
$$inputClock = "{{ sopc_get_clock_freq($MOD) }}";
}
$P/BAUD_COUNTER_WIDTH = "{{ ceil(log2($$inputClock / $H/baud_rate)); }}";
$P/BAUD_TICK_INCREMENT = "{{ $P/BAUD_COUNTER_WIDTH; }}d1";
$P/BAUD_TICK_COUNT = "{{ $P/BAUD_COUNTER_WIDTH; }}d{{ ceil($$inputClock / $H/baud_rate); }}"; # 433";
$P/HALF_BAUD_TICK_COUNT = "{{ $P/BAUD_COUNTER_WIDTH; }}d{{ ceil($$inputClock / ($H/baud_rate * 2)); }}";
$P/TOTAL_DATA_WIDTH = "{{
if($H/parity == 2) 2 + $P/DATA_WIDTH + $S/USE_EXTRA_STOP_BIT;
else 3 + $P/DATA_WIDTH + $S/USE_EXTRA_STOP_BIT;
}}";
$P/ODD_PARITY = "{{ if($H/parity == 1) '1b1'; else '1b0'; }}";
$S/USE_DATA_WIDTH_7 = "{{ if($P/DATA_WIDTH == 7) 1; else 0; }}";
$S/USE_DATA_WIDTH_8 = "{{ if($P/DATA_WIDTH == 8) 1; else 0; }}";
$S/USE_DATA_WIDTH_9 = "{{ if($P/DATA_WIDTH == 9) 1; else 0; }}";
GROUP
{
GROUP
{
title = "Baud Rate";
align = "left";
layout = "grid";
rows = "2";
columns = "2";
TEXT
{
title = "Baud Rate (bps): ";
align = "right";
}
COMBO
{
values="115200,57600,38400,31250,28800,19200,14400,9600,4800,2400,1200,300";
DATA { $H/baud_rate = $; }
# ITEM { title="115200"; DATA { $H/baud_rate = "115200"; }}
# ITEM { title="9600"; DATA { $H/baud_rate = "9600"; }}
}
TEXT
{
title = "Input Clock Frequency: ";
align = "right";
}
TEXT
{
title = "{{ $$inputClock / 1E6; }} MHz";
}
}
GROUP
{
align = "left";
title = "Data Format";
layout = "grid";
rows = "3";
columns = "2";
TEXT
{
title = "Parity: ";
align = "right";
}
COMBO
{
ITEM { title="NONE"; DATA { $H/parity = "2"; }}
ITEM { title="ODD "; DATA { $H/parity = "1"; }}
ITEM { title="EVEN"; DATA { $H/parity = "0"; }}
}
TEXT
{
title = "Data Bits:";
align = "right";
}
COMBO
{
ITEM { title="7"; DATA { $P/DATA_WIDTH = "7"; }}
ITEM { title="8"; DATA { $P/DATA_WIDTH = "8"; }}
ITEM { title="9"; DATA { $P/DATA_WIDTH = "9"; }}
}
TEXT
{
title = "Stop Bits:";
align = "right";
}
COMBO
{
ITEM { title="1"; DATA { $S/USE_EXTRA_STOP_BIT = "0"; }}
ITEM { title="2"; DATA { $S/USE_EXTRA_STOP_BIT = "1"; }}
}
}
}
}
}
ASSOCIATED_FILES
{
Add_Program = "the_wizard_ui";
Edit_Program = "the_wizard_ui";
Generator_Program = "UP_IP_Core_Generator.pl";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -