Konferencja Naukowa Studentów » 2004 » Informatyka - algorytmy i sieci
Strony: « 1 | 2 | 3 |

NUIBlaze – embedded debugging cd.

Czwartek, 19 marca

3. SOFTWARE

Code for PicoBlaze core is integral part of NUIBlaze ISD. Source in assembler has to be transformed into VHDL Block-RAM component filled in with microcontroller op-codes. PicoBlaze package contains approviate compiler [1], but more suitable is Mediatronix assembler and emulator [4] which includes compiler and very useful, graphical software emulator of PicoBlaze core. Using pBlaze IDE [4] software is easy to find any semantic and syntactic bugs in code and to watch execution of code step by step.

Managing of ISD is achieved by using terminal software and any PC connected by RS232 interface to NUIBlaze. User may choose between Read and Write operation. The syntax is following:
a) command to read state of 1 of 16 GPRegisters
[]
b) command to modify state of GPRegister
[]
where
- command code ('W' – write, 'R' - read)
- register no. ('0'..'F'')
- optional mask:
'&' - AND
'|' - OR
'^' - XOR
- mask parameter ('00'..'FF')
- Carriage Return

Read examples:
addr(3)=2D
R3 -> 2D (simple read from given address)
R3^55 -> 78 (read masked value -> 2D xor 55 = 78)
R3&12 -> 00 (-> 2D and 12 = 00)
R3|80 -> AD (-> 2D or 80 = AD)
trick:
addr(3)=1F
R3^FF -> E0 (simple NOT operation for free)

Write examples:
addr(1)=9D
W155 -> addr(1)=55 (simple write value at given address)
W1^AA -> addr(1)=FF (read, mask and write back ->55 xor AA= 78)
W1&1F -> addr(1)=1F (-> FF and 1F = 1F)
W1|80 -> addr(1)=9F (-> 1F or 80 = 9F)
trick:
addr(1)=85
W1^FF->7A (again, NOT operation for free)

Authors: Krzysztof Kępa, Krzysztof Rutecki, dr Fearghal Morgan

LITERATURE

[1]CHAPMAN K., PicoBlaze 8-Bit Microcontroller for Virtex-E and Spartan-II/IIE Devices, Xilinx, http://www.xilinx.com/ipcenter/processor_central/picoblaze/, xapp213.pdf, 2003
[2]CHAPMAN K., UART Transmitter and Receiver Macros, Xilinx, http://www.xilinx.com/ipcenter/processor_central/picoblaze/, UART_Manual.pdf, 2002
[3] ŁUBA T., Synteza Układów Cyfrowych, Warszawa, WKŁ, 2003, ISBN 83-206-1494-5
[4] MEDIATRONIX, pBlaze IDE, Mediatronix, http://www.mediatronix.com/pBlazeIDE.htm, 2003
[5] SKAHILL K., Język VHDL – projektowanie programowalnych układów cyfrowych, Warszawa, WNT, 2001, ISBN 83-204-2616-2
[6] WRONA W., VHDL język opisu i projektowania układów cyfrowych, Gliwice, Wyd. Pracowni Komp. J. Skalmierskiego, 2000, ISBN 838664417-6
Czytaj dalej

Artykuły z tej samej kategorii
1. Porównanie algorytmów wyszukujących wzorzec w tekście
2. Zastosowanie technologii bluetooth jako alternatywy dla technologii x10 w rozwiązaniach typu smarthome
3. Nowe podejście do problemu komiwojażera
4. Architecture and algorithms used to emulate an unconstrained switch

powrót »

Kategorie


projekt i wykonanie: smetek.biz