Jump to content
    

Ethernet + Cyclone + Nios

Надо ли через pll пропускать для задания фазы(clock phase shift)?

 

И получается надо ставить делитель, если нужна частота отличная от 25mhz для работы в режиме 10mbit(2.5) или gigabit(125)?

или он сам каким-то неведомым способом подбирает частоту в зависимости от установленного соединения?

делитель не надо. PHY сам все частоты сгенерит, в зависимости от линка. у него внутри PLL есть. фазу тоже не надо двигать.

Share this post


Link to post
Share on other sites

делитель не надо. PHY сам все частоты сгенерит, в зависимости от линка. у него внутри PLL есть. фазу тоже не надо двигать.

 

то есть с enet_rx_clk(генератор) нужно будет завести на pinout, привявзанный к железу и потом еще и на nios?

post-44580-1256655852_thumb.jpg

 

По-другому пока не могу представить, чтоб и на nios связь была и привязать к pin.

 

Или добавить clk в sopc builder'e для mac, a pin завести как обычно?

Edited by dim99

Share this post


Link to post
Share on other sites

то есть с enet_rx_clk(генератор) нужно будет завести на pinout, привявзанный к железу и потом еще и на nios

 

По-другому пока не могу представить, чтоб и на nios связь была и привязать к pin.

надо схематик на плату посмотреть. на PHY должен заводиться опорный клок(с циклона или с генератора, посмотрите на плате). а с PHY на циклон идут txc и rxc.

Share this post


Link to post
Share on other sites

не понимаю )

что есть PHY - это физический уровень чего?

"ну вы блин даете" (ц) ethernet, конечно. MAC синтезируется внутри циклона, а PHY - внешний на плате (какая микруха, кстати?)

или это я переработал? :wacko:

Share this post


Link to post
Share on other sites

"ну вы блин даете" (ц) ethernet, конечно. MAC синтезируется внутри циклона, а PHY - внешний на плате (какая микруха, кстати?)

или это я переработал? :wacko:

 

Вот я точно также и думал, вы не переработали, это я глупые вопросы иногда задаю )

 

использую marvell 88e1111.

Подсмотрел на альтерафорум :

PLL with two clocks at 125 MHz with 180º of delay: one is connect to 'tx_clk' input of TSE block and the other to pin T8

 

manual reference говорит следующее:

25 MHz (reference clock); enet_rx_clk Input U5 Cyclone III device pin B14

 

ENET_GTX_CLK T8 - Clock Outputs

 

по схематику:

post-44580-1256658665_thumb.jpg

Edited by dim99

Share this post


Link to post
Share on other sites

использую marvell 88e1111.

Подсмотрел на альтерафорум :

PLL with two clocks at 125 MHz with 180º of delay: one is connect to 'tx_clk' input of TSE block and the other to pin T8

 

manual reference говорит следующее:

25 MHz (reference clock); enet_rx_clk Input U5 Cyclone III device pin B14

 

ENET_GTX_CLK T8 - Clock Outputs

я упустил из виду, что у вас Triple Speed. если я правильно понял, то 25МГц - опора для внутренней PLL в циклоне, умножаем на 5 и сдвигаем на 180º. один из выходов PLL на порт TSE, второй - на внешний пин (опора для PHY?), а rxclk - с PHY. в SOPCе, видимо соединить не получится, придется на схематике соединять. хотя PLL можно в SOPC запихать.

Share this post


Link to post
Share on other sites

С возвращением интернета назрел вопрос:

 

Как определить является ли pin - in или out?

Мануал молчит - просто даны сигналы без указания их направления.

 

Как определить, какими являются эти пины:

ENET_RX_D[3..0]

ENET_TX_D[3..0]

ENET_TX_EN

ENET_RX_DV

 

Есть мнение, что output:

ENET_TX_D[3..0]

ENET_TX_EN

 

input:

ENET_RX_DV

ENET_RX_D[3..0]

 

enet_rx_clk Input U5 Cyclone III device pin B14 - видимо это все-таки input

Share this post


Link to post
Share on other sites

Начал "отладку" на плате (cyclone III dev kit).

 

Удалось запихнуть всю конфигурацию в on-chip(на время для обеспечения работоспособности,потом все пойдет во flash\..) в итоге получилась конфигурация такая:

post-44580-1257253692_thumb.jpg

 

на топ-левеле в квартусе следующее:

post-44580-1257253909_thumb.jpg

 

