реклама на сайте
подробности

 
 
> некоторые вопросы по написанию софта для NIOS II
Mozart
сообщение Oct 3 2007, 08:11
Сообщение #1


Частый гость
**

Группа: Свой
Сообщений: 154
Регистрация: 16-08-07
Из: Москва
Пользователь №: 29 829



при создании проекта в nios2ide, я создаю пустой проект, какие файлы мне необходимы? кроме *.ptf... и где их взять... скажить где читать ничего найти не могу 07.gif

и я понять не могу зачем "System ID Peripheral" из документации ясно то, что ничего не ясно
Цитата
The system ID peripheral safeguards against accidentally downloading
software compiled for a different Nios II system. If the system includes
the system ID peripheral, the Nios II IDE prevents you from
downloading programs compiled for a different system.

каков этой ID смысл, скажите пжлста???

p.s. если честно то я перестал что-либо понимать... ситуация такая вчера т.е. во вторник я по туториалу "tt_nios2_hardware_tutorial.pdf" всё сделал и мне квартус7 выдал 494 варнинга... сегодня при той же процедуре мне квартус выдал 544 варнинга... что за чудеса???


--------------------
все косяки, даже о которых не знает сам разработчик, - мои
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
Mozart
сообщение Oct 9 2007, 06:45
Сообщение #2


Частый гость
**

Группа: Свой
Сообщений: 154
Регистрация: 16-08-07
Из: Москва
Пользователь №: 29 829



таймер в ISS не работает, проверено... PIO работает... по крайне мере если изменять значения PIO потом при помощи printf выводить в консоль, то выводит то, что надо... а таймеру в документации еаписано ясно что нужно тактирование clk... прям в самом начале, если нужна какая-то задержка то можно воспользоваться "usleep()" в #include "unistd.h"...

p.s. вообще писать софтинку под ниос просто как оказалось... нужно терпение только... ну как обычно...


--------------------
все косяки, даже о которых не знает сам разработчик, - мои
Go to the top of the page
 
+Quote Post
Волощенко
сообщение Oct 9 2007, 09:03
Сообщение #3


Местный
***

Группа: Свой
Сообщений: 347
Регистрация: 16-02-06
Из: г.Николаев, Украина
Пользователь №: 14 377



Цитата(Mozart @ Oct 9 2007, 09:45) *
таймер в ISS не работает, проверено...
У меня пока тот же результат, но есть утверждения, что должен работать (вот два):

1. http://forum.niosforum.com/forum/index.php?showtopic=322
The iss supports simulation of the following peripherals:
. memory (ram/rom)
. avalon timer
. avalon jtag uart
. avalon uart

2. http://forum.niosforum.com/forum/index.php?showtopic=5418
"If any unsupported components are present in the system, the ISS displays a warning message at the start of the run or debug session. The ISS ignores writes to unsupported components during simulation. Reading from an unsupported component during simulation returns zero.
suported component list:

-All Nios II processor cores: Nios II/f, Nios II/s, Nios II/e
-Interval timer core
-JTAG UART core
-UART core
-On-chip memory (RAM/ROM)
-SDRAM controller core
-IDT71V416 SRAM (1 MB SRAM mounted on Nios development board)
-EPCS serial flash controller core, with limitations."

And here is aditonal limitations of ISS:

Simulations are functional only, and not cycle-accurate.
The ISS does not model Nios II instruction and data caches, and will not find bugs involving cache initialization, flushing, or bypassing.
The ISS does not support reading or writing tightly coupled memories connected to the Nios II processor.
The ISS does not support custom instructions.



3. А это взято из Nios II IDE Help

Instruction Set Simulator (ISS)
The Nios II instruction set simulator (ISS) allows you to execute and debug Nios II programs in simulation on a host PC. The ISS simulates software executing on a Nios II processor core connected to a limited set of peripherals. The simulation is at the functional level, and all operations complete in one cycle. It is not a cycle-accurate simulation, and therefore performance benchmarking on the ISS gives optimistic results. On a modern Windows PC, the ISS runs at about 300K instructions per second when simulating code on the fast example design provided in the Nios II Embedded Design Suite.
The ISS can produce an execution trace. The trace output appears in the Console view, and you can optionally redirect it to a file. It is common to output trace data to a file, because trace tends to produce a large amount of information.

ISS-supported SOPC Builder components:
- All Nios II processor cores: Nios II/f, Nios II/s, Nios II/e
- Interval timer core
- JTAG UART core
- UART core
- On-chip memory (RAM/ROM)
- SDRAM controller core
- IDT71V416 SRAM (1 MB SRAM mounted on Nios development board)
- EPCS serial flash controller core, with limitations.
If any unsupported components are present in the system, the ISS displays a warning message at the start of the run or debug session. The ISS ignores writes to unsupported components during simulation. Reading from an unsupported component during simulation returns zero.

