Posts

Showing posts with the label Real Time Embedded Systems

OPENPICIDE (simulator for picoblaze) : beginners tutorial

WORKING WITH OPENPICIDE (Continuation of the tutorial which describes the setup of the software in ubuntu) How to open a new project 1. Project -> new project 2. In the window that pops up version -> fil as per requirements processor -> XIlinx picoblaze family Processor (tab) -> Picoblaze 3 (Note : Memory bank size = 1024 instruction. Rest is the default) compiler (tab) -> Entity name : prog_rom (Name of required output vhd/v file) VHDL template file : /location_of_kcpsm3/Assembler/rom_form.vhd Verilog template file : /location_of_kcpsm3/Assembler/rom_form.v sources -> if you have the assembly program ready put it here applicaiton -> editor options set as per user requirement NOTE IMPORTANT while writing the program 1. Certain syntaxes are different INPUT - IN OUTPUT - OUT RETURN - RET need to write a script to automate conversion. 2. "constants" syntax is different - yet to find out the new syntax (kindly let me kn...

KCPSM Assembler and simulator for picoblaze

Hi :) (: I was implementing a code in kcpsm assembly language for the picoblaze mc. Every time i had to test it, I had to dump it on the FPGA and look for the desired output. I dint have the time to search for a kcpsm simulator then so had to manage with the poor debugging capabilities and long dumping latencies for completing the assignment. More over KCPSM assembler that comes with the package, runs only in a windows environment. so i had to use DOSEMU everytime to just compile the program. All this sucked big time. So i went in search of a simulator/assembler for linux and then there was OPENPICIDE Open Pic IDE is open and supports linux windows mac and is downright amazing. Here i have included the steps to install and run openpicide in an UBUNTU system. Simulation of Picoblaze assembly code There are two tools to simulate picoblaze assembly language 1. openPICIDE 2. picoasm OpenPICIDE Integrated assembler development environment (IDE). Provides the following component...

Procedure : writing and burning the PICOBLaze assembly code onto the FPGA board.

Here is the general procedure that is followed to burn an assembly code onto the Pico Blaze MC. 1. Write your own ROM program by learning the PicoBlaze instruction sets.   2.  Compile  the  program  to  VHDL  by  using  KCPSM  assembler  (This assembler  requires  32­bit  operating  system) 3. Synthesize the VHDL program and the PicoBlaze soft code in ISE. 4. Generate bit file (You also need to include your modified UCF file).   5. Download the bit file to the FPGA and check if that works. You can find the detailed procedure in the manual that comes along with the downloads (last post). Read page 40 of the KCPSM manual on how to use the KCPSM assembler. STEP BY STEP PROCEDURE Problem Statement : Run the following  assembly program on the FPGA Board (we dont care about the output just  burning the program onto the soft MC) loop : INPUT s2,00     ...

PICO BLaze an Intro

Bit of an Intro to PicoBlaze .... PicoBlaze is the designation of a series of three free soft processor cores from Xilinx  for  use  in  their  FPGA  and  CPLD  products.  They  are  based  on  a  RISC architecture of 8 bits and can reach speeds up to 100 MIPS on the Virtex 4 FPGA's family. The processors have an 8‐bit address and data port for access to a wide range of peripherals. The license of the cores allows their free use.   The hardware is synthesised using the HDL processor and the assembler generated PROM and can be is placed and routed on an FPGA. once this is done, the FPGA acts as a processor executing the instructions that are stored in the PROM one after the other. They can be used in typical embedded applications such as weather monitoring station, robotic control, home automation, washing machine, microwave controller. The advantage is any number of digital custom blocks can be connecte...

ARM programs (Basic)

So I was asked to write a few programs as a homework assignment. Was really simple but was a good exercise with the assembly codes. ARM Assembly Home Work 2 Date 02/10/11 Abishek Ramdas 1. x = (a+b);     ADR r4, a        ;get address of variable 'a'     LDR r0, [r4]    ;load the valuf of 'a' into r0. r0 <- a     ADR r4, b        ;get address of b into r4     LDR r1, [r4]     ;r1 <- b     ADD r3, r1, r0  ;r3 <- a+b     LDR r4, x         ;get addres of x into r4     STR rs, [r4]      ;x <- (a+b) 2. y = (c-d) + (e-f)     ADR r4, c     LDR r0,[r4]        ;r0 <- c     ADR r4, d     LDR r1, [r4]    ...

QEMU and ARM assembly simulation for linux (debian)

I was looking for some assembly language simulators for ARM. Open sources preferable (free!) so after a lot of trial and error,  I found that QEMU was the solution I was looking for. here is a short description  of QEMU. "QEMU is a generic and open source machine emulator and virtualizer. When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, and S390 guests." (source : http://wiki.qemu.org/Main_Page ) We dint have a simulation environment set up in our school for running ARM programs. So i decided to get myself one because i knew there were a number of open sourced hardware ...

Setting up ARM Simulation Environment using GNU Tool chain

ARM DOCUMENTATION Note : These are the steps i followed in setting up to develop C programs for ARM using the GNU tool chain. I am not using this currently, I am using an ARM emulator called QEMU. IDE     eclipse COMPILER     gcc DEBUGGER     gdb SIMULATOR     insight REFERENCES http://download.ronetix.info/toolchains/arm/arm_cross_development_guide.pdf (contains the files that are to be downloaded for simulator) http://embeddedcraft.org/armtutorials.html ERROR arm-elf-insight: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory cd /lib ln libexpat.so.1 libexpat.so.0 this error is removed after this -------------------------------------------- INSTALLING ECLIPSE 1. synaptic package manager 2. search eclipse 3. mark and apply for installation after it is installed you have to install the eclipse c/c++ development tool chain In package mana...