Во время компиляции вылез warning, что будет time-limited sof - нет лицензии на TSE(у кого есть поделитесь :) ).

После прошивки появилось вот такое окошко:

post-44580-1257254281_thumb.jpg

 

Зашел в nios ide - запустил на выполнение => run и он выдал ошибку:

panic: stack alloc

dtrap - needs breakpoint

 

Понятно что проблема со стэком, может ему его мало?

под stack,heap и read\write data memory выделено 52 Кбайта onchip_mem.

 

Собственно вопрос в чем: как исправить эту ошибку и где найти лицензию на tse(понятно что не за $)

Edited by dim99

Share this post


Link to post
Share on other sites

Зашел в nios ide - запустил на выполнение => run и он выдал ошибку:

panic: stack alloc

dtrap - needs breakpoint

 

Понятно что проблема со стэком, может ему его мало?

под stack,heap и read\write data memory выделено 52 Кбайта onchip_mem.

а проект-то собрался? логи билдера покажите.

да, еще настройки линкера.

Share this post


Link to post
Share on other sites

а проект-то собрался? логи билдера покажите.

да, еще настройки линкера.

 

Проект собрался.

Логи sopc builder:

Info: onchip_mem: Manually-created SOF and simulation initialization files are required for memory onchip_mem.
Info: ext_flash: Flash memory capacity: 64,0 MBytes (67108864 bytes).
Info: prog_mem: Manually-created SOF and simulation initialization files are required for memory prog_mem.
Info: Wrote C:/study/q9/cycloneIII_3c120_fl_eth/niosciii.sopcinfo
Info: tse_mac: HDL generated
Info: tse_mac: Variation name : tse_mac
Info: tse_mac: Variation language : Verilog HDL
Info: tse_mac: Output directory : C:\study\q9\cycloneIII_3c120_fl_eth
Info: tse_mac: Generating HDL... 
Info: tse_mac: Generating MegaCore function top-level...
Info: tse_mac: Adding design files to Quartus II project ...
Info: tse_mac: Updating user's project directory...
Info: tse_mac: Generation successful.
Info: tse_mac: HDL generated
Info: niosciii: Generating QIP file.
Info: Info: *******************************************************************
Info: Info: Running Quartus II Shell
Info:	 Info: Version 8.1 Build 163 10/28/2008 SJ Full Version
Info:	 Info: Copyright © 1991-2008 Altera Corporation. All rights reserved.
Info:	 Info: Your use of Altera Corporation's design tools, logic functions 
Info:	 Info: and other software and tools, and its AMPP partner logic 
Info:	 Info: functions, and any output files from any of the foregoing 
Info:	 Info: (including device programming or simulation files), and any 
Info:	 Info: associated documentation or information are expressly subject 
Info:	 Info: to the terms and conditions of the Altera Program License 
Info:	 Info: Subscription Agreement, Altera MegaCore Function License 
Info:	 Info: Agreement, or other applicable license agreement, including, 
Info:	 Info: without limitation, that your use is for the sole purpose of 
Info:	 Info: programming logic devices manufactured by Altera and sold by 
Info:	 Info: Altera or its authorized distributors.  Please refer to the 
Info:	 Info: applicable agreement for further details.
Info:	 Info: Processing started: Tue Nov 03 18:14:42 2009
Info: Info: Command: quartus_sh -t sopc_add_qip_file.tcl
Info: Info: Evaluation of Tcl script sopc_add_qip_file.tcl was successful
Info: Info: Quartus II Shell was successful. 0 errors, 0 warnings
Info:	 Info: Peak virtual memory: 47 megabytes
Info:	 Info: Processing ended: Tue Nov 03 18:14:42 2009
Info:	 Info: Elapsed time: 00:00:00
Info:	 Info: Total CPU time (on all processors): 00:00:00
Info: Starting PTF file elaboration.
... здесь слишком много написано что включено в проект
Info: Finished elaborating PTF file.
Executing: C:/altera/81/quartus//sopc_builder/bin/sopc_builder --classic --generate C:/study/q9/cycloneIII_3c120_fl_eth/niosciii.ptf
Info: Starting generation...
...
Altera SOPC Builder Version 8.10 Build 163
Copyright © 1999-2008 Altera Corporation.  All rights reserved.
# 2009.11.03 18:16:14 (*) mk_custom_sdk starting
# 2009.11.03 18:16:14 (*) Reading project C:/study/q9/cycloneIII_3c120_fl_eth/niosciii.ptf.
# 2009.11.03 18:16:14 (*) Finding all CPUs
# 2009.11.03 18:16:14 (*) Finding all available components
# 2009.11.03 18:16:14 (*) Reading C:/study/q9/cycloneIII_3c120_fl_eth/.sopc_builder/install.ptf
# 2009.11.03 18:16:14 (*) Found 67 components
# 2009.11.03 18:16:15 (*) Finding all peripherals
# 2009.11.03 18:16:16 (*) Finding software components
# 2009.11.03 18:16:16 (*) (Legacy SDK Generation Skipped)
# 2009.11.03 18:16:16 (*) (All TCL Script Generation Skipped)
# 2009.11.03 18:16:16 (*) (No Libraries Built)
# 2009.11.03 18:16:16 (*) (Contents Generation Skipped)
# 2009.11.03 18:16:16 (*) mk_custom_sdk finishing
# 2009.11.03 18:16:16 (*) Starting generation for system: niosciii.
....................
# 2009.11.03 18:16:18 (*) Running Generator Program for cpu
# 2009.11.03 18:16:23 (*)   Checking for plaintext license.
# 2009.11.03 18:16:34 (*)   Plaintext license not found.
# 2009.11.03 18:16:34 (*)   Checking for encrypted license (non-evaluation).
# 2009.11.03 18:16:37 (*)   Encrypted license found.  SOF will not be time-limited.
# 2009.11.03 18:16:48 (*)   Creating encrypted HDL
# 2009.11.03 18:16:51 (*) Running Generator Program for onchip_mem
# 2009.11.03 18:16:55 (*) Running Generator Program for pioInCntrl1
# 2009.11.03 18:16:57 (*) Running Generator Program for pioInCntrl2
# 2009.11.03 18:17:00 (*) Running Generator Program for pioInData
# 2009.11.03 18:17:02 (*) Running Generator Program for pioOutStatus
# 2009.11.03 18:17:04 (*) Running Generator Program for pioOutData
# 2009.11.03 18:17:06 (*) Running Generator Program for sysid
# 2009.11.03 18:17:07 (*) Running Generator Program for ext_flash
# 2009.11.03 18:17:09 (*) Running Generator Program for descriptor_memory
# 2009.11.03 18:17:11 (*) Running Generator Program for sgdma_tx
# 2009.11.03 18:17:14 (*) Running Generator Program for sgdma_rx
# 2009.11.03 18:17:17 (*) Running Generator Program for sys_clk_timer
# 2009.11.03 18:17:18 (*) Running Generator Program for high_res_timer
# 2009.11.03 18:17:20 (*) Running Generator Program for performance_counter
# 2009.11.03 18:17:22 (*) Running Generator Program for button_pio
# 2009.11.03 18:17:24 (*) Running Generator Program for led_pio
# 2009.11.03 18:17:26 (*) Running Generator Program for jtag_uart
# 2009.11.03 18:17:28 (*) Running Generator Program for tse_mem
# 2009.11.03 18:17:30 (*) Running Generator Program for prog_mem
# 2009.11.03 18:17:34 (*) Making arbitration and system (top) modules.
# 2009.11.03 18:17:50 (*) Generating Quartus symbol for top level: niosciii
# 2009.11.03 18:17:50 (*) Symbol C:/study/q9/cycloneIII_3c120_fl_eth/niosciii.bsf already exists, no need to regenerate
# 2009.11.03 18:17:50 (*) Creating command-line system-generation script: C:/study/q9/cycloneIII_3c120_fl_eth/niosciii_generation_script
# 2009.11.03 18:17:50 (*) Running setup for HDL simulator: modelsim
# 2009.11.03 18:17:50 (*) Setting up Quartus with niosciii_setup_quartus.tcl
c:/altera/81/quartus/bin/quartus_sh -t niosciii_setup_quartus.tcl
Info: *******************************************************************
Info: Running Quartus II Shell
Info: Version 8.1 Build 163 10/28/2008 SJ Full Version
Info: Copyright © 1991-2008 Altera Corporation. All rights reserved.
Info: Your use of Altera Corporation's design tools, logic functions 
Info: and other software and tools, and its AMPP partner logic 
Info: functions, and any output files from any of the foregoing 
Info: (including device programming or simulation files), and any 
Info: associated documentation or information are expressly subject 
Info: to the terms and conditions of the Altera Program License 
Info: Subscription Agreement, Altera MegaCore Function License 
Info: Agreement, or other applicable license agreement, including, 
Info: without limitation, that your use is for the sole purpose of 
Info: programming logic devices manufactured by Altera and sold by 
Info: Altera or its authorized distributors.  Please refer to the 
Info: applicable agreement for further details.
Info: Processing started: Tue Nov 03 18:17:54 2009
Info: Command: quartus_sh -t niosciii_setup_quartus.tcl
Info: Evaluation of Tcl script niosciii_setup_quartus.tcl was successful
Info: Quartus II Shell was successful. 0 errors, 0 warnings
Info: Peak virtual memory: 47 megabytes
Info: Processing ended: Tue Nov 03 18:17:59 2009
Info: Elapsed time: 00:00:05
Info: Total CPU time (on all processors): 00:00:00
# 2009.11.03 18:18:00 (*) Completed generation for system: niosciii.
# 2009.11.03 18:18:00 (*) THE FOLLOWING SYSTEM ITEMS HAVE BEEN GENERATED:
 SOPC Builder database : C:/study/q9/cycloneIII_3c120_fl_eth/niosciii.ptf 
 System HDL Model : C:/study/q9/cycloneIII_3c120_fl_eth/niosciii.v 
 System Generation Script : C:/study/q9/cycloneIII_3c120_fl_eth/niosciii_generation_script 