SOPC Builder system requirements:
The Nios II ISS simulates a Nios II processor system described by an SOPC Builder system file (.ptf). The Nios II ISS makes the following assumptions about the SOPC Builder system:
- SOPC Builder successfully generated the .ptf file.
- All memories with initialized content are initialized from one .elf file.
- The system contains exactly one Nios II CPU. The ISS does not support multiprocessor systems.
- The system has one clock domain.
- The system has one address map. (This is true for all Nios II systems created by SOPC Builder.)

ISS limitations:
- Simulations are functional only, and not cycle-accurate.
- The ISS does not model Nios II instruction and data caches, and will not find bugs involving cache initialization, flushing, or bypassing.
- The ISS does not support reading or writing tightly coupled memories connected to the Nios II processor.
- The ISS does not support custom instructions.
- The ISS models the Nios II ienable register as a complete 32-bit register. In hardware (both on a target board and in HDL simulation), all bits associated with unused interrupt inputs are always zero.
- The EPCS Serial Flash Controller core only supports boot-from-flash behavior. If the SOPC Builder system contains an EPCS Serial Flash Controller core, the simulation does not model the full behavior of the EPCS device. The ISS only models the first 1 Kbytes of the controller's register map as a block of ROM. In the case that the processor resets to the EPCS controller address (the typical boot-from-flash scenario), the simulation relies on the fact that RAMs are pre-initialized. Therefore, the controller's boot-loader does not need to copy code from EPCS memory to RAM. Instead, the controller simply jumps directly to RAM.
Go to the top of the page
 
+Quote Post
Волощенко
сообщение Oct 30 2007, 09:43
Сообщение #4


Местный
***

Группа: Свой
Сообщений: 347
Регистрация: 16-02-06
Из: г.Николаев, Украина
Пользователь №: 14 377



Цитата(Mozart' @ Oct 9 2007, 09:45) *
таймер в ISS не работает, проверено...

Цитата(Волощенко @ Oct 9 2007, 13:03) *
У меня пока тот же результат, но есть утверждения, что должен работать (вот два):

Все-таки таймер симулируется в ISS. Ниже текст программы с выводом на Console состояния изменяющегося таймера.
Вот первые строки, что видны на Console:
Hello from Nios II!
00000000, 00000646, 00000dad, 00001582, 00001dc4, 00002644, 00002eb8, 000
03784, 0000401e, 0000487a, 00005168, 00005a02, 00006274, 00006b14, 000073
bc, 00007cb6, 000085c4, 00008eba, 00009806, 0000a0ca, 0000a9b2, 0000b2bc,

А это программа:
#include "sys/alt_stdio.h"
//-----------------------------
#include "alt_types.h"
#include "system.h"
//-----------------------------
#include "altera_avalon_timer_regs.h" //all for timer
//-----------------------------
int alt_timestamp_start(void)
{ void* base = TIMER_BASE;
{ IOWR_ALTERA_AVALON_TIMER_CONTROL (base,ALTERA_AVALON_TIMER_CONTROL_STOP_MSK);
IOWR_ALTERA_AVALON_TIMER_PERIODL (base,0xFFFF);
IOWR_ALTERA_AVALON_TIMER_PERIODH (base,0xFFFF);
IOWR_ALTERA_AVALON_TIMER_CONTROL (base,ALTERA_AVALON_TIMER_CONTROL_START_MSK);
} return 0;
}
alt_u32 alt_timestamp(void)
{ alt_u32 lower; alt_u32 upper;
void* base = TIMER_BASE;
{ IOWR_ALTERA_AVALON_TIMER_SNAPL (base, 0);
lower = IORD_ALTERA_AVALON_TIMER_SNAPL(base);
upper = IORD_ALTERA_AVALON_TIMER_SNAPH(base);
return (0xFFFFFFFF - ((upper << 16) | lower));
}
}
//-----------------------------
int main()
{alt_u32 a;
a=alt_timestamp_start();
alt_putstr("Hello from Nios II!\n");
printf("%08x, ", a);
while (1){a=alt_timestamp(); printf("%08x, ", a);};
return 0;
}
Go to the top of the page
 
+Quote Post
Mozart
сообщение Nov 7 2007, 14:39
Сообщение #5


Частый гость
**

Группа: Свой
Сообщений: 154
Регистрация: 16-08-07
Из: Москва
Пользователь №: 29 829



вот я сейчас читаю документацию на этот таймер и там написано
Цитата
The TO (timeout) bit is set to 1 when the internal counter reaches zero. Once
set by a timeout event, the TO bit stays set until explicitly cleared by a master
peripheral. Write zero to the status register to clear the TO bit.


вот мой код...
Код
#include    "C:\altera\71\quartus\sopc_builder\components\altera_avalon_pio\sdk\pio_struct.h"
#include    "C:\altera\71\quartus\sopc_builder\components\altera_avalon_timer\sdk\timer_struct.h"

void InitTimer0(void)
{
    na_timer0->np_timercontrol = np_timercontrol_stop_mask;
    na_timer0->np_timerperiodl = 0x0000;
    na_timer0->np_timerperiodh = 0x01F4;
    na_timer0->np_timercontrol = np_timercontrol_cont_mask|np_timercontrol_start_mask;
}

int main()
{  
//if (alt_avalon_sysid_test())
{
    
    InitTimer0();
    InitPio();
    unsigned char a = 0x01;
    while(1)
    {
        //CountTimer0();
        while (!(na_timer0->np_timerstatus & (1 << 0)));
        na_timer0->np_timerstatus = 0;
        na_pio->np_piodata = a++;
    }
}
}

если честно мне только не нравися прописывать такие длинные пути.... как от этого уйти?
эмулировал всё на доске... ещё не получается запускать Debug ISS он раз через раз запускается, нашёл где-то про индексирование, но после индексации тоже не всегда запускается.... надо где-нить что-нить прописывать?

Сообщение отредактировал Mozart - Nov 7 2007, 15:29


--------------------
все косяки, даже о которых не знает сам разработчик, - мои
Go to the top of the page
 
+Quote Post

Сообщений в этой теме
- Mozart   некоторые вопросы по написанию софта для NIOS II   Oct 3 2007, 08:11
- - Mozart   создал пустой проект... написал пару строчек Код#i...   Oct 3 2007, 09:59
|- - Волощенко   Посмотрите на ug_nios2_ide_help.pdf из http://www....   Oct 3 2007, 13:09
- - Mozart   там создаётся проект Цитата"Select the Count ...   Oct 3 2007, 14:00
|- - RHnd   А где вы вообще берете все эти ds_nios_*.pdf? Я в ...   Oct 3 2007, 14:57
||- - Mozart   Цитата(RHnd @ Oct 3 2007, 18:57) А где вы...   Oct 3 2007, 15:53
|- - id_gene   Цитата(Mozart @ Oct 3 2007, 18:00) всё пр...   Oct 3 2007, 15:09
|- - Волощенко   Цитата(id_gene @ Oct 3 2007, 18:09) Всяки...   Oct 4 2007, 10:45
|- - Mozart   у меня системная фихня лежит в "c:\alter...   Oct 4 2007, 11:35
||- - DimaM   я тоже с полгода назад мучался с NIOS. Надо было б...   Oct 5 2007, 08:42
|- - id_gene   Цитата(Волощенко @ Oct 4 2007, 14:45) Где...   Oct 5 2007, 09:26
|- - Волощенко   Цитата(id_gene @ Oct 5 2007, 12:26) Не зн...   Oct 5 2007, 10:43
- - Mozart   "excalibur.h" где взять этот файл?? поис...   Oct 3 2007, 15:05
- - Mozart   вот такой ещё вопросец Кодvoid MyPIO_ISR(int c...   Oct 4 2007, 10:08
- - id_gene   Ну если вы еще этого не сделали, то нужно скачать ...   Oct 5 2007, 12:35
- - RHnd   Я сейчас посмотрел ваши даташиты со структурами - ...   Oct 6 2007, 06:48
- - Mozart   техническая документация нас спасёт... ЦитатаThe T...   Oct 10 2007, 10:16
|- - RHnd   Это вы так цитату вставили или действительно забыл...   Oct 10 2007, 14:44
- - Mozart   это я действительно забыл инит вставить... вставил...   Oct 11 2007, 09:12
- - Manfred   Можно как-то получить программу на ассеблере? - во...   Oct 15 2007, 10:22
- - Mozart   у меня вообще железки нету... я чувствую себя ущер...   Oct 15 2007, 13:12
- - Manfred   Где дизасм можно найти?) Я задержки между выставл...   Oct 15 2007, 13:27
|- - Mozart   Цитата(Manfred @ Oct 15 2007, 17:27) Где ...   Oct 15 2007, 13:33
|- - Manfred   Цитата(Mozart @ Oct 15 2007, 17:33) откры...   Oct 16 2007, 09:35
- - Postoroniy_V   впечатление такое, что никто и не читает Nios II ...   Nov 8 2007, 14:25
- - AlexanderL   Здравствуйте! Подскажите пожалуйста как отлади...   Nov 20 2007, 07:38
|- - Stewart Little   Цитата(AlexanderL @ Nov 20 2007, 10:38) Е...   Nov 29 2007, 16:20
|- - AlexanderL   Цитата(Stewart Little @ Nov 29 2007, 19:2...   Dec 5 2007, 14:13
- - slog   Учусь писать программы для Nios. Есть некоторые во...   Feb 1 2009, 17:29
- - Stewart Little   Цитата(slog @ Feb 1 2009, 20:29) Как узна...   Feb 2 2009, 09:16


Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 28th June 2025 - 08:31
Рейтинг@Mail.ru


Страница сгенерированна за 0.01414 секунд с 7
ELECTRONIX ©2004-2016