# 2009.11.03 18:18:00 (*) SUCCESS: SYSTEM GENERATION COMPLETED.

 

Настройки линкера в nios ide?

Посмотрел в preferences nios ide, но что-то не увидел там похожего на свойтсва линковщика ( пока не знаю, где их искать.

Edited by Omen_13

Share this post


Link to post
Share on other sites

Проект собрался.

Настройки линкера в nios ide?

Посмотрел в preferences nios ide, но что-то не увидел там похожего на свойтсва линковщика ( пока не знаю, где их искать.

нет,имелись в виду логи NIOS-IDE при сборке проекта. свойства линкера в Project/Properties (или ПКМ на проекте). какие настройки у System Library

Share this post


Link to post
Share on other sites

Так, выкладываю, что есть - свойства system library:

post-44580-1257263198_thumb.jpg

 

логи nios ide:

**** Build of configuration Debug for project simple_socket_server_0 ****

 

make -s all includes

Compiling alt_error_handler.c...

Compiling iniche_init.c...

Compiling led.c...

../led.c: In function `LED7SegLightshowTask':

../led.c:97: warning: unused variable `led_7_seg_val'

Compiling network_utilities.c...

Compiling simple_socket_server.c...

Linking simple_socket_server_0.elf...

Info: (simple_socket_server_0.elf) 326 KBytes program size (code + initialized data).

Info: 1040 Bytes free for stack + heap.

Post-processing to create onchip_mem.hex

Post-processing to create tse_mem.hex

Post-processing to create prog_mem.hex

Hardware simulation is not enabled for the target SOPC Builder system. Skipping creation of hardware simulation model contents and simulation symbol files. (Note: This does not affect the instruction set simulator.)

Post-processing to create ext_flash.flash

============== Software License Reminder ===============

 

uC/OS-II is provided in source form for FREE evaluation,

for educational use, or for peaceful research. If you

plan on using uC/OS-II in a commercial product you need

to contact Micrium to properly license its use in your

product. Micrium provides ALL the source code on the

Altera distribution for your convenience and to help you

experience uC/OS-II. The fact that the source is provided

does NOT mean that you can use it without paying a

licensing fee. Please help us continue to provide the

Embedded community with the finest software available.

Your honesty is greatly appreciated.

 

Please contact:

 

M I C R I U M

949 Crestview Circle

Weston, FL 33327-1848

U.S.A.

 

Phone : +1 954 217 2036

FAX : +1 954 217 2037

WEB : www.micrium.com

E-mail: Sales@Micrium.com

 

========================================================

Build completed in 21.719 seconds

Share this post


Link to post
Share on other sites

Так, выкладываю, что есть - свойства system library:

post-44580-1257263198_thumb.jpg

 

логи nios ide:

 

Info: (simple_socket_server_0.elf) 326 KBytes program size (code + initialized data).

Info: 1040 Bytes free for stack + heap.

не уверен, но похоже памяти "маловато будет" (ц). ось наверно еще динамически навыделяет и стек переполнится. а ось вообще нужна? какая задача - пакет туда-сюда кинуть или tcp/ip нужен? если второй вариант, то добавьте внешнюю память, без нее никак.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...